From 5efbff009875d7b9ab84bdeddf1d5a778fe29da4 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 17 Mar 2023 02:24:57 +0800 Subject: [PATCH] add note about GPIO usage vs WFI mode --- services/llio/src/llio_lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/llio/src/llio_lib.rs b/services/llio/src/llio_lib.rs index 99fea634f..38acae1e5 100644 --- a/services/llio/src/llio_lib.rs +++ b/services/llio/src/llio_lib.rs @@ -185,8 +185,10 @@ impl Llio { Message::new_scalar(Opcode::EventComEnable.to_usize().unwrap(), arg, 0, 0, 0) ).map(|_| ()) } - // GPIO IRQ hooks + /// GPIO IRQ hook. When using this, ensure that the WFI power saving mode is turned off. + /// Otherwise interrupts that hit during power save mode can be missed. pub fn hook_gpio_event_callback(&mut self, id: u32, cid: CID) -> Result<(), xous::Error> { + log::info!("If relying on GPIO interrupts, WFI power saving must be turned off. Interrupts that hit while powersaving can be missed."); if self.gpio_sid.is_none() { let sid = xous::create_server().unwrap(); self.gpio_sid = Some(sid);