Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion bsp/esp_bsp_generic/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ menu "Board Support Package (generic)"
range -1 ENV_GPIO_OUT_RANGE_MAX
help
The GPIO pin for I2C SDA.
config BSP_I2C_PULLUP
bool "I2C GPIO PULL UP"
default n
help
Enable I2C bus pull up.
endmenu
config BSP_I2C_NUM

config BSP_I2C_NUM
int "I2C peripheral index"
default 1
range 0 1
Expand Down
3 changes: 3 additions & 0 deletions bsp/esp_bsp_generic/src/esp_bsp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ esp_err_t bsp_i2c_init(void)
.sda_io_num = BSP_I2C_SDA,
.scl_io_num = BSP_I2C_SCL,
.clk_source = I2C_CLK_SRC_DEFAULT,
#ifdef CONFIG_BSP_I2C_GPIO_PULLUP
.flags.enable_internal_pullup = 1,
#endif
};
BSP_ERROR_CHECK_RETURN_ERR(i2c_new_master_bus(&i2c_config, &i2c_handle));

Expand Down
Loading