Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::I2cHandle Struct Reference

I2C peripheral handle. More...

Detailed Description

I2C peripheral handle.

Represents an I2C configuration as resolved from hardware manifests. Includes peripheral number, pin mappings, and bus speed.

Examples:

  • STM32H7 I2C1 on PB8/PB9: I2cHandle{1, 1, 8, 4, 1, 9, 4, 100000}
  • STM32H7 I2C2 on PB10/PB11: I2cHandle{2, 1, 10, 4, 1, 11, 4, 400000}

Definition at line 28 of file handle.hpp.

#include <handle.hpp>

Public Attributes

uint32_t peripheral
 I2C peripheral number (e.g., 1 for I2C1)
 
uint32_t scl_port
 SCL GPIO port number.
 
uint32_t scl_pin
 SCL GPIO pin number.
 
uint32_t scl_af
 SCL alternate function (STM32)
 
uint32_t sda_port
 SDA GPIO port number.
 
uint32_t sda_pin
 SDA GPIO pin number.
 
uint32_t sda_af
 SDA alternate function (STM32)
 
uint32_t speed_hz
 Bus speed in Hz (100000, 400000, 1000000)
 

Member Data Documentation

◆ peripheral

uint32_t sbl::I2cHandle::peripheral

I2C peripheral number (e.g., 1 for I2C1)

Definition at line 29 of file handle.hpp.

◆ scl_port

uint32_t sbl::I2cHandle::scl_port

SCL GPIO port number.

Definition at line 30 of file handle.hpp.

◆ scl_pin

uint32_t sbl::I2cHandle::scl_pin

SCL GPIO pin number.

Definition at line 31 of file handle.hpp.

◆ scl_af

uint32_t sbl::I2cHandle::scl_af

SCL alternate function (STM32)

Definition at line 32 of file handle.hpp.

◆ sda_port

uint32_t sbl::I2cHandle::sda_port

SDA GPIO port number.

Definition at line 33 of file handle.hpp.

◆ sda_pin

uint32_t sbl::I2cHandle::sda_pin

SDA GPIO pin number.

Definition at line 34 of file handle.hpp.

◆ sda_af

uint32_t sbl::I2cHandle::sda_af

SDA alternate function (STM32)

Definition at line 35 of file handle.hpp.

◆ speed_hz

uint32_t sbl::I2cHandle::speed_hz

Bus speed in Hz (100000, 400000, 1000000)

Definition at line 36 of file handle.hpp.


The documentation for this struct was generated from the following file: