mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
add note about GPIO usage vs WFI mode
This commit is contained in:
parent
d413100102
commit
5efbff0098
1 changed files with 3 additions and 1 deletions
|
|
@ -185,8 +185,10 @@ impl Llio {
|
||||||
Message::new_scalar(Opcode::EventComEnable.to_usize().unwrap(), arg, 0, 0, 0)
|
Message::new_scalar(Opcode::EventComEnable.to_usize().unwrap(), arg, 0, 0, 0)
|
||||||
).map(|_| ())
|
).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> {
|
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() {
|
if self.gpio_sid.is_none() {
|
||||||
let sid = xous::create_server().unwrap();
|
let sid = xous::create_server().unwrap();
|
||||||
self.gpio_sid = Some(sid);
|
self.gpio_sid = Some(sid);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue