Reexport macros at root, use eveywhere as #[embassy::task]
This commit is contained in:
@ -6,7 +6,6 @@
|
||||
mod serial_port;
|
||||
|
||||
use async_io::Async;
|
||||
use embassy::executor::task;
|
||||
use embassy::io::AsyncBufReadExt;
|
||||
use embassy::util::Forever;
|
||||
use embassy_std::Executor;
|
||||
@ -15,7 +14,7 @@ use nix::sys::termios;
|
||||
|
||||
use self::serial_port::SerialPort;
|
||||
|
||||
#[task]
|
||||
#[embassy::task]
|
||||
async fn run() {
|
||||
// Open the serial port.
|
||||
let baudrate = termios::BaudRate::B115200;
|
||||
|
@ -2,13 +2,12 @@
|
||||
#![feature(impl_trait_in_bindings)]
|
||||
#![feature(type_alias_impl_trait)]
|
||||
|
||||
use embassy::executor::task;
|
||||
use embassy::time::{Duration, Timer};
|
||||
use embassy::util::Forever;
|
||||
use embassy_std::Executor;
|
||||
use log::*;
|
||||
|
||||
#[task]
|
||||
#[embassy::task]
|
||||
async fn run() {
|
||||
loop {
|
||||
info!("tick");
|
||||
|
Reference in New Issue
Block a user