Struct stm32f429_hal::i2c::I2c
[−]
[src]
pub struct I2c<I2C, SCL, SDA> { /* fields omitted */ }I2C peripheral operating in master mode
Methods
impl<SCL, SDA> I2c<I2C1, SCL, SDA>[src]
pub fn i2c1<F>(
i2c: I2C1,
scl: SCL,
sda: SDA,
freq: F,
clocks: Clocks,
apb1: &mut APB1
) -> Self where
F: Into<KiloHertz>,
SCL: SclPin<I2C1>,
SDA: SdaPin<I2C1>, [src]
i2c: I2C1,
scl: SCL,
sda: SDA,
freq: F,
clocks: Clocks,
apb1: &mut APB1
) -> Self where
F: Into<KiloHertz>,
SCL: SclPin<I2C1>,
SDA: SdaPin<I2C1>,
Configures the I2C peripheral to work in master mode
freq: Maximum 400 KHz
impl<SCL, SDA> I2c<I2C2, SCL, SDA>[src]
pub fn i2c2<F>(
i2c: I2C2,
scl: SCL,
sda: SDA,
freq: F,
clocks: Clocks,
apb1: &mut APB1
) -> Self where
F: Into<KiloHertz>,
SCL: SclPin<I2C2>,
SDA: SdaPin<I2C2>, [src]
i2c: I2C2,
scl: SCL,
sda: SDA,
freq: F,
clocks: Clocks,
apb1: &mut APB1
) -> Self where
F: Into<KiloHertz>,
SCL: SclPin<I2C2>,
SDA: SdaPin<I2C2>,
Configures the I2C peripheral to work in master mode
freq: Maximum 400 KHz
impl<SCL, SDA> I2c<I2C3, SCL, SDA>[src]
pub fn i2c3<F>(
i2c: I2C3,
scl: SCL,
sda: SDA,
freq: F,
clocks: Clocks,
apb1: &mut APB1
) -> Self where
F: Into<KiloHertz>,
SCL: SclPin<I2C3>,
SDA: SdaPin<I2C3>, [src]
i2c: I2C3,
scl: SCL,
sda: SDA,
freq: F,
clocks: Clocks,
apb1: &mut APB1
) -> Self where
F: Into<KiloHertz>,
SCL: SclPin<I2C3>,
SDA: SdaPin<I2C3>,
Configures the I2C peripheral to work in master mode
freq: Maximum 400 KHz
Trait Implementations
impl<SCL, SDA> Read for I2c<I2C1, SCL, SDA>[src]
type Error = Error
Error type
fn read(&mut self, addr: u8, buffer: &mut [u8]) -> Result<(), Error>[src]
Reads enough bytes from slave with address to fill buffer Read more
impl<SCL, SDA> Write for I2c<I2C1, SCL, SDA>[src]
type Error = Error
Error type
fn write(&mut self, addr: u8, bytes: &[u8]) -> Result<(), Error>[src]
Sends bytes to slave with address addr Read more
impl<SCL, SDA> Read for I2c<I2C2, SCL, SDA>[src]
type Error = Error
Error type
fn read(&mut self, addr: u8, buffer: &mut [u8]) -> Result<(), Error>[src]
Reads enough bytes from slave with address to fill buffer Read more
impl<SCL, SDA> Write for I2c<I2C2, SCL, SDA>[src]
type Error = Error
Error type
fn write(&mut self, addr: u8, bytes: &[u8]) -> Result<(), Error>[src]
Sends bytes to slave with address addr Read more
impl<SCL, SDA> Read for I2c<I2C3, SCL, SDA>[src]
type Error = Error
Error type
fn read(&mut self, addr: u8, buffer: &mut [u8]) -> Result<(), Error>[src]
Reads enough bytes from slave with address to fill buffer Read more