diff options
| author | Bogdan Petru Chircu Mare <[email protected]> | 2025-12-01 20:46:22 -0800 |
|---|---|---|
| committer | Bogdan Petru Chircu Mare <[email protected]> | 2025-12-01 20:46:22 -0800 |
| commit | 6a1eed83b9df8ffa81b93860f530f5bb3252d996 (patch) | |
| tree | f6d389efa7de2f1a0c5ab8c304718cd3f5fe68ce /examples/src/bin/button_async.rs | |
| parent | a18cf2fd0d8158f4b1f24f8982e187477b58267c (diff) | |
| parent | 717346f21a4cf4993c2a1f046e26b6bf647d89cb (diff) | |
Merge upstream/main to incorporate LPUART constructor refactor (#51) and GPIO Drive/Slew fix (#57)
Diffstat (limited to 'examples/src/bin/button_async.rs')
| -rw-r--r-- | examples/src/bin/button_async.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/src/bin/button_async.rs b/examples/src/bin/button_async.rs index 1ecec2e48..6cc7b62cd 100644 --- a/examples/src/bin/button_async.rs +++ b/examples/src/bin/button_async.rs | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | use embassy_executor::Spawner; | 4 | use embassy_executor::Spawner; |
| 5 | use embassy_time::Timer; | 5 | use embassy_time::Timer; |
| 6 | use hal::gpio::{DriveStrength, Input, Pull, SlewRate}; | 6 | use hal::gpio::{Input, Pull}; |
| 7 | use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _}; | 7 | use {defmt_rtt as _, embassy_mcxa as hal, panic_probe as _}; |
| 8 | 8 | ||
| 9 | #[embassy_executor::main] | 9 | #[embassy_executor::main] |
| @@ -13,7 +13,8 @@ async fn main(_spawner: Spawner) { | |||
| 13 | defmt::info!("GPIO interrupt example"); | 13 | defmt::info!("GPIO interrupt example"); |
| 14 | 14 | ||
| 15 | // This button is labeled "WAKEUP" on the FRDM-MCXA276 | 15 | // This button is labeled "WAKEUP" on the FRDM-MCXA276 |
| 16 | let mut pin = Input::new(p.P1_7, Pull::Up, DriveStrength::Normal, SlewRate::Fast); | 16 | // The board already has a 10K pullup |
| 17 | let mut pin = Input::new(p.P1_7, Pull::Disabled); | ||
| 17 | 18 | ||
| 18 | let mut press_count = 0u32; | 19 | let mut press_count = 0u32; |
| 19 | 20 | ||
