aboutsummaryrefslogtreecommitdiff
path: root/examples/std/src/bin/serial.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/std/src/bin/serial.rs')
-rw-r--r--examples/std/src/bin/serial.rs6
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
6use async_io::Async; 6use async_io::Async;
7use embassy_executor::Executor; 7use embassy_executor::Executor;
8use embassy_util::Forever;
9use embedded_io::asynch::Read; 8use embedded_io::asynch::Read;
10use log::*; 9use log::*;
11use nix::sys::termios; 10use nix::sys::termios;
11use static_cell::StaticCell;
12 12
13use self::serial_port::SerialPort; 13use self::serial_port::SerialPort;
14 14
@@ -40,7 +40,7 @@ async fn run() {
40 } 40 }
41} 41}
42 42
43static EXECUTOR: Forever<Executor> = Forever::new(); 43static EXECUTOR: StaticCell<Executor> = StaticCell::new();
44 44
45fn main() { 45fn 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 });