diff options
| author | elagil <[email protected]> | 2025-08-25 21:10:59 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-09-05 14:43:29 +0200 |
| commit | 51b28aaa3162391bcccef1a0fc99f686471d515f (patch) | |
| tree | c2882c5cfabfedd934c83ad04e32d5112093a57a /embassy-stm32/src | |
| parent | 4155adbf8ad2aa8acbc6e94d059739c9f373323b (diff) | |
style: formatting
Diffstat (limited to 'embassy-stm32/src')
| -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; |
