diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-01-09 23:58:26 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2024-01-10 00:00:10 +0100 |
| commit | 495b8b739aaba3d1fe7e105559c830496fabb1d7 (patch) | |
| tree | 6cc6597e9dfa6ac75736ebd4be4a63ca4b546771 /examples/stm32f7/src/bin/button.rs | |
| parent | 67ed134479886023ec133a3a95074972e6d83236 (diff) | |
Change GPIO inherent methods back to `&self`.
With the embedded-hal rc3 update I changed them to require `&mut self`, but
in retrospect I think `&self` is better, for extra flexibility.
This PR reverts the changes from the rc3 update to inherent methods.
Diffstat (limited to 'examples/stm32f7/src/bin/button.rs')
| -rw-r--r-- | examples/stm32f7/src/bin/button.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/stm32f7/src/bin/button.rs b/examples/stm32f7/src/bin/button.rs index ad30a56a2..564908998 100644 --- a/examples/stm32f7/src/bin/button.rs +++ b/examples/stm32f7/src/bin/button.rs | |||
| @@ -12,7 +12,7 @@ fn main() -> ! { | |||
| 12 | 12 | ||
| 13 | let p = embassy_stm32::init(Default::default()); | 13 | let p = embassy_stm32::init(Default::default()); |
| 14 | 14 | ||
| 15 | let mut button = Input::new(p.PC13, Pull::Down); | 15 | let button = Input::new(p.PC13, Pull::Down); |
| 16 | let mut led1 = Output::new(p.PB0, Level::High, Speed::Low); | 16 | let mut led1 = Output::new(p.PB0, Level::High, Speed::Low); |
| 17 | let _led2 = Output::new(p.PB7, Level::High, Speed::Low); | 17 | let _led2 = Output::new(p.PB7, Level::High, Speed::Low); |
| 18 | let mut led3 = Output::new(p.PB14, Level::High, Speed::Low); | 18 | let mut led3 = Output::new(p.PB14, Level::High, Speed::Low); |
