From 0aeffdbf7b69e08af4497c3775d644f48fcb4cae Mon Sep 17 00:00:00 2001 From: linuswck Date: Tue, 10 Sep 2024 15:23:14 +0800 Subject: [PATCH] ld_pwr_exc_protector: disable irq after pwr off -setting 0V threshold during power off might trigger IRQ --- src/laser_diode/ld_pwr_exc_protector.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/laser_diode/ld_pwr_exc_protector.rs b/src/laser_diode/ld_pwr_exc_protector.rs index 1494909..4a9259d 100644 --- a/src/laser_diode/ld_pwr_exc_protector.rs +++ b/src/laser_diode/ld_pwr_exc_protector.rs @@ -270,7 +270,8 @@ impl LdPwrExcProtector { pub fn pwr_off() { if let Some(ref mut wdg) = LdPwrExcProtector::get() { wdg.alarm_status.pwr_engaged = false; - wdg.phy.pwr_en_ch0.set_low() + wdg.phy.pwr_en_ch0.set_low(); + LdPwrExcProtector::disable_watchdog_interrupt(); } }