File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ if(IDF_TARGET STREQUAL "esp32" OR IDF_TARGET STREQUAL "esp32s2" OR IDF_TARGET ST
8585 # include the SCCB I2C driver
8686 # this uses either the legacy I2C API or the newwer version from IDF v5.4
8787 # as this features a method to obtain the I2C driver from a port number
88- if (idf_version VERSION_GREATER_EQUAL "5.4" )
88+ if (idf_version VERSION_GREATER_EQUAL "5.4" AND NOT CONFIG_SCCB_HARDWARE_I2C_DRIVER_LEGACY )
8989 list (APPEND srcs driver/sccb-ng.c)
9090 else ()
9191 list (APPEND srcs driver/sccb.c)
Original file line number Diff line number Diff line change @@ -124,6 +124,20 @@ menu "Camera configuration"
124124 Enable this option if you want to use the MEGA CCM.
125125 Disable this option to save memory.
126126
127+ choice SCCB_HARDWARE_I2C_DRIVER_SELECTION
128+ prompt "I2C driver selection for SCCB"
129+ default SCCB_HARDWARE_I2C_DRIVER_NEW
130+ help
131+ Select the I2C driver to use for SCCB communication.
132+ NOTE: new driver is only supported for ESP-IDF >= 5.4.
133+
134+ config SCCB_HARDWARE_I2C_DRIVER_LEGACY
135+ bool "Legacy I2C driver"
136+ config SCCB_HARDWARE_I2C_DRIVER_NEW
137+ bool "New I2C driver"
138+
139+ endchoice
140+
127141 choice SCCB_HARDWARE_I2C_PORT
128142 bool "I2C peripheral to use for SCCB"
129143 default SCCB_HARDWARE_I2C_PORT1
You can’t perform that action at this time.
0 commit comments