Configuration structure for the I2C slave device.
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.
#include <i2c_slave.h>
Data Fields | |
uint16_t | address |
Address or upper limit of address range. More... | |
uint16_t | address_mask |
Address mask, second address, or lower limit of address range. More... | |
enum i2c_slave_address_mode | address_mode |
Addressing mode. More... | |
uint16_t | buffer_timeout |
Timeout to wait for master in polled functions. More... | |
bool | enable_general_call_address |
Enable general call address recognition (general call address is defined as 0000000 with direction bit 0). More... | |
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). More... | |
bool | enable_scl_low_timeout |
Set to enable the SCL low timeout. More... | |
enum gclk_generator | generator_source |
GCLK generator to use as clock source. 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... | |
bool | scl_stretch_only_after_ack_bit |
Set to enable SCL stretch only after ACK bit (required for high speed) More... | |
enum i2c_slave_sda_hold_time | sda_hold_time |
SDA hold time with respect to the negative edge of SCL. More... | |
bool | slave_scl_low_extend_timeout |
Set to enable slave SCL low extend time-out. More... | |
bool | ten_bit_address |
Enable 10-bit addressing. More... | |
enum i2c_slave_transfer_speed | transfer_speed |
Transfer speed mode. More... | |
uint16_t i2c_slave_config::address |
Address or upper limit of address range.
Referenced by _i2c_slave_set_config(), check_boot_mode(), configure_i2c_slave(), i2c_slave_get_config_defaults(), and run_i2c_init_test().
uint16_t i2c_slave_config::address_mask |
Address mask, second address, or lower limit of address range.
Referenced by _i2c_slave_set_config(), and i2c_slave_get_config_defaults().
enum i2c_slave_address_mode i2c_slave_config::address_mode |
Addressing mode.
Referenced by _i2c_slave_set_config(), check_boot_mode(), configure_i2c_slave(), i2c_slave_get_config_defaults(), and run_i2c_init_test().
uint16_t i2c_slave_config::buffer_timeout |
Timeout to wait for master in polled functions.
Referenced by _i2c_slave_set_config(), i2c_slave_get_config_defaults(), and run_i2c_init_test().
bool i2c_slave_config::enable_general_call_address |
Enable general call address recognition (general call address is defined as 0000000 with direction bit 0).
Referenced by _i2c_slave_set_config(), and i2c_slave_get_config_defaults().
bool i2c_slave_config::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).
Referenced by i2c_slave_get_config_defaults(), and i2c_slave_init().
bool i2c_slave_config::enable_scl_low_timeout |
Set to enable the SCL low timeout.
Referenced by i2c_slave_get_config_defaults().
enum gclk_generator i2c_slave_config::generator_source |
GCLK generator to use as clock source.
Referenced by i2c_slave_get_config_defaults(), and i2c_slave_init().
uint32_t i2c_slave_config::pinmux_pad0 |
PAD0 (SDA) pinmux.
Referenced by _i2c_slave_set_config(), check_boot_mode(), configure_i2c_slave(), i2c_slave_get_config_defaults(), and run_i2c_init_test().
uint32_t i2c_slave_config::pinmux_pad1 |
PAD1 (SCL) pinmux.
Referenced by _i2c_slave_set_config(), check_boot_mode(), configure_i2c_slave(), i2c_slave_get_config_defaults(), and run_i2c_init_test().
bool i2c_slave_config::run_in_standby |
Set to keep module active in sleep modes.
Referenced by _i2c_slave_set_config(), and i2c_slave_get_config_defaults().
bool i2c_slave_config::scl_low_timeout |
Set to enable SCL low time-out.
Referenced by _i2c_slave_set_config(), and i2c_slave_get_config_defaults().
bool i2c_slave_config::scl_stretch_only_after_ack_bit |
Set to enable SCL stretch only after ACK bit (required for high speed)
Referenced by _i2c_slave_set_config(), and i2c_slave_get_config_defaults().
enum i2c_slave_sda_hold_time i2c_slave_config::sda_hold_time |
SDA hold time with respect to the negative edge of SCL.
Referenced by _i2c_slave_set_config(), and i2c_slave_get_config_defaults().
bool i2c_slave_config::slave_scl_low_extend_timeout |
Set to enable slave SCL low extend time-out.
Referenced by _i2c_slave_set_config(), and i2c_slave_get_config_defaults().
bool i2c_slave_config::ten_bit_address |
Enable 10-bit addressing.
Referenced by _i2c_slave_set_config(), and i2c_slave_get_config_defaults().
enum i2c_slave_transfer_speed i2c_slave_config::transfer_speed |
Transfer speed mode.
Referenced by _i2c_slave_set_config(), and i2c_slave_get_config_defaults().