forked from M-Labs/kirdy
ld: Block pwr on request if alarm is asserted
- Align the alarm and pwr up behavior with thermostat temp_mon
This commit is contained in:
parent
201148fb21
commit
3f9a4bf140
@ -211,6 +211,7 @@ impl LdPwrExcProtector {
|
|||||||
|
|
||||||
pub fn pwr_on_and_arm_protection() {
|
pub fn pwr_on_and_arm_protection() {
|
||||||
if let Some(ref mut wdg) = LdPwrExcProtector::get() {
|
if let Some(ref mut wdg) = LdPwrExcProtector::get() {
|
||||||
|
if !wdg.alarm_status.pwr_excursion {
|
||||||
wdg.alarm_status = Status::default();
|
wdg.alarm_status = Status::default();
|
||||||
LdPwrExcProtector::clear_interrupt_bit();
|
LdPwrExcProtector::clear_interrupt_bit();
|
||||||
LdPwrExcProtector::pwr_on();
|
LdPwrExcProtector::pwr_on();
|
||||||
@ -219,6 +220,7 @@ impl LdPwrExcProtector {
|
|||||||
LdPwrExcProtector::enable_watchdog_interrupt();
|
LdPwrExcProtector::enable_watchdog_interrupt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn clear_alarm_status() {
|
pub fn clear_alarm_status() {
|
||||||
if let Some(ref mut wdg) = LdPwrExcProtector::get() {
|
if let Some(ref mut wdg) = LdPwrExcProtector::get() {
|
||||||
|
Loading…
Reference in New Issue
Block a user