de016e8456
trait_alias seems unused. no idea why it's there.
24 lines
461 B
Rust
24 lines
461 B
Rust
#![feature(type_alias_impl_trait)]
|
|
|
|
use embassy::executor::Spawner;
|
|
use embassy::time::{Duration, Timer};
|
|
use log::*;
|
|
|
|
#[embassy::task]
|
|
async fn run() {
|
|
loop {
|
|
info!("tick");
|
|
Timer::after(Duration::from_secs(1)).await;
|
|
}
|
|
}
|
|
|
|
#[embassy::main]
|
|
async fn main(spawner: Spawner) {
|
|
env_logger::builder()
|
|
.filter_level(log::LevelFilter::Debug)
|
|
.format_timestamp_nanos()
|
|
.init();
|
|
|
|
spawner.spawn(run()).unwrap();
|
|
}
|