pub struct IntControlMode { /* private fields */ }
Expand description
Interrupt enable control bit flags use by interrupt_control() and set_interrupt_control() methods.
Implementations§
Source§impl IntControlMode
impl IntControlMode
Sourcepub const DATA_READY_DISABLE: IntControlMode
pub const DATA_READY_DISABLE: IntControlMode
Disable DATA_READY interrupt.
Function is always enabled.
Sourcepub const DATA_READY_ENABLE: IntControlMode
pub const DATA_READY_ENABLE: IntControlMode
Enable DATA_READY interrupt.
Sourcepub const SINGLE_TAP_DISABLE: IntControlMode
pub const SINGLE_TAP_DISABLE: IntControlMode
Disable SINGLE_TAP interrupt and function.
Sourcepub const SINGLE_TAP_ENABLE: IntControlMode
pub const SINGLE_TAP_ENABLE: IntControlMode
Enable SINGLE_TAP interrupt and function.
Sourcepub const DOUBLE_TAP_DISABLE: IntControlMode
pub const DOUBLE_TAP_DISABLE: IntControlMode
Disable DOUBLE_TAP interrupt and function.
Sourcepub const DOUBLE_TAP_ENABLE: IntControlMode
pub const DOUBLE_TAP_ENABLE: IntControlMode
Enable DOUBLE_TAP interrupt and function.
Sourcepub const ACTIVITY_DISABLE: IntControlMode
pub const ACTIVITY_DISABLE: IntControlMode
Disable ACTIVITY interrupt and function.
Sourcepub const ACTIVITY_ENABLE: IntControlMode
pub const ACTIVITY_ENABLE: IntControlMode
Enable ACTIVITY interrupt and function.
Sourcepub const INACTIVITY_DISABLE: IntControlMode
pub const INACTIVITY_DISABLE: IntControlMode
Disable INACTIVITY interrupt and function.
Sourcepub const INACTIVITY_ENABLE: IntControlMode
pub const INACTIVITY_ENABLE: IntControlMode
Enable INACTIVITY interrupt and function.
Sourcepub const FREE_FALL_DISABLE: IntControlMode
pub const FREE_FALL_DISABLE: IntControlMode
Disable FREE_FALL interrupt and function.
Sourcepub const FREE_FALL_ENABLE: IntControlMode
pub const FREE_FALL_ENABLE: IntControlMode
Enable FREE_FALL interrupt and function.
Sourcepub const WATERMARK_DISABLE: IntControlMode
pub const WATERMARK_DISABLE: IntControlMode
Disable WATERMARK interrupt.
Function is always enabled.
Sourcepub const WATERMARK_ENABLE: IntControlMode
pub const WATERMARK_ENABLE: IntControlMode
Enable WATERMARK interrupt.
Sourcepub const OVERRUN_DISABLE: IntControlMode
pub const OVERRUN_DISABLE: IntControlMode
Disable OVERRUN interrupt.
Function is always enabled.
Sourcepub const OVERRUN_ENABLE: IntControlMode
pub const OVERRUN_ENABLE: IntControlMode
Enable OVERRUN interrupt.
Sourcepub const fn empty() -> IntControlMode
pub const fn empty() -> IntControlMode
Returns an empty set of flags
Sourcepub const fn all() -> IntControlMode
pub const fn all() -> IntControlMode
Returns the set containing all flags.
Sourcepub fn from_bits(bits: u8) -> Option<IntControlMode>
pub fn from_bits(bits: u8) -> Option<IntControlMode>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u8) -> IntControlMode
pub const fn from_bits_truncate(bits: u8) -> IntControlMode
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u8) -> IntControlMode
pub const unsafe fn from_bits_unchecked(bits: u8) -> IntControlMode
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: IntControlMode) -> bool
pub const fn intersects(&self, other: IntControlMode) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: IntControlMode) -> bool
pub const fn contains(&self, other: IntControlMode) -> bool
Returns true
all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: IntControlMode)
pub fn insert(&mut self, other: IntControlMode)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: IntControlMode)
pub fn remove(&mut self, other: IntControlMode)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: IntControlMode)
pub fn toggle(&mut self, other: IntControlMode)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: IntControlMode, value: bool)
pub fn set(&mut self, other: IntControlMode, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for IntControlMode
impl Binary for IntControlMode
Source§impl BitAnd for IntControlMode
impl BitAnd for IntControlMode
Source§fn bitand(self, other: IntControlMode) -> IntControlMode
fn bitand(self, other: IntControlMode) -> IntControlMode
Returns the intersection between the two sets of flags.
Source§type Output = IntControlMode
type Output = IntControlMode
&
operator.Source§impl BitAndAssign for IntControlMode
impl BitAndAssign for IntControlMode
Source§fn bitand_assign(&mut self, other: IntControlMode)
fn bitand_assign(&mut self, other: IntControlMode)
Disables all flags disabled in the set.
Source§impl BitOr for IntControlMode
impl BitOr for IntControlMode
Source§fn bitor(self, other: IntControlMode) -> IntControlMode
fn bitor(self, other: IntControlMode) -> IntControlMode
Returns the union of the two sets of flags.
Source§type Output = IntControlMode
type Output = IntControlMode
|
operator.Source§impl BitOrAssign for IntControlMode
impl BitOrAssign for IntControlMode
Source§fn bitor_assign(&mut self, other: IntControlMode)
fn bitor_assign(&mut self, other: IntControlMode)
Adds the set of flags.
Source§impl BitXor for IntControlMode
impl BitXor for IntControlMode
Source§fn bitxor(self, other: IntControlMode) -> IntControlMode
fn bitxor(self, other: IntControlMode) -> IntControlMode
Returns the left flags, but with all the right flags toggled.
Source§type Output = IntControlMode
type Output = IntControlMode
^
operator.Source§impl BitXorAssign for IntControlMode
impl BitXorAssign for IntControlMode
Source§fn bitxor_assign(&mut self, other: IntControlMode)
fn bitxor_assign(&mut self, other: IntControlMode)
Toggles the set of flags.
Source§impl Clone for IntControlMode
impl Clone for IntControlMode
Source§fn clone(&self) -> IntControlMode
fn clone(&self) -> IntControlMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for IntControlMode
impl Debug for IntControlMode
Source§impl Default for IntControlMode
impl Default for IntControlMode
Source§fn default() -> IntControlMode
fn default() -> IntControlMode
Source§impl Extend<IntControlMode> for IntControlMode
impl Extend<IntControlMode> for IntControlMode
Source§fn extend<T: IntoIterator<Item = IntControlMode>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = IntControlMode>>(&mut self, iterator: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl FromIterator<IntControlMode> for IntControlMode
impl FromIterator<IntControlMode> for IntControlMode
Source§fn from_iter<T: IntoIterator<Item = IntControlMode>>(
iterator: T,
) -> IntControlMode
fn from_iter<T: IntoIterator<Item = IntControlMode>>( iterator: T, ) -> IntControlMode
Source§impl Hash for IntControlMode
impl Hash for IntControlMode
Source§impl LowerHex for IntControlMode
impl LowerHex for IntControlMode
Source§impl Not for IntControlMode
impl Not for IntControlMode
Source§fn not(self) -> IntControlMode
fn not(self) -> IntControlMode
Returns the complement of this set of flags.
Source§type Output = IntControlMode
type Output = IntControlMode
!
operator.Source§impl Octal for IntControlMode
impl Octal for IntControlMode
Source§impl Ord for IntControlMode
impl Ord for IntControlMode
Source§fn cmp(&self, other: &IntControlMode) -> Ordering
fn cmp(&self, other: &IntControlMode) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for IntControlMode
impl PartialEq for IntControlMode
Source§impl PartialOrd for IntControlMode
impl PartialOrd for IntControlMode
Source§impl Sub for IntControlMode
impl Sub for IntControlMode
Source§fn sub(self, other: IntControlMode) -> IntControlMode
fn sub(self, other: IntControlMode) -> IntControlMode
Returns the set difference of the two sets of flags.
Source§type Output = IntControlMode
type Output = IntControlMode
-
operator.Source§impl SubAssign for IntControlMode
impl SubAssign for IntControlMode
Source§fn sub_assign(&mut self, other: IntControlMode)
fn sub_assign(&mut self, other: IntControlMode)
Disables all flags enabled in the set.