File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ 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_GPIO_PULLUP
24+ bool "I2C GPIO PULL UP"
25+ default n
26+ help
27+ Enable I2C bus pull up.
2328 endmenu
2429 config BSP_I2C_NUM
2530 int "I2C peripheral index"
Original file line number Diff line number Diff line change 5050/* I2C */
5151#define BSP_I2C_SCL (CONFIG_BSP_I2C_GPIO_SCL)
5252#define BSP_I2C_SDA (CONFIG_BSP_I2C_GPIO_SDA)
53+ #define BSP_I2C_PULLUP (CONFIG_BSP_I2C_GPIO_PULLUP)
54+
5355
5456/* SD card */
5557#define BSP_SD_CMD (CONFIG_BSP_SD_CMD)
Original file line number Diff line number Diff line change @@ -324,6 +324,7 @@ 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+ .flags .enable_internal_pullup = BSP_I2C_PULLUP ,
327328 };
328329 BSP_ERROR_CHECK_RETURN_ERR (i2c_new_master_bus (& i2c_config , & i2c_handle ));
329330
You can’t perform that action at this time.
0 commit comments