From 49e109130937bd0ab0742a1a4765a97d0dc8a00c Mon Sep 17 00:00:00 2001 From: Guillaume MICHEL Date: Fri, 28 Oct 2022 10:49:59 +0200 Subject: [PATCH] embassy-stm32: Fix bug where USART idle flag could end a `read` prematuraly --- embassy-stm32/src/usart/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/embassy-stm32/src/usart/mod.rs b/embassy-stm32/src/usart/mod.rs index dee466b2..e059c91b 100644 --- a/embassy-stm32/src/usart/mod.rs +++ b/embassy-stm32/src/usart/mod.rs @@ -465,7 +465,7 @@ impl<'d, T: BasicInstance, RxDma> UartRx<'d, T, RxDma> { } } - if sr.idle() { + if enable_idle_line_detection && sr.idle() { // Idle line // stop dma transfer