boardTestModeJumperPin unassigned fix pull request
This commit is contained in:
parent
2ef37fd56b
commit
ab18bdd0e6
|
@ -374,14 +374,17 @@ void initHardware(Logging *l) {
|
||||||
initTriggerDecoder();
|
initTriggerDecoder();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
bool isBoardTestMode_b;
|
||||||
|
if (boardConfiguration->boardTestModeJumperPin != GPIO_UNASSIGNED) {
|
||||||
mySetPadMode2("board test", boardConfiguration->boardTestModeJumperPin,
|
mySetPadMode2("board test", boardConfiguration->boardTestModeJumperPin,
|
||||||
PAL_MODE_INPUT_PULLUP);
|
PAL_MODE_INPUT_PULLUP);
|
||||||
bool isBoardTestMode_b = (!palReadPad(getHwPort(boardConfiguration->boardTestModeJumperPin), getHwPin(boardConfiguration->boardTestModeJumperPin)));
|
isBoardTestMode_b = (!palReadPad(getHwPort(boardConfiguration->boardTestModeJumperPin), getHwPin(boardConfiguration->boardTestModeJumperPin)));
|
||||||
|
|
||||||
// we can now relese this pin, it is actually used as output sometimes
|
// we can now relese this pin, it is actually used as output sometimes
|
||||||
unmarkPin(boardConfiguration->boardTestModeJumperPin);
|
unmarkPin(boardConfiguration->boardTestModeJumperPin);
|
||||||
|
} else {
|
||||||
|
isBoardTestMode_b = false;
|
||||||
|
}
|
||||||
|
|
||||||
#if HAL_USE_ADC || defined(__DOXYGEN__)
|
#if HAL_USE_ADC || defined(__DOXYGEN__)
|
||||||
initAdcInputs(isBoardTestMode_b);
|
initAdcInputs(isBoardTestMode_b);
|
||||||
|
|
Loading…
Reference in New Issue