rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
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
22#if HAL_USE_SPI
23 SPIDriver *spi_bus;
24 SPIConfig spi_config;
25#endif
26 struct {
28 uint_fast8_t pad;
29 } direct_io[TLE6240_DIRECT_OUTPUTS];
30 struct {
32 uint_fast8_t pad;
34};
35
36int tle6240_add(brain_pin_e base, unsigned int index, const struct tle6240_config *cfg);
GPIO_TypeDef * ioportid_t
Port Identifier.
SPIConfig spi_config
Definition tle6240.h:24
uint_fast8_t pad
Definition tle6240.h:28
SPIDriver * spi_bus
Definition tle6240.h:23
struct tle6240_config::@40 reset
struct tle6240_config::@39 direct_io[TLE6240_DIRECT_OUTPUTS]
ioportid_t port
Definition tle6240.h:27
int tle6240_add(brain_pin_e base, unsigned int index, const struct tle6240_config *cfg)