[][src]Struct imxrt1062_hal::i2c::I2C

pub struct I2C<M> { /* fields omitted */ }

An I2C master

By default, the I2C master runs at 100KHz, Use set_clock_speed to vary the I2C bus speed.

Methods

impl<M> I2C<M> where
    M: Module
[src]

pub fn set_clock_speed(
    &mut self,
    clock_speed: ClockSpeed
) -> Result<(), ClockSpeedError>
[src]

Set the I2C master clock speed

pub fn set_pin_low_timeout(
    &mut self,
    timeout: Duration
) -> Result<(), PinLowTimeoutError>
[src]

Set the pin low timeout

If SCL or, either SCL or SDA, is low for longer than the specified duration, then the I2C hardware indicates an error. If the timeout is 0, then the detection is disabled.

If the number of cycles required to represent the duration is too large, returns a PinLowTimeoutError. Try using a smaller duration.

pub fn set_bus_idle_timeout(
    &mut self,
    timeout: Duration
) -> Result<(), BusIdleTimeoutError>
[src]

Set the bus idle timeout

If both SCL and SDA are high for longer than the timeout, then the I2C bus is assumed to be idle and the master can generate a START condition. If the timeout is 0, then the idle is disabled.

If the number of cycles required to represent the duration is too large, returns a BusIdleTimeoutError. Try using a smaller timeout.

Trait Implementations

impl<M> Read for I2C<M> where
    M: Module
[src]

type Error = Error

Error type

impl<M> Write for I2C<M> where
    M: Module
[src]

type Error = Error

Error type

impl<M> WriteRead for I2C<M> where
    M: Module
[src]

type Error = Error

Error type

Auto Trait Implementations

impl<M> !Send for I2C<M>

impl<M> !Sync for I2C<M>

impl<M> Unpin for I2C<M> where
    M: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.