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
85
85
# include the SCCB I2C driver
86
86
# this uses either the legacy I2C API or the newwer version from IDF v5.4
87
87
# 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 )
89
89
list (APPEND srcs driver/sccb-ng.c )
90
90
else ()
91
91
list (APPEND srcs driver/sccb.c )
Original file line number Diff line number Diff line change @@ -124,6 +124,20 @@ menu "Camera configuration"
124
124
Enable this option if you want to use the MEGA CCM.
125
125
Disable this option to save memory.
126
126
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
+
127
141
choice SCCB_HARDWARE_I2C_PORT
128
142
bool "I2C peripheral to use for SCCB"
129
143
default SCCB_HARDWARE_I2C_PORT1
You can’t perform that action at this time.
0 commit comments