Chapter 2. API Reference
Public Members
i2c_mode_t
mode
I2C mode
int sda_io_num
GPIO number for I2C sda signal
int scl_io_num
GPIO number for I2C scl signal
bool sda_pullup_en
Internal GPIO pull mode for I2C sda signal
bool scl_pullup_en
Internal GPIO pull mode for I2C scl signal
uint32_t clk_speed
I2C clock frequency for master mode, (no higher than 1MHz for now)
struct i2c_config_t::[anonymous]::[anonymous] master
I2C master config
uint8_t addr_10bit_en
I2C 10bit address mode enable for slave mode
uint16_t slave_addr
I2C address for slave mode
uint32_t maximum_speed
I2C expected clock speed from SCL.
struct i2c_config_t::[anonymous]::[anonymous] slave
I2C slave config
uint32_t clk_flags
Bitwise of I2C_SCLK_SRC_FLAG_**FOR_DFS** for clk source choice
Macros
I2C_APB_CLK_FREQ
I2C source clock is APB clock, 80MHz
I2C_NUM_MAX
I2C port max
I2C_NUM_0
I2C port 0
I2C_NUM_1
I2C port 1
I2C_SCLK_SRC_FLAG_FOR_NOMAL
Any one clock source that is available for the specified frequency may be choosen
I2C_SCLK_SRC_FLAG_AWARE_DFS
For REF tick clock, it won't change with APB.
I2C_SCLK_SRC_FLAG_LIGHT_SLEEP
For light sleep mode.
I2C_INTERNAL_STRUCT_SIZE
Minimum size, in bytes, of the internal private structure used to describe I2C commands link.
I2C_LINK_RECOMMENDED_SIZE(TRANSACTIONS)
The following macro is used to determine the recommended size of the buffer to pass to
i2c_cmd_link_create_static() function.
scribing the number of transactions intended to be performed on the I2C port. For example, if one wants
Espressif Systems
It requires one parameter, TRANSACTIONS, de-
294
Submit Document Feedback
Release v4.4
Need help?
Do you have a question about the ESP32-S2 and is the answer not in the manual?