Struct mnemos_d1_core::dmac::descriptor::Cfg
source · #[repr(transparent)]struct Cfg(u32);
Expand description
A DMAC descriptor Configuration
field.
Tuple Fields§
§0: u32
Implementations§
source§impl Cfg
impl Cfg
sourceconst SRC_DRQ_TYPE: Pack32<SrcDrqType, Self> = _
const SRC_DRQ_TYPE: Pack32<SrcDrqType, Self> = _
DMA source DRQ type.
sourceconst SRC_BLOCK_SIZE: Pack32<BlockSize, Self> = _
const SRC_BLOCK_SIZE: Pack32<BlockSize, Self> = _
DMA source block size.
sourceconst SRC_ADDR_MODE: Pack32<AddressMode, Self> = _
const SRC_ADDR_MODE: Pack32<AddressMode, Self> = _
DMA source address mode.
sourceconst SRC_DATA_WIDTH: Pack32<DataWidth, Self> = _
const SRC_DATA_WIDTH: Pack32<DataWidth, Self> = _
DMA source data width.
const _RESERVED_0: Pack32<u32, Self> = _
sourceconst DEST_DRQ_TYPE: Pack32<DestDrqType, Self> = _
const DEST_DRQ_TYPE: Pack32<DestDrqType, Self> = _
DMA destination DRQ type
sourceconst DEST_BLOCK_SIZE: Pack32<BlockSize, Self> = _
const DEST_BLOCK_SIZE: Pack32<BlockSize, Self> = _
DMA destination block size.
sourceconst DEST_ADDR_MODE: Pack32<AddressMode, Self> = _
const DEST_ADDR_MODE: Pack32<AddressMode, Self> = _
DMA destination address mode.
sourceconst DEST_DATA_WIDTH: Pack32<DataWidth, Self> = _
const DEST_DATA_WIDTH: Pack32<DataWidth, Self> = _
DMA destination data width.
const _RESERVED_1: Pack32<u32, Self> = _
const FIELDS: &'static [(&'static str, Pack32<u32, Self>)] = _
sourceconst fn from_bits(bits: u32) -> Self
const fn from_bits(bits: u32) -> Self
Constructs a new instance of Self
from the provided raw bits.
sourcefn with<T>(self, field: Pack32<T, Self>, value: T) -> Self
fn with<T>(self, field: Pack32<T, Self>, value: T) -> Self
Packs the bit representation of value
into self
at the bit
range designated by field
, returning a new bitfield.
sourcefn set<T>(&mut self, field: Pack32<T, Self>, value: T) -> &mut Self
fn set<T>(&mut self, field: Pack32<T, Self>, value: T) -> &mut Self
Packs the bit representation of value
into self
at the range
designated by field
, mutating self
in place.
sourcefn get<T>(self, field: Pack32<T, Self>) -> T
fn get<T>(self, field: Pack32<T, Self>) -> T
Unpacks the bit range represented by field
from self
, and
converts it into a T
-typed value.
§Panics
This method panics if self
does not contain a valid bit
pattern for a T
-typed value, as determined by T
’s
FromBits::try_from_bits
implementation.
sourcefn try_get<T>(self, field: Pack32<T, Self>) -> Result<T, T::Error>
fn try_get<T>(self, field: Pack32<T, Self>) -> Result<T, T::Error>
Unpacks the bit range represented by field
from self
and attempts to convert it into a T
-typed value.
§Returns
Ok(T)
if aT
-typed value could be constructed from the bits insrc
Err(T::Error)
ifsrc
does not contain a valid bit pattern for aT
-typed value, as determined byT
’s [FromBits::try_from_bits
implementation.
sourcefn assert_valid()
fn assert_valid()
Asserts that all the packing specs for this type are valid.
This is intended to be used in unit tests.
sourcefn display_ascii(&self) -> impl Display
fn display_ascii(&self) -> impl Display
Returns a value that formats this bitfield in a multi-line format, using only ASCII characters.
This is equivalent to formatting this bitfield using a {}
display specifier, but will never use Unicode box-drawing
characters, even when an upstream formatter uses the {:#}
fmt::Display
specifier. This is intended for use on platforms
where Unicode box drawing characters are never available.
sourcefn display_unicode(&self) -> impl Display
fn display_unicode(&self) -> impl Display
Returns a value that formats this bitfield in a multi-line format, always using Unicode box-drawing characters.
This is equivalent to formatting this bitfield using a {:#}
format specifier, but will always use Unicode box-drawing
characters, even when an upstream formatter uses the {}
fmt::Display
specifier.
fn fmt_ascii(&self, f: &mut Formatter<'_>) -> Result
fn fmt_unicode(&self, f: &mut Formatter<'_>) -> Result
Trait Implementations§
impl Copy for Cfg
Auto Trait Implementations§
impl Freeze for Cfg
impl RefUnwindSafe for Cfg
impl Send for Cfg
impl Sync for Cfg
impl Unpin for Cfg
impl UnwindSafe for Cfg
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)