From 0865aa4d37d2635adb4166e9945319c64b08c01f Mon Sep 17 00:00:00 2001 From: rusefillc Date: Mon, 1 Apr 2024 21:33:05 -0400 Subject: [PATCH] enableBoardOnStartUp --- firmware/config/boards/hellen/hellen_common.cpp | 10 ++++++---- firmware/config/boards/hellen_meta.h | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/firmware/config/boards/hellen/hellen_common.cpp b/firmware/config/boards/hellen/hellen_common.cpp index 2aa466183d..b17cdeeb03 100644 --- a/firmware/config/boards/hellen/hellen_common.cpp +++ b/firmware/config/boards/hellen/hellen_common.cpp @@ -64,18 +64,20 @@ void hellenDisableEn() { megaEn.setValue(0); } -void setHellenEnPin(Gpio pin) { +void setHellenEnPin(Gpio pin, bool enableBoardOnStartUp) { static bool initialized = false; if (!initialized) { initialized = true; megaEn.initPin("EN", pin); - hellenEnableEn(); + if (enableBoardOnStartUp) { + hellenEnableEn(); + } } } -void setHellenMegaEnPin() { +void setHellenMegaEnPin(bool enableBoardOnStartUp) { // H144_GP8 matches MM100_GP8 is used as PWR_EN on early mm100 - setHellenEnPin(H144_GP8); // OUT_PWR_EN + setHellenEnPin(H144_GP8, enableBoardOnStartUp); // OUT_PWR_EN } void setHellen64MegaEnPin() { diff --git a/firmware/config/boards/hellen_meta.h b/firmware/config/boards/hellen_meta.h index d3227531cb..0302a9fce8 100644 --- a/firmware/config/boards/hellen_meta.h +++ b/firmware/config/boards/hellen_meta.h @@ -13,8 +13,8 @@ void hellenWbo(); -void setHellenMegaEnPin(); -void setHellenEnPin(Gpio pin); +void setHellenMegaEnPin(bool enableBoardOnStartUp = true); +void setHellenEnPin(Gpio pin, bool enableBoardOnStartUp = true); void setHellen64MegaEnPin(); bool getHellenBoardEnabled(); void hellenEnableEn();