diff options
| author | Adrian Friedli <[email protected]> | 2024-09-02 22:07:49 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-09-02 22:07:49 +0200 |
| commit | b277f42c9d681ce3c929858adffcefbdb7adabef (patch) | |
| tree | 11cb69cada0a83bd8c078bd107d16f0141e9e16e /examples/nrf52840/src/bin | |
| parent | f0a86070512ad739641cee7d9fa39d63f5c8a9f6 (diff) | |
nrf52840: fix naming of LED states in examples (#3304)
The LEDs on the nrf52840 DK are active low.
Diffstat (limited to 'examples/nrf52840/src/bin')
| -rw-r--r-- | examples/nrf52840/src/bin/channel.rs | 4 | ||||
| -rw-r--r-- | examples/nrf52840/src/bin/channel_sender_receiver.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/nrf52840/src/bin/channel.rs b/examples/nrf52840/src/bin/channel.rs index 7fcea9dbd..e06ba1c73 100644 --- a/examples/nrf52840/src/bin/channel.rs +++ b/examples/nrf52840/src/bin/channel.rs | |||
| @@ -35,8 +35,8 @@ async fn main(spawner: Spawner) { | |||
| 35 | 35 | ||
| 36 | loop { | 36 | loop { |
| 37 | match CHANNEL.receive().await { | 37 | match CHANNEL.receive().await { |
| 38 | LedState::On => led.set_high(), | 38 | LedState::On => led.set_low(), |
| 39 | LedState::Off => led.set_low(), | 39 | LedState::Off => led.set_high(), |
| 40 | } | 40 | } |
| 41 | } | 41 | } |
| 42 | } | 42 | } |
diff --git a/examples/nrf52840/src/bin/channel_sender_receiver.rs b/examples/nrf52840/src/bin/channel_sender_receiver.rs index 3095a04ec..29f70f91c 100644 --- a/examples/nrf52840/src/bin/channel_sender_receiver.rs +++ b/examples/nrf52840/src/bin/channel_sender_receiver.rs | |||
| @@ -33,8 +33,8 @@ async fn recv_task(led: AnyPin, receiver: Receiver<'static, NoopRawMutex, LedSta | |||
| 33 | 33 | ||
| 34 | loop { | 34 | loop { |
| 35 | match receiver.receive().await { | 35 | match receiver.receive().await { |
| 36 | LedState::On => led.set_high(), | 36 | LedState::On => led.set_low(), |
| 37 | LedState::Off => led.set_low(), | 37 | LedState::Off => led.set_high(), |
| 38 | } | 38 | } |
| 39 | } | 39 | } |
| 40 | } | 40 | } |
