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

Data Structures

class  PinRepository
 

Functions

void brain_pin_markUnused (Gpio brainPin)
 
int brainPin_to_index (Gpio brainPin)
 

Function Documentation

◆ brain_pin_markUnused()

void brain_pin_markUnused ( brain_pin_e  brainPin)

See also efiSetPadUnused

See also brain_pin_markUsed()

Definition at line 83 of file pin_repository.cpp.

83 {
84#ifndef EFI_BOOTLOADER
85// efiPrintf("pin_markUnused: %s", hwPortname(brainPin));
86#endif
87 int index = brainPin_to_index(brainPin);
88 if (index < 0)
89 return;
90
91 getBrainUsedPin(index) = nullptr;
92}
int brainPin_to_index(Gpio brainPin)
const char *& getBrainUsedPin(size_t index)

Referenced by deInitAuxDigital(), efiExtiDisablePin(), efiSetPadUnused(), setEepromTestConfiguration(), and stopSwitchPins().

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

◆ brainPin_to_index()

int brainPin_to_index ( Gpio  brainPin)

Definition at line 36 of file pin_repository.cpp.

36 {
37 if (brainPin < Gpio::A0)
38 return -1;
39
40 size_t i = brainPin - Gpio::A0;
41
42 if (i >= getBrainPinTotalNum())
43 return -1;
44
45 return i;
46}
static size_t getBrainPinTotalNum()

Referenced by brain_pin_markUnused(), brain_pin_markUsed(), getPinFunction(), and setPin().

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

Go to the source code of this file.