diff options
| author | MathisDerooNXP <[email protected]> | 2025-11-26 10:05:16 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-26 10:05:16 -0800 |
| commit | d12bc9785399991065e511efbea34f0138c7645e (patch) | |
| tree | 47472365383c3a5ad5d4ab0495e655a3418477d9 /Cargo.toml | |
| parent | 1efaaa4025120413ec17de90106244445208804a (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 'Cargo.toml')
| -rw-r--r-- | Cargo.toml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Cargo.toml b/Cargo.toml index cda340d02..96b7d6b0f 100644 --- a/Cargo.toml +++ b/Cargo.toml | |||
| @@ -9,7 +9,8 @@ categories = ["embedded", "hardware-support", "no-std"] | |||
| 9 | 9 | ||
| 10 | [dependencies] | 10 | [dependencies] |
| 11 | cortex-m = { version = "0.7", features = ["critical-section-single-core"] } | 11 | cortex-m = { version = "0.7", features = ["critical-section-single-core"] } |
| 12 | cortex-m-rt = { version = "0.7" } | 12 | # If you would like "device" to be an optional feature, please open an issue. |
| 13 | cortex-m-rt = { version = "0.7", features = ["device"] } | ||
| 13 | critical-section = "1.2.0" | 14 | critical-section = "1.2.0" |
| 14 | defmt = { version = "1.0", optional = true } | 15 | defmt = { version = "1.0", optional = true } |
| 15 | embassy-embedded-hal = "0.5.0" | 16 | embassy-embedded-hal = "0.5.0" |
| @@ -25,6 +26,7 @@ heapless = "0.8" | |||
| 25 | mcxa-pac = { git = "https://github.com/OpenDevicePartnership/mcxa-pac", features = ["rt", "critical-section"], version = "0.1.0" } | 26 | mcxa-pac = { git = "https://github.com/OpenDevicePartnership/mcxa-pac", features = ["rt", "critical-section"], version = "0.1.0" } |
| 26 | nb = "1.1.0" | 27 | nb = "1.1.0" |
| 27 | paste = "1.0.15" | 28 | paste = "1.0.15" |
| 29 | maitake-sync = { version = "0.2.2", default-features = false, features = ["critical-section", "no-cache-pad"] } | ||
| 28 | 30 | ||
| 29 | # `time` dependencies | 31 | # `time` dependencies |
| 30 | embassy-time = { version = "0.5.0", optional = true } | 32 | embassy-time = { version = "0.5.0", optional = true } |
| @@ -37,8 +39,6 @@ default = [] | |||
| 37 | # Use with one logger feature: defmt-rtt (preferred) or defmt-uart (fallback) | 39 | # Use with one logger feature: defmt-rtt (preferred) or defmt-uart (fallback) |
| 38 | defmt = ["dep:defmt", "mcxa-pac/defmt"] | 40 | defmt = ["dep:defmt", "mcxa-pac/defmt"] |
| 39 | 41 | ||
| 40 | rt = ["cortex-m-rt/device"] | ||
| 41 | |||
| 42 | unstable-pac = [] | 42 | unstable-pac = [] |
| 43 | 43 | ||
| 44 | # Embassy time | 44 | # Embassy time |
