diff --git a/esp-hal/CHANGELOG.md b/esp-hal/CHANGELOG.md index 9a2d23ea4..b545a792d 100644 --- a/esp-hal/CHANGELOG.md +++ b/esp-hal/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fix I2S async-tx (#1833) +- Fix PARL_IO async-rx (#1851) ### Removed diff --git a/esp-hal/src/parl_io.rs b/esp-hal/src/parl_io.rs index d617a4be3..8f8b185fc 100644 --- a/esp-hal/src/parl_io.rs +++ b/esp-hal/src/parl_io.rs @@ -1664,7 +1664,7 @@ pub mod asynch { use super::{private::Instance, Error, ParlIoRx, ParlIoTx, MAX_DMA_SIZE}; use crate::{ - dma::{asynch::DmaRxDoneChFuture, DmaChannel, ParlIoPeripheral}, + dma::{asynch::DmaRxFuture, DmaChannel, ParlIoPeripheral}, peripherals::Interrupt, }; @@ -1756,7 +1756,7 @@ pub mod asynch { return Err(Error::MaxDmaTransferSizeExceeded); } - let future = DmaRxDoneChFuture::new(&mut self.rx_channel); + let future = DmaRxFuture::new(&mut self.rx_channel); Self::start_receive_bytes_dma(future.rx, &mut self.rx_chain, ptr, len)?; future.await?; diff --git a/examples/src/bin/embassy_parl_io_rx.rs b/examples/src/bin/embassy_parl_io_rx.rs index 998338a08..d1c6ccfe2 100644 --- a/examples/src/bin/embassy_parl_io_rx.rs +++ b/examples/src/bin/embassy_parl_io_rx.rs @@ -74,7 +74,11 @@ async fn main(_spawner: Spawner) { let buffer = rx_buffer; loop { parl_io_rx.read_dma_async(buffer).await.unwrap(); - println!("Received: {:02x?} ...", &buffer[..30]); + println!( + "Received: {:02x?} ... {:02x?}", + &buffer[..30], + &buffer[(buffer.len() - 30)..] + ); Timer::after(Duration::from_millis(500)).await; }