diff options
| author | sodo <[email protected]> | 2024-01-02 01:37:00 +0900 |
|---|---|---|
| committer | sodo <[email protected]> | 2024-01-02 13:34:22 +0900 |
| commit | 6ee153a3e2eec284c0d9d87f31801265c0604f74 (patch) | |
| tree | 8b801cbd15f9ad5052d5942c731e75736dc9d7eb /examples/rp/src/bin/button.rs | |
| parent | b7cd7952c890f585ff876c622482534e5d58d4a4 (diff) | |
| parent | 0be9b0599aaf2e425d76ec7852ff4b3535defddf (diff) | |
Merge remote-tracking branch 'origin'
Diffstat (limited to 'examples/rp/src/bin/button.rs')
| -rw-r--r-- | examples/rp/src/bin/button.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/rp/src/bin/button.rs b/examples/rp/src/bin/button.rs index d7aa89410..e9054fd48 100644 --- a/examples/rp/src/bin/button.rs +++ b/examples/rp/src/bin/button.rs | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | #![no_std] | 5 | #![no_std] |
| 6 | #![no_main] | 6 | #![no_main] |
| 7 | #![feature(type_alias_impl_trait)] | ||
| 8 | 7 | ||
| 9 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 10 | use embassy_rp::gpio::{Input, Level, Output, Pull}; | 9 | use embassy_rp::gpio::{Input, Level, Output, Pull}; |
| @@ -17,7 +16,7 @@ async fn main(_spawner: Spawner) { | |||
| 17 | 16 | ||
| 18 | // Use PIN_28, Pin34 on J0 for RP Pico, as a input. | 17 | // Use PIN_28, Pin34 on J0 for RP Pico, as a input. |
| 19 | // You need to add your own button. | 18 | // You need to add your own button. |
| 20 | let button = Input::new(p.PIN_28, Pull::Up); | 19 | let mut button = Input::new(p.PIN_28, Pull::Up); |
| 21 | 20 | ||
| 22 | loop { | 21 | loop { |
| 23 | if button.is_high() { | 22 | if button.is_high() { |
