diff --git a/embassy-stm32/src/dma/dma_bdma.rs b/embassy-stm32/src/dma/dma_bdma.rs index 90160ed50..1945c3587 100644 --- a/embassy-stm32/src/dma/dma_bdma.rs +++ b/embassy-stm32/src/dma/dma_bdma.rs @@ -1007,9 +1007,9 @@ impl<'a, W: Word> WritableRingBuffer<'a, W> { } /// Wait for any ring buffer write error. - pub async fn write_error(&mut self) -> Result { + pub async fn wait_write_error(&mut self) -> Result { self.ringbuf - .write_error(&mut DmaCtrlImpl(self.channel.reborrow())) + .wait_write_error(&mut DmaCtrlImpl(self.channel.reborrow())) .await } diff --git a/embassy-stm32/src/dma/ringbuffer/mod.rs b/embassy-stm32/src/dma/ringbuffer/mod.rs index b7f98fbce..25bdc7522 100644 --- a/embassy-stm32/src/dma/ringbuffer/mod.rs +++ b/embassy-stm32/src/dma/ringbuffer/mod.rs @@ -261,7 +261,7 @@ impl<'a, W: Word> WritableDmaRingBuffer<'a, W> { } /// Wait for any ring buffer write error. - pub async fn write_error(&mut self, dma: &mut impl DmaCtrl) -> Result { + pub async fn wait_write_error(&mut self, dma: &mut impl DmaCtrl) -> Result { poll_fn(|cx| { dma.set_waker(cx.waker()); diff --git a/embassy-stm32/src/sai/mod.rs b/embassy-stm32/src/sai/mod.rs index fd61e5339..a8d02f825 100644 --- a/embassy-stm32/src/sai/mod.rs +++ b/embassy-stm32/src/sai/mod.rs @@ -1009,10 +1009,10 @@ impl<'d, T: Instance, W: word::Word> Sai<'d, T, W> { /// experiences an overrun of the ring buffer. Then, instead of letting /// the SAI peripheral play the last written buffer over and over again, SAI /// can be muted or dropped instead. - pub async fn write_error(&mut self) -> Result<(), Error> { + pub async fn wait_write_error(&mut self) -> Result<(), Error> { match &mut self.ring_buffer { RingBuffer::Writable(buffer) => { - buffer.write_error().await?; + buffer.wait_write_error().await?; Ok(()) } _ => return Err(Error::NotATransmitter),