Hardware Abstraction Layer (HAL)
mtb_hal_i2c_cfg_t Struct Reference

Description

I2C configuration.

Data Fields

bool is_target
 Operates as a target when set to (true), else as a controller (false).
 
uint16_t address
 Address of this target resource (7-bit), should be set to 0 for controller.
 
uint32_t frequency_hz
 Frequency that the I2C bus runs at (I2C data rate in bits per second)
 
uint8_t address_mask
 Mask of the target resource. More...
 
bool enable_address_callback
 Indicates address callback feature is enabled or disable. More...
 

Field Documentation

◆ is_target

bool mtb_hal_i2c_cfg_t::is_target

Operates as a target when set to (true), else as a controller (false).

◆ address

uint16_t mtb_hal_i2c_cfg_t::address

Address of this target resource (7-bit), should be set to 0 for controller.

◆ frequency_hz

uint32_t mtb_hal_i2c_cfg_t::frequency_hz

Frequency that the I2C bus runs at (I2C data rate in bits per second)

◆ address_mask

uint8_t mtb_hal_i2c_cfg_t::address_mask

Mask of the target resource.

Not applicable for the controller.

◆ enable_address_callback

bool mtb_hal_i2c_cfg_t::enable_address_callback

Indicates address callback feature is enabled or disable.

When it's true the address callback will be invoked.