setHellenEnValue

only:uaefi
This commit is contained in:
rusefillc 2024-11-08 11:24:06 -05:00
parent 90d6663ebd
commit 7f16ada87d
1 changed files with 11 additions and 4 deletions

View File

@ -64,16 +64,23 @@ static bool hellenEnPinInitialized = false;
return !getHellenBoardEnabled();
}
PUBLIC_API_WEAK void onHellenEnChange(int value) {
}
static void setHellenEnValue(int value) {
megaEn.setValue(value, /*isForce*/ true);
onHellenEnChange(value);
AdcSubscription::ResetFilters();
}
void hellenEnableEn(const char *msg) {
efiPrintf("Turning board ON [%s]", msg);
megaEn.setValue(1, /*isForce*/ true);
AdcSubscription::ResetFilters();
setHellenEnValue(1);
}
void hellenDisableEn(const char *msg) {
efiPrintf("Turning board off [%s]", msg);
megaEn.setValue(0, /*isForce*/ true);
AdcSubscription::ResetFilters();
setHellenEnValue(0);
}
void setHellenEnPin(Gpio pin, bool enableBoardOnStartUp) {