pub struct I2cRegister { /* private fields */ }Expand description
Represents the possible states of the I²C configuration register (0x800F).
Implementations§
Source§impl I2cRegister
impl I2cRegister
Sourcepub fn fast_mode_plus(&self) -> bool
pub fn fast_mode_plus(&self) -> bool
Check if I²C Fast Mode+ enabled.
Defaults to enabled.
Sourcepub fn set_fast_mode_plus(&mut self, fast_mode_plus: bool)
pub fn set_fast_mode_plus(&mut self, fast_mode_plus: bool)
Enable or disable I²C Fast Mode+.
Sourcepub fn i2c_threshold_halved(&self) -> bool
pub fn i2c_threshold_halved(&self) -> bool
Check if the I²C threshold level is halved.
The default is disabled.
Sourcepub fn set_i2c_threshold_halved(&mut self, i2c_threshold_halved: bool)
pub fn set_i2c_threshold_halved(&mut self, i2c_threshold_halved: bool)
Enable or disable halving the I²C threshold level.
Sourcepub fn sda_current_limiter(&self) -> bool
pub fn sda_current_limiter(&self) -> bool
Check if the I²C current limit is enabled.
The defualt is enabled.
Sourcepub fn set_sda_current_limiter(&mut self, sda_current_limiter: bool)
pub fn set_sda_current_limiter(&mut self, sda_current_limiter: bool)
Enable or disable the I²C current limiter.
Trait Implementations§
Source§impl Clone for I2cRegister
impl Clone for I2cRegister
Source§fn clone(&self) -> I2cRegister
fn clone(&self) -> I2cRegister
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for I2cRegister
impl Debug for I2cRegister
Source§impl Default for I2cRegister
impl Default for I2cRegister
Source§impl<'a> From<&'a [u8]> for I2cRegister
impl<'a> From<&'a [u8]> for I2cRegister
Source§impl From<I2cRegister> for [u8; 2]
impl From<I2cRegister> for [u8; 2]
Source§fn from(register: I2cRegister) -> Self
fn from(register: I2cRegister) -> Self
Converts to this type from the input type.
Source§impl Ord for I2cRegister
impl Ord for I2cRegister
Source§fn cmp(&self, other: &I2cRegister) -> Ordering
fn cmp(&self, other: &I2cRegister) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for I2cRegister
impl PartialEq for I2cRegister
Source§fn eq(&self, other: &I2cRegister) -> bool
fn eq(&self, other: &I2cRegister) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for I2cRegister
impl PartialOrd for I2cRegister
impl Copy for I2cRegister
impl Eq for I2cRegister
impl StructuralPartialEq for I2cRegister
Auto Trait Implementations§
impl Freeze for I2cRegister
impl RefUnwindSafe for I2cRegister
impl Send for I2cRegister
impl Sync for I2cRegister
impl Unpin for I2cRegister
impl UnsafeUnpin for I2cRegister
impl UnwindSafe for I2cRegister
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
Mutably borrows from an owned value. Read more