Struct stm32h7xx_hal::device::I2C2[][src]

pub struct I2C2 { /* fields omitted */ }

I2C

Implementations

impl I2C2[src]

pub const fn ptr() -> *const RegisterBlock[src]

Returns a pointer to the register block

Trait Implementations

impl Deref for I2C2[src]

type Target = RegisterBlock

The resulting type after dereferencing.

impl I2cExt<I2C2> for I2C2[src]

type Rec = I2c2

fn i2c<PINS, F>(
    self,
    pins: PINS,
    frequency: F,
    prec: I2c2,
    clocks: &CoreClocks
) -> I2c<I2C2> where
    PINS: Pins<I2C2>,
    F: Into<Hertz>, 
[src]

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.

fn i2c_unchecked<F>(
    self,
    frequency: F,
    prec: I2c2,
    clocks: &CoreClocks
) -> I2c<I2C2> where
    F: Into<Hertz>, 
[src]

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.

impl PinScl<I2C2> for PB10<Alternate<AF4>>[src]

impl PinScl<I2C2> for PF1<Alternate<AF4>>[src]

impl PinScl<I2C2> for PH4<Alternate<AF4>>[src]

impl PinSda<I2C2> for PB11<Alternate<AF4>>[src]

impl PinSda<I2C2> for PF0<Alternate<AF4>>[src]

impl PinSda<I2C2> for PH5<Alternate<AF4>>[src]

impl Send for I2C2[src]

Auto Trait Implementations

impl !Sync for I2C2

impl Unpin for I2C2

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.