Struct mpu9250::InterruptConfig
source · pub struct InterruptConfig { /* private fields */ }
Expand description
Interrupt configuration Defaults: active high, push-pull, 50 us pulse, cleared only by reading INT_STATUS
Implementations§
source§impl InterruptConfig
impl InterruptConfig
sourcepub const ACL: InterruptConfig = _
pub const ACL: InterruptConfig = _
Sets logic level for INT pin is active low (high if not set)
sourcepub const OPEN: InterruptConfig = _
pub const OPEN: InterruptConfig = _
INT pin is configured as open drain (push pull if not set)
sourcepub const LATCH_INT_EN: InterruptConfig = _
pub const LATCH_INT_EN: InterruptConfig = _
INT pin level held untilinterrupt status is cleared (cleared within 50us if not set)
sourcepub const INT_ANYRD_CLEAR: InterruptConfig = _
pub const INT_ANYRD_CLEAR: InterruptConfig = _
Interrupt status is cleared if any read operation is performed (cleared only by reading INT_STATUS if not set)
sourcepub const ACTL_FSYNC: InterruptConfig = _
pub const ACTL_FSYNC: InterruptConfig = _
The logic level for the FSYNC pin as an interrupt is active low (active high if not set)
sourcepub const FSYNC_INT_MODE_EN: InterruptConfig = _
pub const FSYNC_INT_MODE_EN: InterruptConfig = _
This enables the FSYNC pin to be used as an interrupt. A transition to the active level described by the ACTL_FSYNC bit will cause an interrupt. The status of the interrupt is read in the I2C Master Status register PASS_THROUGH bit (disabled if not set)
sourcepub const BYPASS_EN: InterruptConfig = _
pub const BYPASS_EN: InterruptConfig = _
When asserted, the i2c_master interface pins(ES_CL and ES_DA) will go into ‘bypass mode’ when the i2c master interface is disabled. The pins will float high due to the internal pull-up if not enabled and the i2c master interface is disabled
sourcepub const fn empty() -> InterruptConfig
pub const fn empty() -> InterruptConfig
Returns an empty set of flags
sourcepub const fn all() -> InterruptConfig
pub const fn all() -> InterruptConfig
Returns the set containing all flags.
sourcepub fn from_bits(bits: u8) -> Option<InterruptConfig>
pub fn from_bits(bits: u8) -> Option<InterruptConfig>
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) -> InterruptConfig
pub const fn from_bits_truncate(bits: u8) -> InterruptConfig
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
sourcepub const unsafe fn from_bits_unchecked(bits: u8) -> InterruptConfig
pub const unsafe fn from_bits_unchecked(bits: u8) -> InterruptConfig
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
sourcepub const fn intersects(&self, other: InterruptConfig) -> bool
pub const fn intersects(&self, other: InterruptConfig) -> bool
Returns true
if there are flags common to both self
and other
.
sourcepub const fn contains(&self, other: InterruptConfig) -> bool
pub const fn contains(&self, other: InterruptConfig) -> bool
Returns true
all of the flags in other
are contained within self
.
sourcepub fn insert(&mut self, other: InterruptConfig)
pub fn insert(&mut self, other: InterruptConfig)
Inserts the specified flags in-place.
sourcepub fn remove(&mut self, other: InterruptConfig)
pub fn remove(&mut self, other: InterruptConfig)
Removes the specified flags in-place.
sourcepub fn toggle(&mut self, other: InterruptConfig)
pub fn toggle(&mut self, other: InterruptConfig)
Toggles the specified flags in-place.
sourcepub fn set(&mut self, other: InterruptConfig, value: bool)
pub fn set(&mut self, other: InterruptConfig, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
source§impl Binary for InterruptConfig
impl Binary for InterruptConfig
source§impl BitAnd<InterruptConfig> for InterruptConfig
impl BitAnd<InterruptConfig> for InterruptConfig
source§fn bitand(self, other: InterruptConfig) -> InterruptConfig
fn bitand(self, other: InterruptConfig) -> InterruptConfig
Returns the intersection between the two sets of flags.
§type Output = InterruptConfig
type Output = InterruptConfig
&
operator.source§impl BitAndAssign<InterruptConfig> for InterruptConfig
impl BitAndAssign<InterruptConfig> for InterruptConfig
source§fn bitand_assign(&mut self, other: InterruptConfig)
fn bitand_assign(&mut self, other: InterruptConfig)
Disables all flags disabled in the set.
source§impl BitOr<InterruptConfig> for InterruptConfig
impl BitOr<InterruptConfig> for InterruptConfig
source§fn bitor(self, other: InterruptConfig) -> InterruptConfig
fn bitor(self, other: InterruptConfig) -> InterruptConfig
Returns the union of the two sets of flags.
§type Output = InterruptConfig
type Output = InterruptConfig
|
operator.source§impl BitOrAssign<InterruptConfig> for InterruptConfig
impl BitOrAssign<InterruptConfig> for InterruptConfig
source§fn bitor_assign(&mut self, other: InterruptConfig)
fn bitor_assign(&mut self, other: InterruptConfig)
Adds the set of flags.
source§impl BitXor<InterruptConfig> for InterruptConfig
impl BitXor<InterruptConfig> for InterruptConfig
source§fn bitxor(self, other: InterruptConfig) -> InterruptConfig
fn bitxor(self, other: InterruptConfig) -> InterruptConfig
Returns the left flags, but with all the right flags toggled.
§type Output = InterruptConfig
type Output = InterruptConfig
^
operator.source§impl BitXorAssign<InterruptConfig> for InterruptConfig
impl BitXorAssign<InterruptConfig> for InterruptConfig
source§fn bitxor_assign(&mut self, other: InterruptConfig)
fn bitxor_assign(&mut self, other: InterruptConfig)
Toggles the set of flags.
source§impl Clone for InterruptConfig
impl Clone for InterruptConfig
source§fn clone(&self) -> InterruptConfig
fn clone(&self) -> InterruptConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for InterruptConfig
impl Debug for InterruptConfig
source§impl Extend<InterruptConfig> for InterruptConfig
impl Extend<InterruptConfig> for InterruptConfig
source§fn extend<T: IntoIterator<Item = InterruptConfig>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = InterruptConfig>>(&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<InterruptConfig> for InterruptConfig
impl FromIterator<InterruptConfig> for InterruptConfig
source§fn from_iter<T: IntoIterator<Item = InterruptConfig>>(
iterator: T
) -> InterruptConfig
fn from_iter<T: IntoIterator<Item = InterruptConfig>>( iterator: T ) -> InterruptConfig
source§impl Hash for InterruptConfig
impl Hash for InterruptConfig
source§impl LowerHex for InterruptConfig
impl LowerHex for InterruptConfig
source§impl Not for InterruptConfig
impl Not for InterruptConfig
source§fn not(self) -> InterruptConfig
fn not(self) -> InterruptConfig
Returns the complement of this set of flags.
§type Output = InterruptConfig
type Output = InterruptConfig
!
operator.source§impl Octal for InterruptConfig
impl Octal for InterruptConfig
source§impl Ord for InterruptConfig
impl Ord for InterruptConfig
source§fn cmp(&self, other: &InterruptConfig) -> Ordering
fn cmp(&self, other: &InterruptConfig) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<InterruptConfig> for InterruptConfig
impl PartialEq<InterruptConfig> for InterruptConfig
source§fn eq(&self, other: &InterruptConfig) -> bool
fn eq(&self, other: &InterruptConfig) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<InterruptConfig> for InterruptConfig
impl PartialOrd<InterruptConfig> for InterruptConfig
source§fn partial_cmp(&self, other: &InterruptConfig) -> Option<Ordering>
fn partial_cmp(&self, other: &InterruptConfig) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Sub<InterruptConfig> for InterruptConfig
impl Sub<InterruptConfig> for InterruptConfig
source§fn sub(self, other: InterruptConfig) -> InterruptConfig
fn sub(self, other: InterruptConfig) -> InterruptConfig
Returns the set difference of the two sets of flags.
§type Output = InterruptConfig
type Output = InterruptConfig
-
operator.source§impl SubAssign<InterruptConfig> for InterruptConfig
impl SubAssign<InterruptConfig> for InterruptConfig
source§fn sub_assign(&mut self, other: InterruptConfig)
fn sub_assign(&mut self, other: InterruptConfig)
Disables all flags enabled in the set.