mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 08:12:30 +00:00
nrf52840: fix naming of LED states in examples (#3304)
The LEDs on the nrf52840 DK are active low.
This commit is contained in:
parent
f0a8607051
commit
b277f42c9d
@ -35,8 +35,8 @@ async fn main(spawner: Spawner) {
|
|||||||
|
|
||||||
loop {
|
loop {
|
||||||
match CHANNEL.receive().await {
|
match CHANNEL.receive().await {
|
||||||
LedState::On => led.set_high(),
|
LedState::On => led.set_low(),
|
||||||
LedState::Off => led.set_low(),
|
LedState::Off => led.set_high(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,8 @@ async fn recv_task(led: AnyPin, receiver: Receiver<'static, NoopRawMutex, LedSta
|
|||||||
|
|
||||||
loop {
|
loop {
|
||||||
match receiver.receive().await {
|
match receiver.receive().await {
|
||||||
LedState::On => led.set_high(),
|
LedState::On => led.set_low(),
|
||||||
LedState::Off => led.set_low(),
|
LedState::Off => led.set_high(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user