From 8acec146e0b11fc7ce07b193a37f8903c66ec821 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 7 Mar 2022 00:24:29 +0100 Subject: [PATCH] common/serial/usb: fix hang when write buffer gets full and then the bus resets. Fixes #654 --- embassy-hal-common/src/usb/usb_serial.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/embassy-hal-common/src/usb/usb_serial.rs b/embassy-hal-common/src/usb/usb_serial.rs index 20a1840b2..94f687890 100644 --- a/embassy-hal-common/src/usb/usb_serial.rs +++ b/embassy-hal-common/src/usb/usb_serial.rs @@ -302,6 +302,8 @@ where self.read_buf.clear(); self.write_buf.clear(); self.write_state = WriteState::Idle; + self.read_waker.wake(); + self.write_waker.wake(); } fn endpoint_in_complete(&mut self, addr: EndpointAddress) {