style: formatting

This commit is contained in:
elagil 2025-08-25 21:10:59 +02:00 committed by Dario Nieuwenhuis
parent 4155adbf8a
commit 51b28aaa31
3 changed files with 12 additions and 19 deletions

View File

@ -1,13 +1,12 @@
//! Implementation of the GPDMA linked list and linked list items. //! Implementation of the GPDMA linked list and linked list items.
#![macro_use] #![macro_use]
use stm32_metapac::gpdma::{regs, vals::Dreq}; use stm32_metapac::gpdma::regs;
use stm32_metapac::gpdma::vals::Dreq;
use super::TransferOptions; use super::TransferOptions;
use crate::dma::{ use crate::dma::word::{Word, WordSize};
word::{Word, WordSize}, use crate::dma::{Dir, Request};
Dir, Request,
};
/// The mode in which to run the linked list. /// The mode in which to run the linked list.
#[derive(Debug)] #[derive(Debug)]

View File

@ -1,22 +1,17 @@
//! GPDMA ring buffer implementation. //! GPDMA ring buffer implementation.
//! //!
//! FIXME: add request_pause functionality? //! FIXME: add request_pause functionality?
use core::{ use core::future::poll_fn;
future::poll_fn, use core::sync::atomic::{fence, Ordering};
sync::atomic::{fence, Ordering}, use core::task::Waker;
task::Waker,
};
use embassy_hal_internal::{into_ref, Peripheral, PeripheralRef}; use embassy_hal_internal::{into_ref, Peripheral, PeripheralRef};
use crate::dma::{
gpdma::linked_list::{LinearItem, RunMode, Table},
ringbuffer::{DmaCtrl, Error, ReadableDmaRingBuffer, WritableDmaRingBuffer},
word::Word,
Channel, Request,
};
use super::{AnyChannel, TransferOptions, STATE}; use super::{AnyChannel, TransferOptions, STATE};
use crate::dma::gpdma::linked_list::{LinearItem, RunMode, Table};
use crate::dma::ringbuffer::{DmaCtrl, Error, ReadableDmaRingBuffer, WritableDmaRingBuffer};
use crate::dma::word::Word;
use crate::dma::{Channel, Request};
struct DmaCtrlImpl<'a>(PeripheralRef<'a, AnyChannel>); struct DmaCtrlImpl<'a>(PeripheralRef<'a, AnyChannel>);

View File

@ -8,8 +8,7 @@ use embassy_sync::waitqueue::AtomicWaker;
use crate::dma::ringbuffer::Error as RingbufferError; use crate::dma::ringbuffer::Error as RingbufferError;
pub use crate::dma::word; pub use crate::dma::word;
use crate::dma::ReadableRingBuffer; use crate::dma::{Channel, ReadableRingBuffer, TransferOptions};
use crate::dma::{Channel, TransferOptions};
use crate::gpio::{AfType, AnyPin, Pull, SealedPin as _}; use crate::gpio::{AfType, AnyPin, Pull, SealedPin as _};
use crate::interrupt::typelevel::Interrupt; use crate::interrupt::typelevel::Interrupt;
use crate::pac::spdifrx::Spdifrx as Regs; use crate::pac::spdifrx::Spdifrx as Regs;