Struct stm32wlxx_hal::i2c::I2c3
source · pub struct I2c3<PINS> { /* private fields */ }
Expand description
I2C3 peripheral operating in master mode
Implementations§
source§impl<SCL, SDA> I2c3<(SCL, SDA)>
impl<SCL, SDA> I2c3<(SCL, SDA)>
sourcepub fn new(
i2c: I2C3,
pins: (SCL, SDA),
freq_hz: u32,
rcc: &mut RCC,
pullup: bool,
cs: &CriticalSection
) -> Selfwhere
SCL: I2c3Scl + PinOps,
SDA: I2c3Sda + PinOps,
pub fn new( i2c: I2C3, pins: (SCL, SDA), freq_hz: u32, rcc: &mut RCC, pullup: bool, cs: &CriticalSection ) -> Selfwhere SCL: I2c3Scl + PinOps, SDA: I2c3Sda + PinOps,
Configures the I2C peripheral as master with the indicated frequency. The implementation takes care of setting the peripheral to standard/fast mode depending on the indicated frequency and generates values for SCLL and SCLH durations
Panics
- Frequency is greater than 1 MHz
- Resulting TIMINGR fields PRESC, SCLDEL, SCADEL, SCLH, SCLL are out of range
sourcepub fn free(self) -> (I2C3, (SCL, SDA))
pub fn free(self) -> (I2C3, (SCL, SDA))
Releases the I2C peripheral and associated pins
Trait Implementations§
Auto Trait Implementations§
impl<PINS> RefUnwindSafe for I2c3<PINS>where PINS: RefUnwindSafe,
impl<PINS> Send for I2c3<PINS>where PINS: Send,
impl<PINS> !Sync for I2c3<PINS>
impl<PINS> Unpin for I2c3<PINS>where PINS: Unpin,
impl<PINS> UnwindSafe for I2c3<PINS>where 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