Struct stm32f042_hal::i2c::I2c
[−]
[src]
pub struct I2c<I2C, PINS> { /* fields omitted */ }I2C abstraction
Methods
impl<PINS> I2c<I2C1, PINS>[src]
pub fn i2c1(i2c: I2C1, pins: PINS, speed: KiloHertz) -> Self where
PINS: Pins<I2C1>, [src]
PINS: Pins<I2C1>,
pub fn release(self) -> (I2C1, PINS)[src]
Trait Implementations
impl<PINS> WriteRead for I2c<I2C1, PINS>[src]
type Error = Error
Error type
fn write_read(
&mut self,
addr: u8,
bytes: &[u8],
buffer: &mut [u8]
) -> Result<(), Error>[src]
&mut self,
addr: u8,
bytes: &[u8],
buffer: &mut [u8]
) -> Result<(), Error>
Sends bytes to slave with address addr and then reads enough bytes to fill buffer in a single transaction Read more