Struct I2c

Source
pub struct I2c<I2C, SCL, SDA> { /* private fields */ }
Expand description

I2C peripheral operating in master mode

Implementations§

Source§

impl<SCL, SDA> I2c<I2C1, SCL, SDA>

Source

pub fn i2c1( i2c: I2C1, pins: (SCL, SDA), mode: Mode, clocks: &Clocks, apb: &mut <I2C1 as RccBus>::Bus, ) -> Self
where SCL: PinScl<I2C1>, SDA: PinSda<I2C1>,

Creates a generic I2C1 object.

Source§

impl<SCL, SDA> I2c<I2C2, SCL, SDA>

Source

pub fn i2c2( i2c: I2C2, pins: (SCL, SDA), mode: Mode, clocks: &Clocks, apb: &mut <I2C2 as RccBus>::Bus, ) -> Self
where SCL: PinScl<I2C2>, SDA: PinSda<I2C2>,

Creates a generic I2C2 object.

Source§

impl<SCL, SDA> I2c<I2C3, SCL, SDA>

Source

pub fn i2c3( i2c: I2C3, pins: (SCL, SDA), mode: Mode, clocks: &Clocks, apb: &mut <I2C3 as RccBus>::Bus, ) -> Self
where SCL: PinScl<I2C3>, SDA: PinSda<I2C3>,

Creates a generic I2C3 object.

Source§

impl<SCL, SDA> I2c<I2C1, SCL, SDA>

Source

pub fn free(self) -> (I2C1, (SCL, SDA))

Releases the I2C peripheral and associated pins

Source§

impl<SCL, SDA> I2c<I2C2, SCL, SDA>

Source

pub fn free(self) -> (I2C2, (SCL, SDA))

Releases the I2C peripheral and associated pins

Source§

impl<SCL, SDA> I2c<I2C3, SCL, SDA>

Source

pub fn free(self) -> (I2C3, (SCL, SDA))

Releases the I2C peripheral and associated pins

Auto Trait Implementations§

§

impl<I2C, SCL, SDA> Freeze for I2c<I2C, SCL, SDA>
where I2C: Freeze, SCL: Freeze, SDA: Freeze,

§

impl<I2C, SCL, SDA> RefUnwindSafe for I2c<I2C, SCL, SDA>
where I2C: RefUnwindSafe, SCL: RefUnwindSafe, SDA: RefUnwindSafe,

§

impl<I2C, SCL, SDA> Send for I2c<I2C, SCL, SDA>
where I2C: Send, SCL: Send, SDA: Send,

§

impl<I2C, SCL, SDA> Sync for I2c<I2C, SCL, SDA>
where I2C: Sync, SCL: Sync, SDA: Sync,

§

impl<I2C, SCL, SDA> Unpin for I2c<I2C, SCL, SDA>
where I2C: Unpin, SCL: Unpin, SDA: Unpin,

§

impl<I2C, SCL, SDA> UnwindSafe for I2c<I2C, SCL, SDA>
where I2C: UnwindSafe, SCL: UnwindSafe, SDA: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.