Struct rp2040_hal::dma::bidirectional::Config
source · pub struct Config<CH1, CH2, FROM, BIDI, TO>where
CH1: SingleChannel,
CH2: SingleChannel,
FROM: ReadTarget,
BIDI: ReadTarget + WriteTarget,
TO: WriteTarget,{ /* private fields */ }
Expand description
DMA configuration for sending and receiving data simultaneously
Implementations§
source§impl<CH1, CH2, FROM, BIDI, TO, WORD> Config<CH1, CH2, FROM, BIDI, TO>where
CH1: SingleChannel,
CH2: SingleChannel,
FROM: ReadTarget<ReceivedWord = WORD>,
BIDI: ReadTarget<ReceivedWord = WORD> + WriteTarget<TransmittedWord = WORD>,
TO: WriteTarget<TransmittedWord = WORD>,
impl<CH1, CH2, FROM, BIDI, TO, WORD> Config<CH1, CH2, FROM, BIDI, TO>where
CH1: SingleChannel,
CH2: SingleChannel,
FROM: ReadTarget<ReceivedWord = WORD>,
BIDI: ReadTarget<ReceivedWord = WORD> + WriteTarget<TransmittedWord = WORD>,
TO: WriteTarget<TransmittedWord = WORD>,
sourcepub fn new(
ch: (CH1, CH2),
from: FROM,
bidi: BIDI,
to: TO
) -> Config<CH1, CH2, FROM, BIDI, TO>
pub fn new( ch: (CH1, CH2), from: FROM, bidi: BIDI, to: TO ) -> Config<CH1, CH2, FROM, BIDI, TO>
Create a DMA configuration for sending and receiving data simultaneously
sourcepub fn from_pace(&mut self, pace: Pace)
pub fn from_pace(&mut self, pace: Pace)
Set the transfer pacing for the DMA transfer from the source
sourcepub fn to_pace(&mut self, pace: Pace)
pub fn to_pace(&mut self, pace: Pace)
Set the transfer pacing for the DMA transfer to the target
sourcepub fn bswap(&mut self, bswap: bool)
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.
Auto Trait Implementations§
impl<CH1, CH2, FROM, BIDI, TO> Freeze for Config<CH1, CH2, FROM, BIDI, TO>
impl<CH1, CH2, FROM, BIDI, TO> RefUnwindSafe for Config<CH1, CH2, FROM, BIDI, TO>where
FROM: RefUnwindSafe,
BIDI: RefUnwindSafe,
TO: RefUnwindSafe,
CH1: RefUnwindSafe,
CH2: RefUnwindSafe,
impl<CH1, CH2, FROM, BIDI, TO> Send for Config<CH1, CH2, FROM, BIDI, TO>
impl<CH1, CH2, FROM, BIDI, TO> Sync for Config<CH1, CH2, FROM, BIDI, TO>
impl<CH1, CH2, FROM, BIDI, TO> Unpin for Config<CH1, CH2, FROM, BIDI, TO>
impl<CH1, CH2, FROM, BIDI, TO> UnwindSafe for Config<CH1, CH2, FROM, BIDI, TO>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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