diff options
| author | etiennecollin <[email protected]> | 2025-08-25 21:10:59 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-09-05 14:43:29 +0200 |
| commit | 2f24568de08e846d4bfafff90a5b9ba352d86431 (patch) | |
| tree | 764affc6badec7017d935e6e93567aa188ecdf44 /embassy-stm32/src/sai | |
| parent | f67365a067634b62747c819253fb461624c29568 (diff) | |
feat: custom dma configuration using RegisterUpdaters struct
See this PR comment:
https://github.com/embassy-rs/embassy/pull/3923#issuecomment-2889283939
Diffstat (limited to 'embassy-stm32/src/sai')
| -rw-r--r-- | embassy-stm32/src/sai/mod.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/embassy-stm32/src/sai/mod.rs b/embassy-stm32/src/sai/mod.rs index 88cc225dd..ac1ab2505 100644 --- a/embassy-stm32/src/sai/mod.rs +++ b/embassy-stm32/src/sai/mod.rs | |||
| @@ -687,12 +687,13 @@ fn get_ring_buffer<'d, T: Instance, W: word::Word>( | |||
| 687 | //the new_write() and new_read() always use circular mode | 687 | //the new_write() and new_read() always use circular mode |
| 688 | ..Default::default() | 688 | ..Default::default() |
| 689 | }; | 689 | }; |
| 690 | let updaters = Default::default(); | ||
| 690 | match tx_rx { | 691 | match tx_rx { |
| 691 | TxRx::Transmitter => RingBuffer::Writable(unsafe { | 692 | TxRx::Transmitter => RingBuffer::Writable(unsafe { |
| 692 | WritableRingBuffer::new(dma, request, dr(T::REGS, sub_block), dma_buf, opts) | 693 | WritableRingBuffer::new(dma, request, dr(T::REGS, sub_block), dma_buf, opts, updaters) |
| 693 | }), | 694 | }), |
| 694 | TxRx::Receiver => RingBuffer::Readable(unsafe { | 695 | TxRx::Receiver => RingBuffer::Readable(unsafe { |
| 695 | ReadableRingBuffer::new(dma, request, dr(T::REGS, sub_block), dma_buf, opts) | 696 | ReadableRingBuffer::new(dma, request, dr(T::REGS, sub_block), dma_buf, opts, updaters) |
| 696 | }), | 697 | }), |
| 697 | } | 698 | } |
| 698 | } | 699 | } |
