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/stm32l4/src/bin/button.rs | |
| parent | b7cd7952c890f585ff876c622482534e5d58d4a4 (diff) | |
| parent | 0be9b0599aaf2e425d76ec7852ff4b3535defddf (diff) | |
Merge remote-tracking branch 'origin'
Diffstat (limited to 'examples/stm32l4/src/bin/button.rs')
| -rw-r--r-- | examples/stm32l4/src/bin/button.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/stm32l4/src/bin/button.rs b/examples/stm32l4/src/bin/button.rs index 73b1962e8..15288c61e 100644 --- a/examples/stm32l4/src/bin/button.rs +++ b/examples/stm32l4/src/bin/button.rs | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | #![no_std] | 1 | #![no_std] |
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | ||
| 4 | 3 | ||
| 5 | use defmt::*; | 4 | use defmt::*; |
| 6 | use embassy_stm32::gpio::{Input, Pull}; | 5 | use embassy_stm32::gpio::{Input, Pull}; |
| @@ -12,7 +11,7 @@ fn main() -> ! { | |||
| 12 | 11 | ||
| 13 | let p = embassy_stm32::init(Default::default()); | 12 | let p = embassy_stm32::init(Default::default()); |
| 14 | 13 | ||
| 15 | let button = Input::new(p.PC13, Pull::Up); | 14 | let mut button = Input::new(p.PC13, Pull::Up); |
| 16 | 15 | ||
| 17 | loop { | 16 | loop { |
| 18 | if button.is_high() { | 17 | if button.is_high() { |
