Struct rp2040_hal::dma::single_buffer::Config
source · pub struct Config<CH: SingleChannel, FROM: ReadTarget, TO: WriteTarget> { /* private fields */ }
Expand description
Configuration for single-buffered DMA transfer
Implementations§
source§impl<CH, FROM, TO, WORD> Config<CH, FROM, TO>where
CH: SingleChannel,
FROM: ReadTarget<ReceivedWord = WORD>,
TO: WriteTarget<TransmittedWord = WORD>,
impl<CH, FROM, TO, WORD> Config<CH, FROM, TO>where
CH: SingleChannel,
FROM: ReadTarget<ReceivedWord = WORD>,
TO: WriteTarget<TransmittedWord = WORD>,
sourcepub fn new(ch: CH, from: FROM, to: TO) -> Config<CH, FROM, TO>
pub fn new(ch: CH, from: FROM, to: TO) -> Config<CH, FROM, TO>
Create a new configuration for single-buffered DMA transfer
sourcepub fn pace(&mut self, pace: Pace)
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.
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<CH, FROM, TO> Freeze for Config<CH, FROM, TO>
impl<CH, FROM, TO> RefUnwindSafe for Config<CH, FROM, TO>
impl<CH, FROM, TO> Send for Config<CH, FROM, TO>
impl<CH, FROM, TO> Sync for Config<CH, FROM, TO>
impl<CH, FROM, TO> Unpin for Config<CH, FROM, TO>
impl<CH, FROM, TO> UnwindSafe for Config<CH, FROM, 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