aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorMathisDerooNXP <[email protected]>2025-11-26 10:05:16 -0800
committerGitHub <[email protected]>2025-11-26 10:05:16 -0800
commitd12bc9785399991065e511efbea34f0138c7645e (patch)
tree47472365383c3a5ad5d4ab0495e655a3418477d9 /src/config.rs
parent1efaaa4025120413ec17de90106244445208804a (diff)
Add GPIO interrupt support and embedded-hal-async trait implementation (#38)
* Add GPIO interrupt support and embedded-hal-async trait implementation Signed-off-by: Mathis Deroo <[email protected]> * Run cargo fmt * Improve GPIO driver interrupt mechanism and example - GPIO interrupt managed internally at the HAL level, - Renamed and cleaned gpio_interrupt example; now button_async.rs, - Use BitIter instead of simple for loop in the irq handler, - Fix comments and add "rt" wrappen to GPIO IRQ handler. Signed-off-by: Mathis Deroo <[email protected]> * Modify INTERRUPT_DETECTED (AtomicBool to AtomicU32) to work with pin number and not only port number interrupt Signed-off-by: Mathis Deroo <[email protected]> * add embedded_hal_async::digital::* traits Signed-off-by: Mathis Deroo <[email protected]> * Update irq_handler with BitIter loop Co-authored-by: Felipe Balbi <[email protected]> * Add suggested changes Signed-off-by: Mathis Deroo <[email protected]> * cargo fmt Signed-off-by: Felipe Balbi <[email protected]> * WIP: Modify Wakers from AtomicWaker to WaitMap, with pin number (per PORT) as key Signed-off-by: Mathis Deroo <[email protected]> * Tweak maitake-sync usage * Improve docs * refactor a bit * Move all of the async+interrupt stuff into a module * Remove defmt debug traces Signed-off-by: Mathis Deroo <[email protected]> * cargo vet * Move e-hal-async impls into the gated block * "rt", begone! --------- Signed-off-by: Mathis Deroo <[email protected]> Signed-off-by: Felipe Balbi <[email protected]> Co-authored-by: Felipe Balbi <[email protected]> Co-authored-by: Felipe Balbi <[email protected]> Co-authored-by: Felipe Balbi <[email protected]> Co-authored-by: James Munns <[email protected]>
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 9c0d47ecb..8d52a1d44 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -9,6 +9,7 @@ pub struct Config {
9 pub time_interrupt_priority: Priority, 9 pub time_interrupt_priority: Priority,
10 pub rtc_interrupt_priority: Priority, 10 pub rtc_interrupt_priority: Priority,
11 pub adc_interrupt_priority: Priority, 11 pub adc_interrupt_priority: Priority,
12 pub gpio_interrupt_priority: Priority,
12 pub clock_cfg: ClocksConfig, 13 pub clock_cfg: ClocksConfig,
13} 14}
14 15
@@ -19,6 +20,7 @@ impl Default for Config {
19 time_interrupt_priority: Priority::from(0), 20 time_interrupt_priority: Priority::from(0),
20 rtc_interrupt_priority: Priority::from(0), 21 rtc_interrupt_priority: Priority::from(0),
21 adc_interrupt_priority: Priority::from(0), 22 adc_interrupt_priority: Priority::from(0),
23 gpio_interrupt_priority: Priority::from(0),
22 clock_cfg: ClocksConfig::default(), 24 clock_cfg: ClocksConfig::default(),
23 } 25 }
24 } 26 }