rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
hw_layer
drivers
gpio
l9779.h
Go to the documentation of this file.
1
/*
2
* l9779.h
3
* ST L9779WD-SPI
4
*
5
*
6
* Created on: Jan 10, 2022
7
*/
8
9
#pragma once
10
11
#include "
global.h
"
12
13
#include <hal.h>
14
#include "efifeatures.h"
15
16
#define L9779_OUTPUTS_IGN (4)
17
/* 4 x IGNI, IN1..IN6, PWM (IN7) */
18
#define L9779_DIRECT_OUTPUTS (L9779_OUTPUTS_IGN + 7)
19
#define L9779_OUTPUTS (L9779_OUTPUTS_IGN + 28 + 1)
20
#define L9779_INPUTS (1)
21
22
#define L9779_SIGNALS (L9779_OUTPUTS + L9779_INPUTS)
23
24
struct
l9779_config
{
25
#if HAL_USE_SPI
26
SPIDriver *
spi_bus
;
27
SPIConfig
spi_config
;
28
#endif
29
/* MCU port-pin routed to IGN1..IGN4, IN1..7 */
30
struct
{
31
ioportid_t
port
;
32
uint_fast8_t
pad
;
33
}
direct_gpio
[L9779_DIRECT_OUTPUTS];
34
/* PWM(IN8) */
35
struct
{
36
ioportid_t
port
;
37
uint_fast8_t
pad
;
38
}
pwm_gpio
;
39
};
40
41
int
l9779_add
(
brain_pin_e
base,
unsigned
int
index,
const
l9779_config
*cfg);
Gpio
Gpio
Definition
rusefi_hw_enums.h:14
global.h
ioportid_t
GPIO_TypeDef * ioportid_t
Port Identifier.
Definition
hal_pal_lld.h:102
l9779_add
int l9779_add(brain_pin_e base, unsigned int index, const l9779_config *cfg)
L9779 driver add.
Definition
l9779.cpp:733
l9779_config
Definition
l9779.h:24
l9779_config::spi_config
SPIConfig spi_config
Definition
l9779.h:27
l9779_config::pwm_gpio
struct l9779_config::@34 pwm_gpio
l9779_config::port
ioportid_t port
Definition
l9779.h:31
l9779_config::direct_gpio
struct l9779_config::@33 direct_gpio[L9779_DIRECT_OUTPUTS]
l9779_config::spi_bus
SPIDriver * spi_bus
Definition
l9779.h:26
l9779_config::pad
uint_fast8_t pad
Definition
l9779.h:32
Generated on Sat Sep 27 2025 00:10:06 for rusEFI by
1.9.8