diff --git a/firmware/config/boards/hellen/hellen-honda-k/board_configuration.cpp b/firmware/config/boards/hellen/hellen-honda-k/board_configuration.cpp index f907f2f2ce..c90489e8d7 100644 --- a/firmware/config/boards/hellen/hellen-honda-k/board_configuration.cpp +++ b/firmware/config/boards/hellen/hellen-honda-k/board_configuration.cpp @@ -45,8 +45,6 @@ void onBoardStandBy() { hellenBoardStandBy(); } - - void setBoardConfigOverrides() { setHellenMegaEnPin(); setHellenVbatt(); diff --git a/firmware/config/boards/hellen/hellen_common.cpp b/firmware/config/boards/hellen/hellen_common.cpp index 2c3d3f43ad..e8bc238e87 100644 --- a/firmware/config/boards/hellen/hellen_common.cpp +++ b/firmware/config/boards/hellen/hellen_common.cpp @@ -43,12 +43,20 @@ void setHellen64Can() { static OutputPin megaEn; +void hellenEnableEn() { + megaEn.setValue(1); +} + +void hellenDisableEn() { + megaEn.setValue(0); +} + void setHellenEnPin(Gpio pin) { static bool initialized = false; if (!initialized) { initialized = true; megaEn.initPin("EN", pin); - megaEn.setValue(1); + hellenEnableEn(); } } @@ -63,7 +71,7 @@ void setHellen64MegaEnPin() { void hellenBoardStandBy() { // we need to turn 'megaEn' and pause for a bit to make sure that WBO is off and does not wake main firmware right away - megaEn.setValue(0); + hellenDisableEn(); // todo: 200ms is totally random what's the science for this sleep duration? chThdSleepMilliseconds(200); } diff --git a/firmware/config/boards/hellen_meta.h b/firmware/config/boards/hellen_meta.h index dc129f6c4c..ea6a56476f 100644 --- a/firmware/config/boards/hellen_meta.h +++ b/firmware/config/boards/hellen_meta.h @@ -16,6 +16,9 @@ void hellenWbo(); void setHellenMegaEnPin(); void setHellenEnPin(Gpio pin); void setHellen64MegaEnPin(); +void hellenEnableEn(); +void hellenDisableEn(); + void hellenBoardStandBy(); void hellenMegaAccelerometerPreInitCS2Pin(); void configureHellenCanTerminator();