embassy-rs / embassy

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

WIP: STM32 Half-Duplex: fix sequential reads and writes #3089

Open qwerty19106 opened 1 week ago

qwerty19106 commented 1 week ago

After #2895 I discoverer the same problems:

To fix it I allow either transmitter (cr1.te()) or receiver (cr1.re()) at write, read and flush calls. Tested on STM32F446RE with two Half-Duplex protocols: Smart Audio and CRSF.

Dirbaio commented 1 week ago

bender run