Browse Source

support new embedded_hal serial API

Signed-off-by: Daniel Maslowski <[email protected]>
Daniel Maslowski 2 years ago
parent
commit
1f4e7bf717
2 changed files with 2 additions and 2 deletions
  1. 1 1
      Cargo.toml
  2. 1 1
      src/legacy_stdio.rs

+ 1 - 1
Cargo.toml

@@ -16,7 +16,7 @@ categories = ["os", "embedded", "hardware-support", "no-std"]
 edition = "2021"
 
 [dependencies]
-embedded-hal = "0.2.7"
+embedded-hal = "1.0.0-alpha.8"
 nb = "1.0"
 riscv = "0.7"
 

+ 1 - 1
src/legacy_stdio.rs

@@ -2,7 +2,7 @@
 //! 如果制造实例的时候,给定了stdout,那么就会打印到这个stdout里面
 use crate::util::AmoMutex;
 use alloc::boxed::Box;
-use embedded_hal::serial::{Read, Write};
+use embedded_hal::serial::nb::{Read, Write};
 use nb::block;
 
 /// Legacy standard input/output