mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 06:42:32 +00:00
stm32: Automatically clear on WritableRingBuffer start
This commit is contained in:
parent
4f810e47f5
commit
28d03537e9
@ -980,7 +980,8 @@ impl<'a, W: Word> WritableRingBuffer<'a, W> {
|
|||||||
///
|
///
|
||||||
/// You must call this after creating it for it to work.
|
/// You must call this after creating it for it to work.
|
||||||
pub fn start(&mut self) {
|
pub fn start(&mut self) {
|
||||||
self.channel.start()
|
self.channel.start();
|
||||||
|
self.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Clear all data in the ring buffer.
|
/// Clear all data in the ring buffer.
|
||||||
|
Loading…
Reference in New Issue
Block a user