Formatting. Always formatting.
This commit is contained in:
parent
7fa3b27cac
commit
fd7a76c59e
1 changed files with 4 additions and 4 deletions
|
@ -8,12 +8,12 @@
|
||||||
mod example_common;
|
mod example_common;
|
||||||
use embassy::executor::Spawner;
|
use embassy::executor::Spawner;
|
||||||
use embassy::time::{Duration, Timer};
|
use embassy::time::{Duration, Timer};
|
||||||
|
use embassy::traits::rng::Random as _;
|
||||||
use embassy_stm32::gpio::{Level, Output, Speed};
|
use embassy_stm32::gpio::{Level, Output, Speed};
|
||||||
|
use embassy_stm32::rng::Random;
|
||||||
use embassy_stm32::Peripherals;
|
use embassy_stm32::Peripherals;
|
||||||
use embedded_hal::digital::v2::OutputPin;
|
use embedded_hal::digital::v2::OutputPin;
|
||||||
use example_common::*;
|
use example_common::*;
|
||||||
use embassy_stm32::rng::Random;
|
|
||||||
use embassy::traits::rng::Random as _;
|
|
||||||
|
|
||||||
#[embassy::main]
|
#[embassy::main]
|
||||||
async fn main(_spawner: Spawner, p: Peripherals) {
|
async fn main(_spawner: Spawner, p: Peripherals) {
|
||||||
|
@ -24,11 +24,11 @@ async fn main(_spawner: Spawner, p: Peripherals) {
|
||||||
let mut rng = Random::new(p.RNG);
|
let mut rng = Random::new(p.RNG);
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
info!("high {}", unwrap!(rng.next(16).await) );
|
info!("high {}", unwrap!(rng.next(16).await));
|
||||||
unwrap!(led.set_high());
|
unwrap!(led.set_high());
|
||||||
Timer::after(Duration::from_millis(500)).await;
|
Timer::after(Duration::from_millis(500)).await;
|
||||||
|
|
||||||
info!("low {}", unwrap!(rng.next(16).await) );
|
info!("low {}", unwrap!(rng.next(16).await));
|
||||||
unwrap!(led.set_low());
|
unwrap!(led.set_low());
|
||||||
Timer::after(Duration::from_millis(500)).await;
|
Timer::after(Duration::from_millis(500)).await;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue