Sitelet https://github.com/LoveApple14434/esp32-camera/commit/23d1da74ff64c463ac32fa79aafad29d3d54e76d
Skip to content

Commit 23d1da7

Browse files
authored
Fix support for ESP-IDF 6 (espressif#835)
* Fix support for ESP-IDF 6 * Fix requires for IDF 6.1
1 parent fb7b85b commit 23d1da7

6 files changed

Lines changed: 15 additions & 1 deletion

File tree

‎.github/workflows/build.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ jobs:
1010
name: Build for ${{ matrix.idf_target }} on ${{ matrix.idf_ver }}
1111
runs-on: ubuntu-latest
1212
strategy:
13+
fail-fast: false
1314
matrix:
14-
idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "latest"]
15+
idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "release-v6.0", "latest"]
1516
idf_target: ["esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3"]
1617
container: espressif/idf:${{ matrix.idf_ver }}
1718
steps:

‎CMakeLists.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ if (idf_version VERSION_GREATER_EQUAL "6.0")
9898
list(APPEND priv_requires esp_driver_gpio esp_driver_spi esp_driver_i2c)
9999
list(APPEND req esp_driver_ledc)
100100
endif()
101+
if (idf_version VERSION_GREATER_EQUAL "6.1")
102+
list(APPEND priv_requires esp_hal_clock)
103+
endif()
101104

102105
idf_component_register(
103106
SRCS ${srcs}

‎driver/sccb-ng.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ static const char *TAG = "sccb-ng";
2323

2424
#define LITTLETOBIG(x) ((x << 8) | (x >> 8))
2525

26+
#if (ESP_IDF_VERSION_MAJOR <= 5)
2627
#include "esp_private/i2c_platform.h"
28+
#endif
29+
2730
#include "driver/i2c_master.h"
2831
#include "driver/i2c_types.h"
2932

‎target/esp32/ll_cam.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ static inline int gpio_ll_get_level(gpio_dev_t *hw, int gpio_num)
4848
#if (ESP_IDF_VERSION_MAJOR > 5)
4949
#include "soc/dport_access.h"
5050
#include "soc/dport_reg.h"
51+
#include "soc/gpio_sig_map.h"
5152
#endif
5253

5354
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 2)

‎target/esp32s2/ll_cam.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
#if (ESP_IDF_VERSION_MAJOR > 5)
3737
#include "soc/dport_access.h"
38+
#include "soc/gpio_sig_map.h"
3839
#endif
3940

4041
static const char *TAG = "s2 ll_cam";

‎target/esp32s3/ll_cam.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,18 @@ esp_err_t ll_cam_deinit(cam_obj_t *cam)
206206
static esp_err_t ll_cam_dma_init(cam_obj_t *cam)
207207
{
208208
//alloc rx gdma channel
209+
#if (ESP_IDF_VERSION_MAJOR < 6)
209210
gdma_channel_alloc_config_t rx_alloc_config = {
210211
.direction = GDMA_CHANNEL_DIRECTION_RX,
211212
};
212213
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
213214
esp_err_t ret = gdma_new_ahb_channel(&rx_alloc_config, &cam->dma_channel_handle);
214215
#else
215216
esp_err_t ret = gdma_new_channel(&rx_alloc_config, &cam->dma_channel_handle);
217+
#endif
218+
#else
219+
gdma_channel_alloc_config_t rx_alloc_config = {0};
220+
esp_err_t ret = gdma_new_ahb_channel(&rx_alloc_config, NULL, &cam->dma_channel_handle);
216221
#endif
217222
if (ret != ESP_OK) {
218223
cam_deinit();

0 commit comments

Comments
 (0)