mirror of https://github.com/FOME-Tech/fome-fw.git
fix (#865)
This commit is contained in:
parent
cbfc23155c
commit
97fd982374
|
@ -468,9 +468,12 @@ void OutputPin::initPin(const char *msg, brain_pin_e brainPin, const pin_output_
|
|||
|
||||
this->currentLogicValue = INITIAL_PIN_STATE;
|
||||
|
||||
efiSetPadMode(msg, brainPin, mode);
|
||||
|
||||
// The order of the next two calls may look strange, which is a good observation.
|
||||
// We call them in this order so that the pin is set to a known state BEFORE
|
||||
// it's enabled. Enabling the pin then setting it could result in a (brief)
|
||||
// mystery state being driven on the pin (potentially dangerous).
|
||||
setDefaultPinState(outputMode);
|
||||
efiSetPadMode(msg, brainPin, mode);
|
||||
#endif /* EFI_GPIO_HARDWARE */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue