rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Data Structures | Functions
tle9104.h File Reference

Data Structures

struct  tle9104_config
 

Functions

void initAll9104 (const tle9104_config *configs)
 
int tle9104_add (Gpio base, int index, const tle9104_config *cfg)
 

Function Documentation

◆ initAll9104()

void initAll9104 ( const tle9104_config configs)

Definition at line 568 of file tle9104.cpp.

568 {
569 for (int chipIndex = 0;chipIndex < BOARD_TLE9104_COUNT;chipIndex++) {
570 int ret = tle9104_add((Gpio)(Gpio::TLE9104_0_OUT_0 + TLE9204_OUT_COUNT * chipIndex), chipIndex, &configs[chipIndex]);
571 if (ret < 0) {
572 criticalError("tle9104_add");
573 }
574 }
575}
@ TLE9104_0_OUT_0
int tle9104_add(Gpio base, int index, const tle9104_config *cfg)
Definition tle9104.cpp:554

Referenced by alphax_4kGDI_boardInitHardware(), and board_init_ext_gpios().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tle9104_add()

int tle9104_add ( Gpio  base,
int  index,
const tle9104_config cfg 
)

Definition at line 554 of file tle9104.cpp.

554 {
555 Tle9104& chip = chips[index];
556
557 /* already added? */
558 if (chip.cfg != nullptr) {
559 return -52;
560 }
561
562 chip.cfg = cfg;
563 chip.drv_state = TLE9104_WAIT_INIT;
564
565 return gpiochip_register(base, DRIVER_NAME, chip, 4);
566}
int gpiochip_register(brain_pin_e base, const char *name, GpioChip &gpioChip, size_t size)
Register gpiochip.
Definition core.cpp:186
static Tle9104 chips[BOARD_TLE9104_COUNT]
Definition tle9104.cpp:104
@ TLE9104_WAIT_INIT
Definition tle9104.cpp:29

Referenced by initAll9104().

Here is the call graph for this function:
Here is the caller graph for this function:

Go to the source code of this file.