pub struct Config {
pub frequency: HertzU32,
pub timeout: Option<u32>,
}Expand description
I2C driver configuration
Fields§
§frequency: HertzU32The I2C clock frequency.
timeout: Option<u32>I2C SCL timeout period.
When the level of SCL remains unchanged for more than timeout bus
clock cycles, the bus goes to idle state.
The default value is about 10 bus clock cycles.
Note that the effective timeout may be longer than the value configured here.
Configuring None disables timeout control.
Trait Implementations§
impl Copy for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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