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...
 
uint32_t baud_rate_high_speed
 Baud rate (in KHz) for I2C operations in High-speed mode, 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...
 
bool master_scl_low_extend_timeout
 Set to enable maser SCL low extend 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...
 
bool scl_stretch_only_after_ack_bit
 Set to enable SCL stretch only after ACK bit (required for high speed) More...
 
uint16_t sda_scl_rise_time_ns
 Get more accurate BAUD, considering rise time(required for standard-mode and Fast-mode) More...
 
bool slave_scl_low_extend_timeout
 Set to enable slave SCL low extend time-out. More...
 
enum i2c_master_start_hold_time start_hold_time
 Bus hold time after start signal on data line. More...
 
enum i2c_master_transfer_speed transfer_speed
 Transfer speed mode. 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(), and run_i2c_full_speed_test().

uint32_t i2c_master_config::baud_rate_high_speed

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

Referenced by i2c_master_get_config_defaults().

uint16_t i2c_master_config::buffer_timeout
enum gclk_generator i2c_master_config::generator_source

GCLK generator to use as clock source.

Referenced by configure_i2c_master(), 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().

bool i2c_master_config::master_scl_low_extend_timeout

Set to enable maser SCL low extend time-out.

Referenced by 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().

bool i2c_master_config::scl_stretch_only_after_ack_bit

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

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().

bool i2c_master_config::slave_scl_low_extend_timeout

Set to enable slave SCL low extend time-out.

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().

enum i2c_master_transfer_speed i2c_master_config::transfer_speed

Transfer speed mode.

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().