Commit graph

10 commits

Author SHA1 Message Date
A. Gavin 993487443a
examples: clarify usage of boot2 section (#443) 2022-09-02 06:38:58 +01:00
Wilfried Chauveau 42e929d7e1
Use rp2040-hal in all example (possibly through their bsp) (#423)
* Use rp2040-hal in all example (possibly through their bsp)

Some of the examples were using the cortex_m_rt::entry method which
misses the device specific spinlock re-initialisation.

This commits makes the usage more consistent by using rp2040_hal exported
macro as the only `entry` method used across examples.
2022-08-21 19:01:45 +01:00
Wilfried Chauveau 51db37a4cb
replace cortex_m::interrupt::Mutex with critical_section::Mutex in examples (#422) 2022-08-21 19:00:57 +01:00
Jan Niehusmann d4743061fa Use generic boot loader for rp2040-hal examples
Those examples should be independent of a specific board.
The generic boot loader increases their compatibility.
2022-08-11 11:56:41 +00:00
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