diff options
Diffstat (limited to 'examples/std/src/bin/serial.rs')
| -rw-r--r-- | examples/std/src/bin/serial.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/std/src/bin/serial.rs b/examples/std/src/bin/serial.rs index 35cba4cee..85ee54f70 100644 --- a/examples/std/src/bin/serial.rs +++ b/examples/std/src/bin/serial.rs | |||
| @@ -5,10 +5,10 @@ mod serial_port; | |||
| 5 | 5 | ||
| 6 | use async_io::Async; | 6 | use async_io::Async; |
| 7 | use embassy_executor::Executor; | 7 | use embassy_executor::Executor; |
| 8 | use embassy_util::Forever; | ||
| 9 | use embedded_io::asynch::Read; | 8 | use embedded_io::asynch::Read; |
| 10 | use log::*; | 9 | use log::*; |
| 11 | use nix::sys::termios; | 10 | use nix::sys::termios; |
| 11 | use static_cell::StaticCell; | ||
| 12 | 12 | ||
| 13 | use self::serial_port::SerialPort; | 13 | use self::serial_port::SerialPort; |
| 14 | 14 | ||
| @@ -40,7 +40,7 @@ async fn run() { | |||
| 40 | } | 40 | } |
| 41 | } | 41 | } |
| 42 | 42 | ||
| 43 | static EXECUTOR: Forever<Executor> = Forever::new(); | 43 | static EXECUTOR: StaticCell<Executor> = StaticCell::new(); |
| 44 | 44 | ||
| 45 | fn main() { | 45 | fn main() { |
| 46 | env_logger::builder() | 46 | env_logger::builder() |
| @@ -49,7 +49,7 @@ fn main() { | |||
| 49 | .format_timestamp_nanos() | 49 | .format_timestamp_nanos() |
| 50 | .init(); | 50 | .init(); |
| 51 | 51 | ||
| 52 | let executor = EXECUTOR.put(Executor::new()); | 52 | let executor = EXECUTOR.init(Executor::new()); |
| 53 | executor.run(|spawner| { | 53 | executor.run(|spawner| { |
| 54 | spawner.spawn(run()).unwrap(); | 54 | spawner.spawn(run()).unwrap(); |
| 55 | }); | 55 | }); |
