18.6.1.1 Struct i2c_slave_config

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

Table 18-2. Members
TypeNameDescription
uint16_taddress

Address or upper limit of address range

uint16_taddress_mask

Address mask, second address, or lower limit of address range

enum i2c_slave_address_modeaddress_mode

Addressing mode

uint16_tbuffer_timeout

Timeout to wait for master in polled functions

boolenable_general_call_address

Enable general call address recognition (general call address is defined as 0000000 with direction bit 0).

boolenable_nack_on_address

Enable NACK on address match (this can be changed after initialization via the i2c_slave_enable_nack_on_address and i2c_slave_disable_nack_on_address functions).

boolenable_scl_low_timeout

Set to enable the SCL low timeout

enum gclk_generatorgenerator_source

GCLK generator to use as clock source

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)

enum i2c_slave_sda_hold_timesda_hold_time

SDA hold time with respect to the negative edge of SCL

boolslave_scl_low_extend_timeout

Set to enable slave SCL low extend time-out

boolten_bit_address

Enable 10-bit addressing

enum i2c_slave_transfer_speedtransfer_speed

Transfer speed mode