Commit graph

6 commits

Author SHA1 Message Date
Jan Niehusmann 44019781e2 Use wfi in otherwise empty infinite loops in examples
- Clippy warns about empty loops, https://github.com/rust-lang/rust-clippy/issues/6161
- wfi allows to CPU to save some power

WFI was avoided in examples for fear of ill interactions with debuggers.
However the rp2040 debug port does continue to work, as long as the
relevant clocks are not disabled in SLEEP_EN0/SLEEP_EN1. (By default,
all clocks stay enabled in sleep mode.)

This patch replaces several different workarounds with just calling wfi.
2022-08-01 14:54:03 +00:00
9names c7acafda3c
GPIO IRQ example: add check for interrupt source (#401) 2022-07-28 10:14:20 +10:00
mqy 623457a498 fixed typos 2022-04-30 12:51:45 +10:00
9names 8063882801
Add note about #[interrupt] mut -> &mut transform
Co-authored-by: Jan Niehusmann <github@gondor.com>
2022-02-16 22:48:52 +11:00
9names 35875c8756 Store pins together in a tuple to reduce boilerplate 2022-02-15 20:17:18 +11:00
9names 44a9b0f541 Add GPIO interrupt example 2022-02-14 22:47:46 +11:00