diff options
| -rw-r--r-- | embassy-imxrt/src/dma.rs | 2 | ||||
| -rw-r--r-- | embassy-imxrt/src/flexcomm/uart.rs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/embassy-imxrt/src/dma.rs b/embassy-imxrt/src/dma.rs index e71a27e0e..76c9953c1 100644 --- a/embassy-imxrt/src/dma.rs +++ b/embassy-imxrt/src/dma.rs | |||
| @@ -16,6 +16,8 @@ use crate::peripherals::DMA0; | |||
| 16 | use crate::sealed::Sealed; | 16 | use crate::sealed::Sealed; |
| 17 | use crate::{BitIter, interrupt, pac, peripherals}; | 17 | use crate::{BitIter, interrupt, pac, peripherals}; |
| 18 | 18 | ||
| 19 | pub(crate) const MAX_CHUNK_SIZE: usize = 1024; | ||
| 20 | |||
| 19 | #[cfg(feature = "rt")] | 21 | #[cfg(feature = "rt")] |
| 20 | #[interrupt] | 22 | #[interrupt] |
| 21 | fn DMA0() { | 23 | fn DMA0() { |
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(); |
