Struct stm32h7xx_hal::pac::I2C2
source · pub struct I2C2 { /* private fields */ }
Expand description
I2C
Implementations§
Trait Implementations§
source§impl I2cExt<I2C2> for I2C2
impl I2cExt<I2C2> for I2C2
source§fn i2c<PINS>(
self,
_pins: PINS,
frequency: Hertz,
prec: I2c2,
clocks: &CoreClocks
) -> I2c<I2C2>
fn i2c<PINS>( self, _pins: PINS, frequency: Hertz, prec: I2c2, clocks: &CoreClocks ) -> I2c<I2C2>
Create and initialise a new I2C peripheral.
A tuple of pins (scl, sda)
for this I2C peripheral should
be passed as pins
. This function sets each pin to
open-drain mode.
The frequency of the I2C bus clock is specified by frequency
.
§Panics
Panics if the ratio between frequency
and the i2c_ker_ck
is out of bounds. The acceptable range is [4, 8192].
Panics if the frequency
is too fast. The maximum is 1MHz.
source§fn i2c_unchecked(
self,
frequency: Hertz,
prec: I2c2,
clocks: &CoreClocks
) -> I2c<I2C2>
fn i2c_unchecked( self, frequency: Hertz, prec: I2c2, clocks: &CoreClocks ) -> I2c<I2C2>
Create and initialise a new I2C peripheral. No pin types are required.
The frequency of the I2C bus clock is specified by frequency
.
§Panics
Panics if the ratio between frequency
and the i2c_ker_ck
is out of bounds. The acceptable range is [4, 8192].
Panics if the frequency
is too fast. The maximum is 1MHz.
type Rec = I2c2
source§impl TargetAddress<MemoryToPeripheral> for I2C2
impl TargetAddress<MemoryToPeripheral> for I2C2
source§impl TargetAddress<PeripheralToMemory> for I2C2
impl TargetAddress<PeripheralToMemory> for I2C2
impl PinScl<I2C2> for PB10<Alternate<4, OpenDrain>>
impl PinScl<I2C2> for PF1<Alternate<4, OpenDrain>>
impl PinScl<I2C2> for PH4<Alternate<4, OpenDrain>>
impl PinSda<I2C2> for PB11<Alternate<4, OpenDrain>>
impl PinSda<I2C2> for PF0<Alternate<4, OpenDrain>>
impl PinSda<I2C2> for PH5<Alternate<4, OpenDrain>>
impl Send for I2C2
Auto Trait Implementations§
impl Freeze for I2C2
impl RefUnwindSafe for I2C2
impl !Sync for I2C2
impl Unpin for I2C2
impl UnwindSafe for I2C2
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