hellen: please no calls to OS code on possible hardFault paths
only:uaefi
This commit is contained in:
parent
9dac54ad17
commit
a76f2e7380
|
@ -83,6 +83,12 @@ void hellenEnableEn(const char *msg) {
|
||||||
|
|
||||||
void hellenDisableEn(const char *msg) {
|
void hellenDisableEn(const char *msg) {
|
||||||
efiPrintf("Turning board off [%s]", msg);
|
efiPrintf("Turning board off [%s]", msg);
|
||||||
|
hellenDisableEnSilently();
|
||||||
|
}
|
||||||
|
|
||||||
|
void hellenDisableEnSilently() {
|
||||||
|
// this function is called from criticalShutdown() that may be called from hardFault handler
|
||||||
|
// please no call to OS functions!
|
||||||
setHellenEnValue(0);
|
setHellenEnValue(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ bool isBoardWithPowerManagement();
|
||||||
bool getHellenBoardEnabled();
|
bool getHellenBoardEnabled();
|
||||||
void hellenEnableEn(const char *msg = "");
|
void hellenEnableEn(const char *msg = "");
|
||||||
void hellenDisableEn(const char *msg = "");
|
void hellenDisableEn(const char *msg = "");
|
||||||
|
void hellenDisableEnSilently(); // this version is called by fatal error handler meaning no OS access
|
||||||
|
|
||||||
void hellenBoardStandBy();
|
void hellenBoardStandBy();
|
||||||
void hellenMegaSdWithAccelerometer();
|
void hellenMegaSdWithAccelerometer();
|
||||||
|
|
|
@ -847,7 +847,7 @@ void turnAllPinsOff() {
|
||||||
enginePins.fuelPumpRelay.setValue(false);
|
enginePins.fuelPumpRelay.setValue(false);
|
||||||
enginePins.checkEnginePin.setValue(true); // yes this one can go ON
|
enginePins.checkEnginePin.setValue(true); // yes this one can go ON
|
||||||
#if EFI_PROD_CODE && HW_HELLEN
|
#if EFI_PROD_CODE && HW_HELLEN
|
||||||
hellenDisableEn("fatal");
|
hellenDisableEnSilently();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif /* EFI_GPIO_HARDWARE */
|
#endif /* EFI_GPIO_HARDWARE */
|
||||||
|
|
Loading…
Reference in New Issue