17.6.1.1 Struct i2c_master_config

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.

Table 17-2. Members
TypeNameDescription
uint32_tbaud_rate

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

uint32_tbaud_rate_high_speed

Baud rate (in KHz) for I2C operations in High-speed mode, i2c_master_baud_rate

uint16_tbuffer_timeout

Timeout for packet write to wait for slave

enum gclk_generatorgenerator_source

GCLK generator to use as clock source

enum i2c_master_inactive_timeoutinactive_timeout

Inactive bus time out

boolmaster_scl_low_extend_timeout

Set to enable maser SCL low extend time-out

uint32_tpinmux_pad0

PAD0 (SDA) pinmux

uint32_tpinmux_pad1

PAD1 (SCL) pinmux

boolrun_in_standby

Set to keep module active in sleep modes

boolscl_low_timeout

Set to enable SCL low time-out

boolscl_stretch_only_after_ack_bit

Set to enable SCL stretch only after ACK bit (required for high speed)

uint16_tsda_scl_rise_time_ns

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

boolslave_scl_low_extend_timeout

Set to enable slave SCL low extend time-out

enum i2c_master_start_hold_timestart_hold_time

Bus hold time after start signal on data line

enum i2c_master_transfer_speedtransfer_speed

Transfer speed mode

uint16_tunknown_bus_state_timeout

Unknown bus state timeout