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/rp/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/rp/src/bin/button.rs')
| -rw-r--r-- | examples/rp/src/bin/button.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/rp/src/bin/button.rs b/examples/rp/src/bin/button.rs index e9054fd48..4ad2ca3b7 100644 --- a/examples/rp/src/bin/button.rs +++ b/examples/rp/src/bin/button.rs | |||
| @@ -16,7 +16,7 @@ async fn main(_spawner: Spawner) { | |||
| 16 | 16 | ||
| 17 | // 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. |
| 18 | // You need to add your own button. | 18 | // You need to add your own button. |
| 19 | let mut button = Input::new(p.PIN_28, Pull::Up); | 19 | let button = Input::new(p.PIN_28, Pull::Up); |
| 20 | 20 | ||
| 21 | loop { | 21 | loop { |
| 22 | if button.is_high() { | 22 | if button.is_high() { |
