diff options
| -rw-r--r-- | embassy-stm32/src/dma/gpdma/linked_list.rs | 9 | ||||
| -rw-r--r-- | embassy-stm32/src/dma/gpdma/ringbuffered.rs | 19 | ||||
| -rw-r--r-- | embassy-stm32/src/spdifrx/mod.rs | 3 |
3 files changed, 12 insertions, 19 deletions
diff --git a/embassy-stm32/src/dma/gpdma/linked_list.rs b/embassy-stm32/src/dma/gpdma/linked_list.rs index 3d2114282..b0c0dffad 100644 --- a/embassy-stm32/src/dma/gpdma/linked_list.rs +++ b/embassy-stm32/src/dma/gpdma/linked_list.rs | |||
| @@ -1,13 +1,12 @@ | |||
| 1 | //! Implementation of the GPDMA linked list and linked list items. | 1 | //! Implementation of the GPDMA linked list and linked list items. |
| 2 | #![macro_use] | 2 | #![macro_use] |
| 3 | 3 | ||
| 4 | use stm32_metapac::gpdma::{regs, vals::Dreq}; | 4 | use stm32_metapac::gpdma::regs; |
| 5 | use stm32_metapac::gpdma::vals::Dreq; | ||
| 5 | 6 | ||
| 6 | use super::TransferOptions; | 7 | use super::TransferOptions; |
| 7 | use crate::dma::{ | 8 | use crate::dma::word::{Word, WordSize}; |
| 8 | word::{Word, WordSize}, | 9 | use crate::dma::{Dir, Request}; |
| 9 | Dir, Request, | ||
| 10 | }; | ||
| 11 | 10 | ||
| 12 | /// The mode in which to run the linked list. | 11 | /// The mode in which to run the linked list. |
| 13 | #[derive(Debug)] | 12 | #[derive(Debug)] |
diff --git a/embassy-stm32/src/dma/gpdma/ringbuffered.rs b/embassy-stm32/src/dma/gpdma/ringbuffered.rs index 65ba00b3a..c5c18930b 100644 --- a/embassy-stm32/src/dma/gpdma/ringbuffered.rs +++ b/embassy-stm32/src/dma/gpdma/ringbuffered.rs | |||
| @@ -1,22 +1,17 @@ | |||
| 1 | //! GPDMA ring buffer implementation. | 1 | //! GPDMA ring buffer implementation. |
| 2 | //! | 2 | //! |
| 3 | //! FIXME: add request_pause functionality? | 3 | //! FIXME: add request_pause functionality? |
| 4 | use core::{ | 4 | use core::future::poll_fn; |
| 5 | future::poll_fn, | 5 | use core::sync::atomic::{fence, Ordering}; |
| 6 | sync::atomic::{fence, Ordering}, | 6 | use core::task::Waker; |
| 7 | task::Waker, | ||
| 8 | }; | ||
| 9 | 7 | ||
| 10 | use embassy_hal_internal::{into_ref, Peripheral, PeripheralRef}; | 8 | use embassy_hal_internal::{into_ref, Peripheral, PeripheralRef}; |
| 11 | 9 | ||
| 12 | use crate::dma::{ | ||
| 13 | gpdma::linked_list::{LinearItem, RunMode, Table}, | ||
| 14 | ringbuffer::{DmaCtrl, Error, ReadableDmaRingBuffer, WritableDmaRingBuffer}, | ||
| 15 | word::Word, | ||
| 16 | Channel, Request, | ||
| 17 | }; | ||
| 18 | |||
| 19 | use super::{AnyChannel, TransferOptions, STATE}; | 10 | use super::{AnyChannel, TransferOptions, STATE}; |
| 11 | use crate::dma::gpdma::linked_list::{LinearItem, RunMode, Table}; | ||
| 12 | use crate::dma::ringbuffer::{DmaCtrl, Error, ReadableDmaRingBuffer, WritableDmaRingBuffer}; | ||
| 13 | use crate::dma::word::Word; | ||
| 14 | use crate::dma::{Channel, Request}; | ||
| 20 | 15 | ||
| 21 | struct DmaCtrlImpl<'a>(PeripheralRef<'a, AnyChannel>); | 16 | struct DmaCtrlImpl<'a>(PeripheralRef<'a, AnyChannel>); |
| 22 | 17 | ||
diff --git a/embassy-stm32/src/spdifrx/mod.rs b/embassy-stm32/src/spdifrx/mod.rs index d3b4a0b10..466639e83 100644 --- a/embassy-stm32/src/spdifrx/mod.rs +++ b/embassy-stm32/src/spdifrx/mod.rs | |||
| @@ -8,8 +8,7 @@ use embassy_sync::waitqueue::AtomicWaker; | |||
| 8 | 8 | ||
| 9 | use crate::dma::ringbuffer::Error as RingbufferError; | 9 | use crate::dma::ringbuffer::Error as RingbufferError; |
| 10 | pub use crate::dma::word; | 10 | pub use crate::dma::word; |
| 11 | use crate::dma::ReadableRingBuffer; | 11 | use crate::dma::{Channel, ReadableRingBuffer, TransferOptions}; |
| 12 | use crate::dma::{Channel, TransferOptions}; | ||
| 13 | use crate::gpio::{AfType, AnyPin, Pull, SealedPin as _}; | 12 | use crate::gpio::{AfType, AnyPin, Pull, SealedPin as _}; |
| 14 | use crate::interrupt::typelevel::Interrupt; | 13 | use crate::interrupt::typelevel::Interrupt; |
| 15 | use crate::pac::spdifrx::Spdifrx as Regs; | 14 | use crate::pac::spdifrx::Spdifrx as Regs; |
