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 1. Members
Type Name Description
uint16_t address

Address or upper limit of address range

uint16_t address_mask

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

enum i2c_slave_address_mode address_mode

Addressing mode

uint16_t buffer_timeout

Timeout to wait for master in polled functions

bool enable_general_call_address

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

bool enable_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).

bool enable_scl_low_timeout

Set to enable the SCL low timeout

enum gclk_generator generator_source

GCLK generator to use as clock source

uint32_t pinmux_pad0

PAD0 (SDA) pinmux

uint32_t pinmux_pad1

PAD1 (SCL) pinmux

bool run_in_standby

Set to keep module active in sleep modes

bool scl_low_timeout

Set to enable SCL low time-out

bool scl_stretch_only_after_ack_bit

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

enum i2c_slave_sda_hold_time sda_hold_time

SDA hold time with respect to the negative edge of SCL

bool slave_scl_low_extend_timeout

Set to enable slave SCL low extend time-out

bool ten_bit_address

Enable 10-bit addressing

enum i2c_slave_transfer_speed transfer_speed

Transfer speed mode