enableBoardOnStartUp

This commit is contained in:
rusefillc 2024-04-01 21:33:05 -04:00
parent d74c27143c
commit 0865aa4d37
2 changed files with 8 additions and 6 deletions

View File

@ -64,18 +64,20 @@ void hellenDisableEn() {
megaEn.setValue(0); megaEn.setValue(0);
} }
void setHellenEnPin(Gpio pin) { void setHellenEnPin(Gpio pin, bool enableBoardOnStartUp) {
static bool initialized = false; static bool initialized = false;
if (!initialized) { if (!initialized) {
initialized = true; initialized = true;
megaEn.initPin("EN", pin); megaEn.initPin("EN", pin);
if (enableBoardOnStartUp) {
hellenEnableEn(); hellenEnableEn();
} }
} }
}
void setHellenMegaEnPin() { void setHellenMegaEnPin(bool enableBoardOnStartUp) {
// H144_GP8 matches MM100_GP8 is used as PWR_EN on early mm100 // 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() { void setHellen64MegaEnPin() {

View File

@ -13,8 +13,8 @@
void hellenWbo(); void hellenWbo();
void setHellenMegaEnPin(); void setHellenMegaEnPin(bool enableBoardOnStartUp = true);
void setHellenEnPin(Gpio pin); void setHellenEnPin(Gpio pin, bool enableBoardOnStartUp = true);
void setHellen64MegaEnPin(); void setHellen64MegaEnPin();
bool getHellenBoardEnabled(); bool getHellenBoardEnabled();
void hellenEnableEn(); void hellenEnableEn();