rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
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
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 {
32 uint_fast8_t pad;
33 } direct_gpio[L9779_DIRECT_OUTPUTS];
34 /* PWM(IN8) */
35 struct {
37 uint_fast8_t pad;
39};
40
41int l9779_add(brain_pin_e base, unsigned int index, const l9779_config *cfg);
GPIO_TypeDef * ioportid_t
Port Identifier.
int l9779_add(brain_pin_e base, unsigned int index, const l9779_config *cfg)
L9779 driver add.
Definition l9779.cpp:733
SPIConfig spi_config
Definition l9779.h:27
struct l9779_config::@34 pwm_gpio
ioportid_t port
Definition l9779.h:31
struct l9779_config::@33 direct_gpio[L9779_DIRECT_OUTPUTS]
SPIDriver * spi_bus
Definition l9779.h:26
uint_fast8_t pad
Definition l9779.h:32