From be113ae383e857a9fb644e2262444f25e025cab3 Mon Sep 17 00:00:00 2001 From: Dominic Fischer Date: Fri, 27 Sep 2024 13:28:00 +0100 Subject: [PATCH] update --- esp-hal/src/dma/mod.rs | 13 ++++++------- esp-hal/src/lcd_cam/cam.rs | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/esp-hal/src/dma/mod.rs b/esp-hal/src/dma/mod.rs index 11a8d1464f8..0c8a079ef5d 100644 --- a/esp-hal/src/dma/mod.rs +++ b/esp-hal/src/dma/mod.rs @@ -747,7 +747,7 @@ macro_rules! dma_tx_buffer { #[macro_export] macro_rules! dma_rx_stream_buffer { ($rx_size:expr) => { - dma_rx_stream_buffer!($rx_size, chunk_size = 4095) + $crate::dma_rx_stream_buffer!($rx_size, 4095) }; ($rx_size:expr, $chunk_size:expr) => {{ let (buffer, descriptors) = @@ -1625,13 +1625,15 @@ where &mut self, first_desc: *mut DmaDescriptor, peri: DmaPeripheral, - ) { + ) -> Result<(), DmaError> { compiler_fence(core::sync::atomic::Ordering::SeqCst); R::clear_in_interrupts(); R::reset_in(); R::set_in_descriptors(first_desc as u32); R::set_in_peripheral(peri as u8); + + Ok(()) } fn start_transfer(&mut self) -> Result<(), DmaError> { @@ -1719,8 +1721,7 @@ where } self.rx_impl - .prepare_transfer_without_start(chain.first() as _, peri); - Ok(()) + .prepare_transfer_without_start(chain.first() as _, peri) } unsafe fn prepare_transfer( @@ -1736,9 +1737,7 @@ where } self.rx_impl - .prepare_transfer_without_start(preparation.start, peri); - - Ok(()) + .prepare_transfer_without_start(preparation.start, peri) } fn start_transfer(&mut self) -> Result<(), DmaError> { diff --git a/esp-hal/src/lcd_cam/cam.rs b/esp-hal/src/lcd_cam/cam.rs index cc18d434f1b..b226e9257e5 100644 --- a/esp-hal/src/lcd_cam/cam.rs +++ b/esp-hal/src/lcd_cam/cam.rs @@ -26,7 +26,7 @@ //! # let dma = Dma::new(peripherals.DMA); //! # let channel = dma.channel0; //! -//! # let dma_buf = dma_rx_stream_buffer!(20 * 1000, chunk_size = 1000); +//! # let dma_buf = dma_rx_stream_buffer!(20 * 1000, 1000); //! //! # let channel = channel.configure( //! # false,