Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions embassy-stm32/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased - ReleaseDate

- fix: ringuffered DMA does retry in write_exact if failed
- feat: allow granular stop for regular usart
- feat: Add continuous waveform method to SimplePWM
- change: remove waveform timer method
Expand Down
11 changes: 10 additions & 1 deletion embassy-stm32/src/dma/gpdma/ringbuffered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,18 @@ impl<'a, W: Word> WritableRingBuffer<'a, W> {

/// Write an exact number of elements to the ringbuffer.
pub async fn write_exact(&mut self, buffer: &[W]) -> Result<usize, Error> {
self.ringbuf
match self
.ringbuf
.write_exact(&mut DmaCtrlImpl(self.channel.reborrow()), buffer)
.await
{
Ok(n) => Ok(n),
Err(_) => {
self.ringbuf
.write_exact(&mut DmaCtrlImpl(self.channel.reborrow()), buffer)
.await
}
}
}

/// Wait for any ring buffer write error.
Expand Down