embassy-rs / embassy

Modern embedded framework, using Rust and async.
https://embassy.dev
Apache License 2.0
4.85k stars 656 forks source link

[stm32] BufferedUart - no way to clear buffer #2478

Open shufps opened 5 months ago

shufps commented 5 months ago

Hi,

I'm trying to clear the buffer of a BufferedUart on a STM32L1 - but it seems to be not possible.

Everthing I found so far was not accessible from the application.

Is there a way to do this?

dkhayes117 commented 4 months ago

have you tried using the consume() method on the buffer? That should prevent previous bytes from being returned again.