From 80f697bf8a246b4e540d545c91a046e8b7fffbea Mon Sep 17 00:00:00 2001 From: AndreySmirnov81 <19325847+AndreySmirnov81@users.noreply.github.com> Date: Mon, 14 Feb 2022 14:04:00 +0300 Subject: [PATCH] bug fix --- src/serial.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serial.rs b/src/serial.rs index c50f8547..fa38a887 100644 --- a/src/serial.rs +++ b/src/serial.rs @@ -697,7 +697,7 @@ where if sr.rxne().bit_is_set() { // Read the received byte // NOTE(read_volatile) see `write_volatile` below - usart.dr.read().dr().bits() + Ok(usart.dr.read().dr().bits()) } else { Err(nb::Error::WouldBlock) }