pub struct I2c<I2C, PINS> { /* private fields */ }
Expand description
I2C peripheral operating in master mode
Implementations§
Source§impl<SCL, SDA> I2c<I2C1, (SCL, SDA)>
impl<SCL, SDA> I2c<I2C1, (SCL, SDA)>
Sourcepub fn i2c1<F>(
i2c: I2C1,
pins: (SCL, SDA),
freq: F,
clocks: Clocks,
apb1: &mut APB1,
) -> Self
pub fn i2c1<F>( i2c: I2C1, pins: (SCL, SDA), freq: F, clocks: Clocks, apb1: &mut APB1, ) -> Self
Configures the I2C peripheral to work in master mode
Sourcepub fn free(self) -> (I2C1, (SCL, SDA))
pub fn free(self) -> (I2C1, (SCL, SDA))
Releases the I2C peripheral and associated pins
Source§impl<SCL, SDA> I2c<I2C2, (SCL, SDA)>
impl<SCL, SDA> I2c<I2C2, (SCL, SDA)>
Sourcepub fn i2c2<F>(
i2c: I2C2,
pins: (SCL, SDA),
freq: F,
clocks: Clocks,
apb1: &mut APB1,
) -> Self
pub fn i2c2<F>( i2c: I2C2, pins: (SCL, SDA), freq: F, clocks: Clocks, apb1: &mut APB1, ) -> Self
Configures the I2C peripheral to work in master mode
Sourcepub fn free(self) -> (I2C2, (SCL, SDA))
pub fn free(self) -> (I2C2, (SCL, SDA))
Releases the I2C peripheral and associated pins
Trait Implementations§
Auto Trait Implementations§
impl<I2C, PINS> Freeze for I2c<I2C, PINS>
impl<I2C, PINS> RefUnwindSafe for I2c<I2C, PINS>where
I2C: RefUnwindSafe,
PINS: RefUnwindSafe,
impl<I2C, PINS> Send for I2c<I2C, PINS>
impl<I2C, PINS> Sync for I2c<I2C, PINS>
impl<I2C, PINS> Unpin for I2c<I2C, PINS>
impl<I2C, PINS> UnwindSafe for I2c<I2C, PINS>where
I2C: UnwindSafe,
PINS: UnwindSafe,
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