diff options
| author | Dario Nieuwenhuis <[email protected]> | 2020-11-08 17:38:45 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2020-11-08 17:38:45 +0100 |
| commit | def225b9826d9dbb89f7f66e4e49cf963c087b24 (patch) | |
| tree | 883dede7d420d94ced493f9a14bb6dd9bf75c08b /examples | |
| parent | b40e09d502208b8c9fe2d35c63065bb82417ff89 (diff) | |
gpiote: better naming
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/src/bin/gpiote.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/src/bin/gpiote.rs b/examples/src/bin/gpiote.rs index d8394155d..edc3f5ef1 100644 --- a/examples/src/bin/gpiote.rs +++ b/examples/src/bin/gpiote.rs | |||
| @@ -24,7 +24,7 @@ async fn run() { | |||
| 24 | 24 | ||
| 25 | let pin1 = port0.p0_11.into_pullup_input().degrade(); | 25 | let pin1 = port0.p0_11.into_pullup_input().degrade(); |
| 26 | let button1 = async { | 26 | let button1 = async { |
| 27 | let ch = unwrap!(g.new_input_channel(pin1, gpiote::EventPolarity::HiToLo)); | 27 | let ch = unwrap!(g.new_input_channel(pin1, gpiote::InputChannelPolarity::HiToLo)); |
| 28 | 28 | ||
| 29 | loop { | 29 | loop { |
| 30 | ch.wait().await; | 30 | ch.wait().await; |
| @@ -34,7 +34,7 @@ async fn run() { | |||
| 34 | 34 | ||
| 35 | let pin2 = port0.p0_12.into_pullup_input().degrade(); | 35 | let pin2 = port0.p0_12.into_pullup_input().degrade(); |
| 36 | let button2 = async { | 36 | let button2 = async { |
| 37 | let ch = unwrap!(g.new_input_channel(pin2, gpiote::EventPolarity::LoToHi)); | 37 | let ch = unwrap!(g.new_input_channel(pin2, gpiote::InputChannelPolarity::LoToHi)); |
| 38 | 38 | ||
| 39 | loop { | 39 | loop { |
| 40 | ch.wait().await; | 40 | ch.wait().await; |
| @@ -44,7 +44,7 @@ async fn run() { | |||
| 44 | 44 | ||
| 45 | let pin3 = port0.p0_24.into_pullup_input().degrade(); | 45 | let pin3 = port0.p0_24.into_pullup_input().degrade(); |
| 46 | let button3 = async { | 46 | let button3 = async { |
| 47 | let ch = unwrap!(g.new_input_channel(pin3, gpiote::EventPolarity::Toggle)); | 47 | let ch = unwrap!(g.new_input_channel(pin3, gpiote::InputChannelPolarity::Toggle)); |
| 48 | 48 | ||
| 49 | loop { | 49 | loop { |
| 50 | ch.wait().await; | 50 | ch.wait().await; |
| @@ -54,7 +54,7 @@ async fn run() { | |||
| 54 | 54 | ||
| 55 | let pin4 = port0.p0_25.into_pullup_input().degrade(); | 55 | let pin4 = port0.p0_25.into_pullup_input().degrade(); |
| 56 | let button4 = async { | 56 | let button4 = async { |
| 57 | let ch = unwrap!(g.new_input_channel(pin4, gpiote::EventPolarity::Toggle)); | 57 | let ch = unwrap!(g.new_input_channel(pin4, gpiote::InputChannelPolarity::Toggle)); |
| 58 | 58 | ||
| 59 | loop { | 59 | loop { |
| 60 | ch.wait().await; | 60 | ch.wait().await; |
