diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-03-29 03:00:48 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-03-29 03:00:48 +0200 |
| commit | d7c3a38efceacbd5a326c84c6e0bbef44b06e97c (patch) | |
| tree | 710b6553a45b99719288ab9de9084e0a93554cee /embassy-std-examples | |
| parent | d5ab02792c5489668bd399ac094900f5e26b3420 (diff) | |
Reexport macros at root, use eveywhere as `#[embassy::task]`
Diffstat (limited to 'embassy-std-examples')
| -rw-r--r-- | embassy-std-examples/src/bin/serial.rs | 3 | ||||
| -rw-r--r-- | embassy-std-examples/src/bin/tick.rs | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/embassy-std-examples/src/bin/serial.rs b/embassy-std-examples/src/bin/serial.rs index 6d628fe14..79f10c418 100644 --- a/embassy-std-examples/src/bin/serial.rs +++ b/embassy-std-examples/src/bin/serial.rs | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | mod serial_port; | 6 | mod serial_port; |
| 7 | 7 | ||
| 8 | use async_io::Async; | 8 | use async_io::Async; |
| 9 | use embassy::executor::task; | ||
| 10 | use embassy::io::AsyncBufReadExt; | 9 | use embassy::io::AsyncBufReadExt; |
| 11 | use embassy::util::Forever; | 10 | use embassy::util::Forever; |
| 12 | use embassy_std::Executor; | 11 | use embassy_std::Executor; |
| @@ -15,7 +14,7 @@ use nix::sys::termios; | |||
| 15 | 14 | ||
| 16 | use self::serial_port::SerialPort; | 15 | use self::serial_port::SerialPort; |
| 17 | 16 | ||
| 18 | #[task] | 17 | #[embassy::task] |
| 19 | async fn run() { | 18 | async fn run() { |
| 20 | // Open the serial port. | 19 | // Open the serial port. |
| 21 | let baudrate = termios::BaudRate::B115200; | 20 | let baudrate = termios::BaudRate::B115200; |
diff --git a/embassy-std-examples/src/bin/tick.rs b/embassy-std-examples/src/bin/tick.rs index 96eef067c..47713f7ba 100644 --- a/embassy-std-examples/src/bin/tick.rs +++ b/embassy-std-examples/src/bin/tick.rs | |||
| @@ -2,13 +2,12 @@ | |||
| 2 | #![feature(impl_trait_in_bindings)] | 2 | #![feature(impl_trait_in_bindings)] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | 4 | ||
| 5 | use embassy::executor::task; | ||
| 6 | use embassy::time::{Duration, Timer}; | 5 | use embassy::time::{Duration, Timer}; |
| 7 | use embassy::util::Forever; | 6 | use embassy::util::Forever; |
| 8 | use embassy_std::Executor; | 7 | use embassy_std::Executor; |
| 9 | use log::*; | 8 | use log::*; |
| 10 | 9 | ||
| 11 | #[task] | 10 | #[embassy::task] |
| 12 | async fn run() { | 11 | async fn run() { |
| 13 | loop { | 12 | loop { |
| 14 | info!("tick"); | 13 | info!("tick"); |
