better invalid configuration handling
This commit is contained in:
parent
824465ed5e
commit
f93ac0751d
|
@ -849,6 +849,6 @@ int getRusEfiVersion(void) {
|
|||
if (initBootloader() != 0)
|
||||
return 123;
|
||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||
return 201200225;
|
||||
return 201200305;
|
||||
}
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
|
|
@ -421,7 +421,10 @@ void OutputPin::initPin(const char *msg, brain_pin_e brainPin, const pin_output_
|
|||
if (brainPin == GPIO_UNASSIGNED)
|
||||
return;
|
||||
|
||||
assertOMode(*outputMode);
|
||||
if (*outputMode > OM_OPENDRAIN_INVERTED) {
|
||||
firmwareError(CUSTOM_INVALID_MODE_SETTING, "%s invalid pin_output_mode_e", msg);
|
||||
return;
|
||||
}
|
||||
iomode_t mode = (*outputMode == OM_DEFAULT || *outputMode == OM_INVERTED) ?
|
||||
PAL_MODE_OUTPUT_PUSHPULL : PAL_MODE_OUTPUT_OPENDRAIN;
|
||||
|
||||
|
|
Loading…
Reference in New Issue