File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,14 @@ menu "Board Support Package (generic)"
2020 range -1 ENV_GPIO_OUT_RANGE_MAX
2121 help
2222 The GPIO pin for I2C SDA.
23+ config BSP_I2C_PULLUP
24+ bool "I2C GPIO PULL UP"
25+ default n
26+ help
27+ Enable I2C bus pull up.
2328 endmenu
24- config BSP_I2C_NUM
29+
30+ config BSP_I2C_NUM
2531 int "I2C peripheral index"
2632 default 1
2733 range 0 1
Original file line number Diff line number Diff line change @@ -324,6 +324,9 @@ esp_err_t bsp_i2c_init(void)
324324 .sda_io_num = BSP_I2C_SDA ,
325325 .scl_io_num = BSP_I2C_SCL ,
326326 .clk_source = I2C_CLK_SRC_DEFAULT ,
327+ #ifdef CONFIG_BSP_I2C_GPIO_PULLUP
328+ .flags .enable_internal_pullup = 1 ,
329+ #endif
327330 };
328331 BSP_ERROR_CHECK_RETURN_ERR (i2c_new_master_bus (& i2c_config , & i2c_handle ));
329332
You can’t perform that action at this time.
0 commit comments