Struct rp2040_hal::dma::double_buffer::Config

source ·
pub struct Config<CH1: SingleChannel, CH2: SingleChannel, FROM: ReadTarget, TO: WriteTarget> { /* private fields */ }
Expand description

Configuration for double-buffered DMA transfer

Implementations§

source§

impl<CH1, CH2, FROM, TO, WORD> Config<CH1, CH2, FROM, TO>
where CH1: SingleChannel, CH2: SingleChannel, FROM: ReadTarget<ReceivedWord = WORD>, TO: WriteTarget<TransmittedWord = WORD>,

source

pub fn new(ch: (CH1, CH2), from: FROM, to: TO) -> Config<CH1, CH2, FROM, TO>

Create a new configuration for double-buffered DMA transfer

source

pub fn pace(&mut self, pace: Pace)

Sets the (preferred) pace for the DMA transfers.

Usually, the code will automatically configure the correct pace, but peripheral-to-peripheral transfers require the user to manually select whether the source or the sink shall be queried for the pace signal.

source

pub fn bswap(&mut self, bswap: bool)

Enable/disable byteswapping for the DMA transfers, default value is false.

For byte data, this has no effect. For halfword data, the two bytes of each halfword are swapped. For word data, the four bytes of each word are swapped to reverse order.

This is a convenient way to change the (half-)words’ byte endianness on the fly.

source

pub fn start(self) -> Transfer<CH1, CH2, FROM, TO, ()>

Start the DMA transfer

Auto Trait Implementations§

§

impl<CH1, CH2, FROM, TO> Freeze for Config<CH1, CH2, FROM, TO>
where FROM: Freeze, TO: Freeze, CH1: Freeze, CH2: Freeze,

§

impl<CH1, CH2, FROM, TO> RefUnwindSafe for Config<CH1, CH2, FROM, TO>

§

impl<CH1, CH2, FROM, TO> Send for Config<CH1, CH2, FROM, TO>
where FROM: Send, TO: Send, CH1: Send, CH2: Send,

§

impl<CH1, CH2, FROM, TO> Sync for Config<CH1, CH2, FROM, TO>
where FROM: Sync, TO: Sync, CH1: Sync, CH2: Sync,

§

impl<CH1, CH2, FROM, TO> Unpin for Config<CH1, CH2, FROM, TO>
where FROM: Unpin, TO: Unpin, CH1: Unpin, CH2: Unpin,

§

impl<CH1, CH2, FROM, TO> UnwindSafe for Config<CH1, CH2, FROM, TO>
where FROM: UnwindSafe, TO: UnwindSafe, CH1: UnwindSafe, CH2: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Choices> CoproductSubsetter<CNil, HNil> for Choices

§

type Remainder = Choices

source§

fn subset( self ) -> Result<CNil, <Choices as CoproductSubsetter<CNil, HNil>>::Remainder>

Extract a subset of the possible types in a coproduct (or get the remaining possibilities) Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T, U, I> LiftInto<U, I> for T
where U: LiftFrom<T, I>,

source§

fn lift_into(self) -> U

Performs the indexed conversion.
source§

impl<Source> Sculptor<HNil, HNil> for Source

§

type Remainder = Source

source§

fn sculpt(self) -> (HNil, <Source as Sculptor<HNil, HNil>>::Remainder)

Consumes the current HList and returns an HList with the requested shape. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.