Reset rx_started state of nrf buffered_uarte on init

This was likely forgotten as part of c46418f12. Without this, when
creating a uarte instance, dropping it and then creating another
instance, this instance would never receive any bytes.
This commit is contained in:
ftilde 2023-12-29 12:27:52 +01:00
parent 90e96d281f
commit 3916b26b25

View file

@ -342,6 +342,7 @@ impl<'d, U: UarteInstance, T: TimerInstance> BufferedUarte<'d, U, T> {
s.tx_count.store(0, Ordering::Relaxed);
s.rx_started_count.store(0, Ordering::Relaxed);
s.rx_ended_count.store(0, Ordering::Relaxed);
s.rx_started.store(false, Ordering::Relaxed);
let len = tx_buffer.len();
unsafe { s.tx_buf.init(tx_buffer.as_mut_ptr(), len) };
let len = rx_buffer.len();