diff options
| author | James Munns <[email protected]> | 2025-11-29 16:07:30 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-11-29 16:07:30 +0100 |
| commit | 3b239cb6de22b7bb8c2d87defb3205294653be7a (patch) | |
| tree | 36690f9553c2e37007c6a61c40d919e3ad2c8c94 /examples/src/bin/button_async.rs | |
| parent | 87c4eaf3380505ca15ef7ed1d5dc435e9af2200e (diff) | |
Remove Drive/Slew settings for Input pin (#57)
* Don't set slew+strength for inputs
* Update example
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 | ||
