VSF Documented
Macros | Typedefs | Enumerations
i2c_types.h File Reference
#include <stdint.h>

Go to the source code of this file.

Macros

#define I2C_NUM_MAX   2
 Maximum number of I2C ports that the shim can manage.
 
#define I2C_CLK_SRC_DEFAULT   0
 

Typedefs

typedef int i2c_port_num_t
 I2C port number.
 
typedef int i2c_clock_source_t
 I2C clock source.
 

Enumerations

enum  i2c_addr_bit_len_t {
  I2C_ADDR_BIT_LEN_7 = 0 ,
  I2C_ADDR_BIT_LEN_10 = 1
}
 I2C device address bit length. More...
 

Macro Definition Documentation

◆ I2C_NUM_MAX

#define I2C_NUM_MAX   2

Maximum number of I2C ports that the shim can manage.

This only sets an upper limit for static arrays inside the port layer. The actual number of usable ports is determined by the pool injected via vsf_espidf_cfg_t::i2c at runtime.

◆ I2C_CLK_SRC_DEFAULT

#define I2C_CLK_SRC_DEFAULT   0

Typedef Documentation

◆ i2c_port_num_t

typedef int i2c_port_num_t

I2C port number.

Use -1 for automatic port selection in i2c_new_master_bus(). Valid port indices start at 0.

◆ i2c_clock_source_t

typedef int i2c_clock_source_t

I2C clock source.

Accepted for source compatibility; the VSF I2C HAL does not expose per-peripheral clock muxing, so the actual clock is whatever the underlying hardware driver selects.

Enumeration Type Documentation

◆ i2c_addr_bit_len_t

I2C device address bit length.

Enumerator
I2C_ADDR_BIT_LEN_7 

7-bit address

I2C_ADDR_BIT_LEN_10 

10-bit address

Generated from commit: vsfteam/vsf@015f4d1