mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-10-02 14:44:32 +00:00
rustfmt
This commit is contained in:
parent
ff5f5021fb
commit
de08da0bf1
@ -15,7 +15,7 @@ use gpio::{AnyPin, Level, Output};
|
|||||||
use {defmt_rtt as _, panic_probe as _};
|
use {defmt_rtt as _, panic_probe as _};
|
||||||
|
|
||||||
enum LedState {
|
enum LedState {
|
||||||
Toggle,
|
Toggle,
|
||||||
}
|
}
|
||||||
static CHANNEL: Channel<ThreadModeRawMutex, LedState, 64> = Channel::new();
|
static CHANNEL: Channel<ThreadModeRawMutex, LedState, 64> = Channel::new();
|
||||||
|
|
||||||
@ -28,7 +28,10 @@ async fn main(spawner: Spawner) {
|
|||||||
let k = 1.003;
|
let k = 1.003;
|
||||||
|
|
||||||
unwrap!(spawner.spawn(toggle_led(CHANNEL.sender(), Duration::from_nanos(dt))));
|
unwrap!(spawner.spawn(toggle_led(CHANNEL.sender(), Duration::from_nanos(dt))));
|
||||||
unwrap!(spawner.spawn(toggle_led(CHANNEL.sender(), Duration::from_nanos((dt as f64 * k) as u64))));
|
unwrap!(spawner.spawn(toggle_led(
|
||||||
|
CHANNEL.sender(),
|
||||||
|
Duration::from_nanos((dt as f64 * k) as u64)
|
||||||
|
)));
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
match CHANNEL.receive().await {
|
match CHANNEL.receive().await {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user