#[repr(transparent)]struct Mode(u8);
Expand description
Mode register (only writable)
Tuple Fields§
§0: u8
Implementations§
source§impl Mode
impl Mode
const FORMAT_BITS: usize = 1usize
const FORMAT_OFFSET: usize = 0usize
const OPERATION_BITS: usize = 3usize
const OPERATION_OFFSET: usize = 1usize
const ACCESS_BITS: usize = 2usize
const ACCESS_OFFSET: usize = 4usize
const CHANNEL_BITS: usize = 2usize
const CHANNEL_OFFSET: usize = 6usize
sourceconst fn with_format_checked(self, value: bool) -> Result<Self, ()>
const fn with_format_checked(self, value: bool) -> Result<Self, ()>
Bits: 0..1
sourceconst fn with_format(self, value: bool) -> Self
const fn with_format(self, value: bool) -> Self
Bits: 0..1
sourcefn set_format(&mut self, value: bool)
fn set_format(&mut self, value: bool)
Bits: 0..1
sourcefn set_format_checked(&mut self, value: bool) -> Result<(), ()>
fn set_format_checked(&mut self, value: bool) -> Result<(), ()>
Bits: 0..1
sourceconst fn with_operation_checked(self, value: Operation) -> Result<Self, ()>
const fn with_operation_checked(self, value: Operation) -> Result<Self, ()>
Bits: 1..4
sourceconst fn with_operation(self, value: Operation) -> Self
const fn with_operation(self, value: Operation) -> Self
Bits: 1..4
sourcefn set_operation(&mut self, value: Operation)
fn set_operation(&mut self, value: Operation)
Bits: 1..4
sourcefn set_operation_checked(&mut self, value: Operation) -> Result<(), ()>
fn set_operation_checked(&mut self, value: Operation) -> Result<(), ()>
Bits: 1..4
sourceconst fn with_access_checked(self, value: Access) -> Result<Self, ()>
const fn with_access_checked(self, value: Access) -> Result<Self, ()>
Bits: 4..6
sourceconst fn with_access(self, value: Access) -> Self
const fn with_access(self, value: Access) -> Self
Bits: 4..6
sourcefn set_access(&mut self, value: Access)
fn set_access(&mut self, value: Access)
Bits: 4..6
sourcefn set_access_checked(&mut self, value: Access) -> Result<(), ()>
fn set_access_checked(&mut self, value: Access) -> Result<(), ()>
Bits: 4..6
sourceconst fn with_channel_checked(self, value: u8) -> Result<Self, ()>
const fn with_channel_checked(self, value: u8) -> Result<Self, ()>
Bits: 6..8
sourceconst fn with_channel(self, value: u8) -> Self
const fn with_channel(self, value: u8) -> Self
Bits: 6..8
sourcefn set_channel(&mut self, value: u8)
fn set_channel(&mut self, value: u8)
Bits: 6..8
sourcefn set_channel_checked(&mut self, value: u8) -> Result<(), ()>
fn set_channel_checked(&mut self, value: u8) -> Result<(), ()>
Bits: 6..8
Trait Implementations§
impl Copy for Mode
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnwindSafe for Mode
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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>,
Casts the value.
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>
Casts the value.
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
§impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
§impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,
impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,
source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.