Struct bcm2711_pac::MemoryField
source · [−]#[repr(transparent)]pub struct MemoryField<T: UIntLike, R: RegisterLongName = ()> {
pub value: T,
/* private fields */
}
Expand description
An on-memory value that can be read and written through the interface of
tock_registers
and follows inherited mutability.
Fields
value: T
Implementations
sourceimpl<T: UIntLike, R: RegisterLongName> MemoryField<T, R>
impl<T: UIntLike, R: RegisterLongName> MemoryField<T, R>
pub const fn new(value: T) -> Self
pub fn set(&mut self, value: T)
pub fn write(&mut self, field: FieldValue<T, R>)
pub fn modify(&mut self, field: FieldValue<T, R>)
Trait Implementations
sourceimpl<T: UIntLike, R: RegisterLongName> Clone for MemoryField<T, R>
impl<T: UIntLike, R: RegisterLongName> Clone for MemoryField<T, R>
sourceimpl<T: UIntLike + Debug, R: RegisterLongName> Debug for MemoryField<T, R>
impl<T: UIntLike + Debug, R: RegisterLongName> Debug for MemoryField<T, R>
sourceimpl<T: UIntLike + Default, R: RegisterLongName> Default for MemoryField<T, R>
impl<T: UIntLike + Default, R: RegisterLongName> Default for MemoryField<T, R>
sourceimpl<T: UIntLike, R: RegisterLongName> From<FieldValue<T, R>> for MemoryField<T, R>
impl<T: UIntLike, R: RegisterLongName> From<FieldValue<T, R>> for MemoryField<T, R>
sourcefn from(field: FieldValue<T, R>) -> Self
fn from(field: FieldValue<T, R>) -> Self
Converts to this type from the input type.
sourceimpl<T: UIntLike, R: RegisterLongName> Readable for MemoryField<T, R>
impl<T: UIntLike, R: RegisterLongName> Readable for MemoryField<T, R>
type T = T
type R = R
sourcefn read_as_enum<E>(&self, field: Field<Self::T, Self::R>) -> Option<E> where
E: TryFromValue<Self::T, EnumType = E>,
fn read_as_enum<E>(&self, field: Field<Self::T, Self::R>) -> Option<E> where
E: TryFromValue<Self::T, EnumType = E>,
Set the raw register value
sourcefn extract(&self) -> LocalRegisterCopy<Self::T, Self::R>
fn extract(&self) -> LocalRegisterCopy<Self::T, Self::R>
Make a local copy of the register
sourcefn is_set(&self, field: Field<Self::T, Self::R>) -> bool
fn is_set(&self, field: Field<Self::T, Self::R>) -> bool
Check if one or more bits in a field are set
sourcefn matches_any(&self, field: FieldValue<Self::T, Self::R>) -> bool
fn matches_any(&self, field: FieldValue<Self::T, Self::R>) -> bool
Check if any specified parts of a field match
sourcefn matches_all(&self, field: FieldValue<Self::T, Self::R>) -> bool
fn matches_all(&self, field: FieldValue<Self::T, Self::R>) -> bool
Check if all specified parts of a field match
impl<T: UIntLike, R: RegisterLongName> Copy for MemoryField<T, R>
Auto Trait Implementations
impl<T, R> RefUnwindSafe for MemoryField<T, R> where
R: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, R> Send for MemoryField<T, R> where
R: Send,
T: Send,
impl<T, R> Sync for MemoryField<T, R> where
R: Sync,
T: Sync,
impl<T, R> Unpin for MemoryField<T, R> where
R: Unpin,
T: Unpin,
impl<T, R> UnwindSafe for MemoryField<T, R> where
R: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more