From fd3807c54696720d4e5c582c8b3dd65ab676cda2 Mon Sep 17 00:00:00 2001 From: John Gallagher Date: Fri, 28 Oct 2022 11:42:24 -0400 Subject: [PATCH] Flip low/high on SP -> host interupt GPIO (#883) --- task/host-sp-comms/src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/task/host-sp-comms/src/main.rs b/task/host-sp-comms/src/main.rs index 43efdb2bb..fc038d768 100644 --- a/task/host-sp-comms/src/main.rs +++ b/task/host-sp-comms/src/main.rs @@ -165,10 +165,12 @@ impl ServerImpl { fn set_status_impl(&mut self, status: Status) { if status != self.status { self.status = status; + // SP_TO_SP3_INT_L: `INT_L` is "interrupt low", so we assert the pin + // when we do not have status and deassert it when we do. if self.status.is_empty() { - self.sys.gpio_reset(SP_TO_SP3_INT_L).unwrap_lite(); - } else { self.sys.gpio_set(SP_TO_SP3_INT_L).unwrap_lite(); + } else { + self.sys.gpio_reset(SP_TO_SP3_INT_L).unwrap_lite(); } } } @@ -851,7 +853,7 @@ cfg_if::cfg_if! { } fn sp_to_sp3_interrupt_enable(sys: &sys_api::Sys) { - sys.gpio_reset(SP_TO_SP3_INT_L).unwrap(); + sys.gpio_set(SP_TO_SP3_INT_L).unwrap(); sys.gpio_configure_output( SP_TO_SP3_INT_L,