Skip to content

Commit a801122

Browse files
committed
Bump riscv to v0.10.1
Since Longan Nano GD32VF103 chip only supports a single hart, still safe to use the recently- updated riscv crate interrupt free section which only disables interrupts for the current hart.
1 parent bc7e471 commit a801122

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ default-target = "x86_64-unknown-linux-gnu"
1818
gd32vf103xx-hal = "0.5.0"
1919
embedded-hal = "0.2.6"
2020
nb = "1.0.0"
21-
riscv = "0.6.0"
21+
riscv = "0.10.1"
2222
st7735-lcd = { version = "0.8.1", optional = true }
2323
embedded-sdmmc = { version = "0.3.0", optional = true }
2424

src/stdout.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub fn configure<X, Y>(
5757
let serial = Serial::new(uart, (tx, rx), config, afio, rcu);
5858
let (tx, _) = serial.split();
5959

60-
interrupt::free(|_| {
60+
interrupt::free(|| {
6161
unsafe {
6262
STDOUT.replace(SerialWrapper(tx));
6363
}
@@ -66,7 +66,7 @@ pub fn configure<X, Y>(
6666

6767
/// Writes string to stdout
6868
pub fn write_str(s: &str) {
69-
interrupt::free(|_| unsafe {
69+
interrupt::free(|| unsafe {
7070
if let Some(stdout) = STDOUT.as_mut() {
7171
let _ = stdout.write_str(s);
7272
}
@@ -75,7 +75,7 @@ pub fn write_str(s: &str) {
7575

7676
/// Writes formatted string to stdout
7777
pub fn write_fmt(args: fmt::Arguments) {
78-
interrupt::free(|_| unsafe {
78+
interrupt::free(|| unsafe {
7979
if let Some(stdout) = STDOUT.as_mut() {
8080
let _ = stdout.write_fmt(args);
8181
}

0 commit comments

Comments
 (0)