Microchip® Advanced Software Framework

i2c_master_config Struct Reference

Configuration structure for the I2C Master device.

This is the configuration structure for the I2C Master device. It is used as an argument for i2c_master_init to provide the desired configurations for the module. The structure should be initialized using the i2c_master_get_config_defaults.

#include <i2c_master.h>

Data Fields

uint32_t baud_rate
 Baud rate (in KHz) for I2C operations in standard-mode, Fast-mode, and Fast-mode Plus Transfers, i2c_master_baud_rate. More...
 
uint16_t buffer_timeout
 Timeout for packet write to wait for slave. More...
 
enum gclk_generator generator_source
 GCLK generator to use as clock source. More...
 
enum i2c_master_inactive_timeout inactive_timeout
 Inactive bus time out. More...
 
uint32_t pinmux_pad0
 PAD0 (SDA) pinmux. More...
 
uint32_t pinmux_pad1
 PAD1 (SCL) pinmux. More...
 
bool run_in_standby
 Set to keep module active in sleep modes. More...
 
bool scl_low_timeout
 Set to enable SCL low time-out. More...
 
uint16_t sda_scl_rise_time_ns
 Get more accurate BAUD, considering rise time(required for standard-mode and Fast-mode) More...
 
enum i2c_master_start_hold_time start_hold_time
 Bus hold time after start signal on data line. More...
 
uint16_t unknown_bus_state_timeout
 Unknown bus state timeout. More...
 

uint32_t i2c_master_config::baud_rate

Baud rate (in KHz) for I2C operations in standard-mode, Fast-mode, and Fast-mode Plus Transfers, i2c_master_baud_rate.

Referenced by i2c_master_get_config_defaults().

uint16_t i2c_master_config::buffer_timeout

Timeout for packet write to wait for slave.

Referenced by at30tse_init(), i2c_master_get_config_defaults(), and nm_bus_init().

enum gclk_generator i2c_master_config::generator_source

GCLK generator to use as clock source.

Referenced by i2c_master_get_config_defaults(), and i2c_master_init().

enum i2c_master_inactive_timeout i2c_master_config::inactive_timeout

Inactive bus time out.

Referenced by i2c_master_get_config_defaults().

uint32_t i2c_master_config::pinmux_pad0

PAD0 (SDA) pinmux.

Referenced by at30tse_init(), and i2c_master_get_config_defaults().

uint32_t i2c_master_config::pinmux_pad1

PAD1 (SCL) pinmux.

Referenced by at30tse_init(), and i2c_master_get_config_defaults().

bool i2c_master_config::run_in_standby

Set to keep module active in sleep modes.

Referenced by i2c_master_get_config_defaults().

bool i2c_master_config::scl_low_timeout

Set to enable SCL low time-out.

Referenced by i2c_master_get_config_defaults().

uint16_t i2c_master_config::sda_scl_rise_time_ns

Get more accurate BAUD, considering rise time(required for standard-mode and Fast-mode)

Referenced by i2c_master_get_config_defaults().

enum i2c_master_start_hold_time i2c_master_config::start_hold_time

Bus hold time after start signal on data line.

Referenced by i2c_master_get_config_defaults().

uint16_t i2c_master_config::unknown_bus_state_timeout

Unknown bus state timeout.

Referenced by i2c_master_get_config_defaults().