rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
hw_layer
drivers
gpio
tle6240.h
Go to the documentation of this file.
1
/*
2
* tle6240.h
3
*
4
* TLE6240GP Smart 16-Channel Low-Side Switch
5
*
6
* @date Dec 29, 2018
7
* @author Andrey Belomutskiy, (c) 2012-2020
8
*/
9
10
#pragma once
11
12
#include "efifeatures.h"
13
#include <hal.h>
14
15
#define TLE6240_OUTPUTS 16
16
#define TLE6240_DIRECT_OUTPUTS 8
17
18
/* TODO: add irq support */
19
#define TLE6240_POLL_INTERVAL_MS 100
20
21
struct
tle6240_config
{
22
#if HAL_USE_SPI
23
SPIDriver *
spi_bus
;
24
SPIConfig
spi_config
;
25
#endif
26
struct
{
27
ioportid_t
port
;
28
uint_fast8_t
pad
;
29
}
direct_io
[TLE6240_DIRECT_OUTPUTS];
30
struct
{
31
ioportid_t
port
;
32
uint_fast8_t
pad
;
33
}
reset
;
34
};
35
36
int
tle6240_add
(
brain_pin_e
base,
unsigned
int
index,
const
struct
tle6240_config
*cfg);
Gpio
Gpio
Definition
rusefi_hw_enums.h:14
ioportid_t
GPIO_TypeDef * ioportid_t
Port Identifier.
Definition
hal_pal_lld.h:102
tle6240_config
Definition
tle6240.h:21
tle6240_config::spi_config
SPIConfig spi_config
Definition
tle6240.h:24
tle6240_config::pad
uint_fast8_t pad
Definition
tle6240.h:28
tle6240_config::spi_bus
SPIDriver * spi_bus
Definition
tle6240.h:23
tle6240_config::reset
struct tle6240_config::@40 reset
tle6240_config::direct_io
struct tle6240_config::@39 direct_io[TLE6240_DIRECT_OUTPUTS]
tle6240_config::port
ioportid_t port
Definition
tle6240.h:27
tle6240_add
int tle6240_add(brain_pin_e base, unsigned int index, const struct tle6240_config *cfg)
Generated on Sat Sep 27 2025 00:10:06 for rusEFI by
1.9.8