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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET ST
# include the SCCB I2C driver
# this uses either the legacy I2C API or the newwer version from IDF v5.4
# as this features a method to obtain the I2C driver from a port number
if (idf_version VERSION_GREATER_EQUAL "5.4")
if (idf_version VERSION_GREATER_EQUAL "5.4" AND NOT CONFIG_SCCB_HARDWARE_I2C_DRIVER_LEGACY)
list(APPEND srcs driver/sccb-ng.c)
else()
list(APPEND srcs driver/sccb.c)
Expand Down
14 changes: 14 additions & 0 deletions Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,20 @@ menu "Camera configuration"
Enable this option if you want to use the MEGA CCM.
Disable this option to save memory.

choice SCCB_HARDWARE_I2C_DRIVER_SELECTION
prompt "I2C driver selection for SCCB"
default SCCB_HARDWARE_I2C_DRIVER_NEW
help
Select the I2C driver to use for SCCB communication.
NOTE: new driver is only supported for ESP-IDF >= 5.4.

config SCCB_HARDWARE_I2C_DRIVER_LEGACY
bool "Legacy I2C driver"
config SCCB_HARDWARE_I2C_DRIVER_NEW
bool "New I2C driver"

endchoice

choice SCCB_HARDWARE_I2C_PORT
bool "I2C peripheral to use for SCCB"
default SCCB_HARDWARE_I2C_PORT1
Expand Down