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);
}
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() {

View File

@ -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();