diff options
| author | Felipe Balbi <[email protected]> | 2025-12-17 16:28:24 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-17 16:28:24 +0000 |
| commit | 10630047153a8246573191d53d5ac571a3750117 (patch) | |
| tree | cdeec5808132a07edc2c856398ed02fd991fda98 /embassy-imxrt/src/flexcomm/uart.rs | |
| parent | cade3b5396fc91e41551d6a95d3393523c730c90 (diff) | |
| parent | 772c9f951b5ee292089670d9b489314d75f8a92a (diff) | |
Merge pull request #5092 from felipebalbi/imxrt/dma
[iMXRT] dma: fix potential underflow bug
Diffstat (limited to 'embassy-imxrt/src/flexcomm/uart.rs')
| -rw-r--r-- | embassy-imxrt/src/flexcomm/uart.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-imxrt/src/flexcomm/uart.rs b/embassy-imxrt/src/flexcomm/uart.rs index 2b759ba84..d13b32e93 100644 --- a/embassy-imxrt/src/flexcomm/uart.rs +++ b/embassy-imxrt/src/flexcomm/uart.rs | |||
| @@ -598,7 +598,7 @@ impl<'a> UartTx<'a, Async> { | |||
| 598 | regs.fifocfg().modify(|_, w| w.dmatx().disabled()); | 598 | regs.fifocfg().modify(|_, w| w.dmatx().disabled()); |
| 599 | }); | 599 | }); |
| 600 | 600 | ||
| 601 | for chunk in buf.chunks(1024) { | 601 | for chunk in buf.chunks(dma::MAX_CHUNK_SIZE) { |
| 602 | regs.fifocfg().modify(|_, w| w.dmatx().enabled()); | 602 | regs.fifocfg().modify(|_, w| w.dmatx().enabled()); |
| 603 | 603 | ||
| 604 | let ch = self.tx_dma.as_mut().unwrap().reborrow(); | 604 | let ch = self.tx_dma.as_mut().unwrap().reborrow(); |
| @@ -726,7 +726,7 @@ impl<'a> UartRx<'a, Async> { | |||
| 726 | regs.fifocfg().modify(|_, w| w.dmarx().disabled()); | 726 | regs.fifocfg().modify(|_, w| w.dmarx().disabled()); |
| 727 | }); | 727 | }); |
| 728 | 728 | ||
| 729 | for chunk in buf.chunks_mut(1024) { | 729 | for chunk in buf.chunks_mut(dma::MAX_CHUNK_SIZE) { |
| 730 | regs.fifocfg().modify(|_, w| w.dmarx().enabled()); | 730 | regs.fifocfg().modify(|_, w| w.dmarx().enabled()); |
| 731 | 731 | ||
| 732 | let ch = self.rx_dma.as_mut().unwrap().reborrow(); | 732 | let ch = self.rx_dma.as_mut().unwrap().reborrow(); |
