rusEFI
The most advanced open source ECU
|
I/O pin registry code.
This job of this class is to make sure that we are not using same hardware pin for two different purposes.
Definition in file pin_repository.cpp.
Functions | |
static size_t | getBrainPinTotalNum () |
const char *& | getBrainUsedPin (size_t index) |
bool | isBrainPinValid (brain_pin_e brainPin) |
int | brainPin_to_index (Gpio brainPin) |
bool | brain_pin_markUsed (Gpio brainPin, const char *msg) |
void | brain_pin_markUnused (brain_pin_e brainPin) |
void | pinDiag2string (char *buffer, size_t size, brain_pin_diag_e pin_diag) |
static brain_pin_e | index_to_brainPin (unsigned int i) |
static void | reportPins () |
__attribute__ ((weak)) const char *getBoardSpecificPinName(brain_pin_e) | |
const char * | hwOnChipPhysicalPinName (ioportid_t hwPort, int hwPin) |
const char * | hwPhysicalPinName (Gpio brainPin) |
const char * | hwPortname (brain_pin_e brainPin) |
void | initPinRepository (void) |
bool | brain_pin_is_onchip (brain_pin_e brainPin) |
bool | brain_pin_is_ext (brain_pin_e brainPin) |
bool | gpio_pin_markUsed (ioportid_t port, ioportmask_t pin, const char *msg) |
void | gpio_pin_markUnused (ioportid_t port, ioportmask_t pin) |
const char * | getPinFunction (brain_input_pin_e brainPin) |
Variables | |
PinRepository pinRepository | CCM_OPTIONAL |
static MemoryStream | portNameStream |
static char | portNameBuffer [20] |
__attribute__ | ( | (weak) | ) | const |
Definition at line 195 of file pin_repository.cpp.
bool brain_pin_is_ext | ( | brain_pin_e | brainPin | ) |
Definition at line 270 of file pin_repository.cpp.
Referenced by efiReadPin(), and startSimplePwm().
bool brain_pin_is_onchip | ( | brain_pin_e | brainPin | ) |
Definition at line 262 of file pin_repository.cpp.
Referenced by directWritePad(), efiReadPin(), efiSetPadModeWithoutOwnershipAcquisition(), efiSetPadUnused(), OutputPin::getDiag(), getHwPin(), hwPhysicalPinName(), and OutputPin::initPin().
void brain_pin_markUnused | ( | brain_pin_e | brainPin | ) |
See also brain_pin_markUsed()
Definition at line 83 of file pin_repository.cpp.
Referenced by deInitAuxDigital(), efiExtiDisablePin(), efiSetPadUnused(), setEepromTestConfiguration(), and stopSwitchPins().
See also brain_pin_markUnused()
Definition at line 53 of file pin_repository.cpp.
Referenced by efiSetPadMode().
int brainPin_to_index | ( | Gpio | brainPin | ) |
Definition at line 36 of file pin_repository.cpp.
Referenced by brain_pin_markUnused(), brain_pin_markUsed(), getPinFunction(), and setPin().
|
static |
Definition at line 16 of file pin_repository.cpp.
Referenced by brainPin_to_index(), index_to_brainPin(), and reportPins().
Definition at line 20 of file pin_repository.cpp.
Referenced by brain_pin_markUnused(), brain_pin_markUsed(), getPinFunction(), gpio_pin_markUnused(), gpio_pin_markUsed(), and reportPins().
const char * getPinFunction | ( | brain_input_pin_e | brainPin | ) |
Definition at line 313 of file pin_repository.cpp.
void gpio_pin_markUnused | ( | ioportid_t | port, |
ioportmask_t | pin | ||
) |
Marks on-chip gpio port-pin as UNused. Works only for on-chip gpios To be replaced with brain_pin_markUnused later
Definition at line 307 of file pin_repository.cpp.
Referenced by BitbangI2c::deinit().
bool gpio_pin_markUsed | ( | ioportid_t | port, |
ioportmask_t | pin, | ||
const char * | msg | ||
) |
Marks on-chip gpio port-pin as used. Works only for on-chip gpios To be replaced with brain_pin_markUsed later
todo: the problem is that this warning happens before the console is even connected, so the warning is never displayed on the console and that's quite a problem!
Definition at line 283 of file pin_repository.cpp.
Referenced by hellen154hyundai_f7_boardInitHardware().
const char * hwOnChipPhysicalPinName | ( | ioportid_t | hwPort, |
int | hwPin | ||
) |
Definition at line 199 of file pin_repository.cpp.
Referenced by hwPhysicalPinName().
Definition at line 209 of file pin_repository.cpp.
Referenced by brain_pin_markUsed(), and hwPortname().
const char * hwPortname | ( | brain_pin_e | brainPin | ) |
Definition at line 241 of file pin_repository.cpp.
Referenced by adcTriggerTurnOnInputPin(), benchSetPinValue(), brain_pin_markUsed(), canInfo(), OutputPin::deInit(), detectCanDevice(), doStartCranking(), efiExtiEnablePin(), extiTriggerTurnOnInputPin(), initElectronicThrottle(), OutputPin::initPin(), initQcBenchControls(), initWave(), onConfigurationChangeTriggerCallback(), printGpsInfo(), printMmcPinout(), printOutPin(), printSpiConfig(), printTsStats(), readPin(), runBench(), setIgnitionPin(), setIndividualPin(), setLogicInputPin(), setTriggerInputPin(), setTriggerSimulatorPin(), startCanPins(), startPwm(), triggerInfo(), and turnOnTriggerInputPin().
|
static |
Definition at line 132 of file pin_repository.cpp.
Referenced by reportPins().
void initPinRepository | ( | void | ) |
this method cannot use console because this method is invoked before console is initialized
Definition at line 249 of file pin_repository.cpp.
Referenced by initHardwareNoConfig().
bool isBrainPinValid | ( | brain_pin_e | brainPin | ) |
Definition at line 25 of file pin_repository.cpp.
Referenced by applyIACposition(), boardGetAnalogDiagnostic(), cdmIonInit(), NitrousController::checkTriggerPinState(), FrequencySensor::deInit(), HellaOilLevelSensor::deInit(), OutputPin::deInit(), deInitFlexSensor(), directWritePad(), efiExtiDisablePin(), efiExtiEnablePin(), efiReadPin(), efiSetPadMode(), getAdcChannelForTrigger(), getBrakePedalState(), getClutchDownState(), getClutchUpState(), getHwPin(), getHwPort(), TriggerCentral::handleShaftSignal(), handleVvtCamSignal(), hasAcToggle(), TachometerModule::init(), GenericGearController::init(), HellaOilLevelSensor::init(), BitbangI2c::init(), initAccelerometer(), initAlternatorCtrl(), initAuxValves(), initBoostCtrl(), initDac(), initGpPwm(), StepDirectionStepper::initialize(), FrequencySensor::initIfValid(), OutputPin::initPin(), initPotentiometers(), initSmartGpio(), initSpeedometer(), initVrThresholdPwm(), initWave(), isBoostControlSolenoidMode(), isGpsEnabled(), isIgnVoltage(), AntilagSystemBase::isInsideALSSwitchCondition(), LaunchControlBase::isInsideSwitchCondition(), isMilEnabled(), isSdCardEnabled(), lua_getAuxDigital(), lua_readpin(), onConfigurationChangeTriggerCallback(), onEcuStartDoSomethingTriggerInputPins(), AlternatorController::onFastCallback(), HarleyAcr::onSlowCallback(), SensorChecker::onSlowCallback(), printOutPin(), recalculateAuxValveTiming(), OutputPin::setValue(), startBoostPin(), startCanPins(), startSent(), startSerialChannels(), startTriggerEmulatorPins(), ButtonDebounce::stopConfiguration(), stopLogicAnalyzerPins(), stopSent(), triggerInfo(), turnOnTriggerInputPin(), turnVvtPidOn(), GenericGearController::update(), ShiftTorqueReductionController::updateTriggerPinState(), updateVrThresholdPwm(), validateConfigOnStartUpOrBurn(), and validateTriggerInputs().
void pinDiag2string | ( | char * | buffer, |
size_t | size, | ||
brain_pin_diag_e | pin_diag | ||
) |
Definition at line 115 of file pin_repository.cpp.
Referenced by benchOff(), SensorChecker::onSlowCallback(), and reportPins().
|
static |
Definition at line 140 of file pin_repository.cpp.
Referenced by initPinRepository().
PinRepository pinRepository CCM_OPTIONAL |
Definition at line 14 of file pin_repository.cpp.
|
static |
Definition at line 97 of file pin_repository.cpp.
Referenced by hwOnChipPhysicalPinName(), hwPhysicalPinName(), and PinRepository::PinRepository().
|
static |
Definition at line 96 of file pin_repository.cpp.
Referenced by hwOnChipPhysicalPinName(), hwPhysicalPinName(), and PinRepository::PinRepository().