pub enum WordSize {
OneByte,
TwoBytes,
FourBytes,
}Expand description
DMA transfer data width.
Variants§
OneByte
8-bit (1 byte) transfers.
TwoBytes
16-bit (2 byte) transfers.
FourBytes
32-bit (4 byte) transfers.
Implementations§
Source§impl WordSize
impl WordSize
Sourcepub const LARGEST: WordSize = WordSize::FourBytes
pub const LARGEST: WordSize = WordSize::FourBytes
Largest WordSize supported by this HAL driver.
Sourcepub const fn to_hw_size(self) -> Size
pub const fn to_hw_size(self) -> Size
Convert to hardware SSIZE/DSIZE field value.
Sourcepub const fn from_bytes(bytes: u8) -> Option<Self>
pub const fn from_bytes(bytes: u8) -> Option<Self>
Create from byte width (1, 2, or 4).
Trait Implementations§
impl Copy for WordSize
impl Eq for WordSize
impl StructuralPartialEq for WordSize
Auto Trait Implementations§
impl Freeze for WordSize
impl RefUnwindSafe for WordSize
impl Send for WordSize
impl Sync for WordSize
impl Unpin for WordSize
impl UnwindSafe for WordSize
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