Struct stm32h7xx_hal::pac::I2C2

source ·
pub struct I2C2 { /* private fields */ }
Expand description

I2C

Implementations§

source§

impl I2C2

source

pub const PTR: *const RegisterBlock = {0x40005800 as *const stm32h7::stm32h743v::i2c1::RegisterBlock}

Pointer to the register block

source

pub const fn ptr() -> *const RegisterBlock

Return the pointer to the register block

Trait Implementations§

source§

impl Debug for I2C2

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl Deref for I2C2

§

type Target = RegisterBlock

The resulting type after dereferencing.
source§

fn deref(&self) -> &<I2C2 as Deref>::Target

Dereferences the value.
source§

impl I2cExt<I2C2> for I2C2

source§

fn i2c<PINS>( self, _pins: PINS, frequency: Hertz, prec: I2c2, clocks: &CoreClocks ) -> I2c<I2C2>
where PINS: Pins<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>

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

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = false

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<PeripheralToMemory> for I2C2

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = false

Mark that the TRBUFF bit must be set for this target
source§

impl PinScl<I2C2> for PB10<Alternate<4, OpenDrain>>

source§

impl PinScl<I2C2> for PF1<Alternate<4, OpenDrain>>

source§

impl PinScl<I2C2> for PH4<Alternate<4, OpenDrain>>

source§

impl PinSda<I2C2> for PB11<Alternate<4, OpenDrain>>

source§

impl PinSda<I2C2> for PF0<Alternate<4, OpenDrain>>

source§

impl PinSda<I2C2> for PH5<Alternate<4, OpenDrain>>

source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.