rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions | Variables
protected_gpio.cpp File Reference

Functions

int protectedGpio_add (brain_pin_e base, const ProtectedGpioConfig *const configs)
 
void protectedGpio_check (efitick_t nowNt)
 

Variables

static ProtectedGpios protectedGpios
 
static bool didInit = false
 

Function Documentation

◆ protectedGpio_add()

int protectedGpio_add ( brain_pin_e  base,
const ProtectedGpioConfig *const  configs 
)

Definition at line 141 of file protected_gpio.cpp.

141 {
142 protectedGpios.configure(configs);
143
144 int result = gpiochip_register(base, "protected", protectedGpios, PROTECTED_CHANNEL_COUNT);
145
146 if (result == static_cast<int>(base)) {
147 didInit = true;
148 }
149
150 return result;
151}
int gpiochip_register(brain_pin_e base, const char *name, GpioChip &gpioChip, size_t size)
Register gpiochip.
Definition core.cpp:186
static bool didInit
static ProtectedGpios protectedGpios

Referenced by tdg_pdm8_boardInitHardware().

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

◆ protectedGpio_check()

void protectedGpio_check ( efitick_t  nowNt)

Definition at line 153 of file protected_gpio.cpp.

153 {
154 if (didInit) {
155 protectedGpios.check(nowNt);
156 }
157}

Referenced by adcInputsUpdateSubscribers().

Here is the caller graph for this function:

Variable Documentation

◆ didInit

bool didInit = false
static

Definition at line 139 of file protected_gpio.cpp.

Referenced by protectedGpio_add(), and protectedGpio_check().

◆ protectedGpios

ProtectedGpios protectedGpios
static

Definition at line 138 of file protected_gpio.cpp.

Referenced by protectedGpio_add(), and protectedGpio_check().

Go to the source code of this file.