Skip to content

Commit b47b0dc

Browse files
author
me-no-dev
committed
IDF release/v4.0 a3f3c7bdc
1 parent 2271c77 commit b47b0dc

File tree

130 files changed

+1048
-463
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+1048
-463
lines changed

platform.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
3535

3636
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
3737
compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.project.ld -T esp32.peripherals.ld -T esp32.rom.ld -T esp32.rom.libgcc.ld -T esp32.rom.syscalls.ld -T esp32.rom.newlib-data.ld -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u call_user_start_cpu0 -u __cxa_guard_dummy -u ld_include_panic_highint_hdl -u newlib_include_locks_impl -u newlib_include_heap_impl -u newlib_include_syscalls_impl -u pthread_include_pthread_impl -u pthread_include_pthread_cond_impl -u pthread_include_pthread_local_storage_impl -fno-rtti -mfix-esp32-psram-cache-issue
38-
compiler.c.elf.libs=-lgcc -lfr -lspi_flash -lesp_eth -lesp32 -lesp_event -lpp -lsmartconfig -limage_util -lmesh -lwpa_supplicant -lesp_wifi -ltcp_transport -lesp_websocket_client -lphy -lesp_ringbuf -lrtc -lunity -llibsodium -lcxx -lfatfs -lbootloader_support -lapp_trace -ljsmn -lcoexist -lm -lesp-tls -lnvs_flash -lfb_gfx -lbt -lfd -lcoap -lmbedtls -lod -llog -lesp_http_server -lface_detection -lheap -lmqtt -lvfs -lesp_adc_cal -lesp_rom -lhal -ljson -lefuse -lesp_http_client -lbtdm_app -lprotocomm -lcore -lsdmmc -lopenssl -lfreemodbus -lsoc -lspiffs -lexpat -lesp_https_ota -lesp32-camera -lpthread -lespnow -lasio -lesp_common -lmdns -lapp_update -lwifi_provisioning -lfreertos -lnewlib -lnet80211 -lface_recognition -lprotobuf-c -lconsole -lxtensa -lesp_local_ctrl -lnghttp -lulp -lesp_gdbstub -lespcoredump -ldriver -llwip -lwear_levelling -ldl_lib -ltcpip_adapter -lc -lstdc++
38+
compiler.c.elf.libs=-lgcc -ltcpip_adapter -lmbedtls -lnet80211 -lsdmmc -lfd -lmesh -lapp_trace -lwpa_supplicant -ljsmn -lface_recognition -lmqtt -lapp_update -llwip -lsmartconfig -lesp_gdbstub -lopenssl -lbt -lconsole -ldl -lprotocomm -lasio -lspi_flash -lesp_http_server -lespcoredump -lcoexist -lesp_eth -lbtdm_app -lrtc -lnvs_flash -ltcp_transport -lesp32 -lesp32-camera -lfreertos -lxtensa -lvfs -lcoap -lpp -lwear_levelling -lcxx -lprotobuf-c -lcore -lfr -llog -limage_util -lulp -llibsodium -ldriver -lfreemodbus -lesp_https_ota -lheap -lspiffs -lhal -lesp_websocket_client -lesp_common -lfatfs -lespnow -ljson -lunity -lesp_wifi -lm -lfb_gfx -lesp_event -lesp-tls -lesp_local_ctrl -lesp_rom -lbootloader_support -lwifi_provisioning -lod -lpthread -lexpat -lface_detection -lmdns -lesp_http_client -lsoc -lesp_adc_cal -lnewlib -lefuse -lphy -lesp_ringbuf -lnghttp -lc -lstdc++
3939

4040
compiler.as.cmd=xtensa-esp32-elf-as
4141

tools/platformio-build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
],
187187

188188
LIBS=[
189-
"-lgcc", "-lfr", "-lspi_flash", "-lesp_eth", "-lesp32", "-lesp_event", "-lpp", "-lsmartconfig", "-limage_util", "-lmesh", "-lwpa_supplicant", "-lesp_wifi", "-ltcp_transport", "-lesp_websocket_client", "-lphy", "-lesp_ringbuf", "-lrtc", "-lunity", "-llibsodium", "-lcxx", "-lfatfs", "-lbootloader_support", "-lapp_trace", "-ljsmn", "-lcoexist", "-lm", "-lesp-tls", "-lnvs_flash", "-lfb_gfx", "-lbt", "-lfd", "-lcoap", "-lmbedtls", "-lod", "-llog", "-lesp_http_server", "-lface_detection", "-lheap", "-lmqtt", "-lvfs", "-lesp_adc_cal", "-lesp_rom", "-lhal", "-ljson", "-lefuse", "-lesp_http_client", "-lbtdm_app", "-lprotocomm", "-lcore", "-lsdmmc", "-lopenssl", "-lfreemodbus", "-lsoc", "-lspiffs", "-lexpat", "-lesp_https_ota", "-lesp32-camera", "-lpthread", "-lespnow", "-lasio", "-lesp_common", "-lmdns", "-lapp_update", "-lwifi_provisioning", "-lfreertos", "-lnewlib", "-lnet80211", "-lface_recognition", "-lprotobuf-c", "-lconsole", "-lxtensa", "-lesp_local_ctrl", "-lnghttp", "-lulp", "-lesp_gdbstub", "-lespcoredump", "-ldriver", "-llwip", "-lwear_levelling", "-ldl_lib", "-ltcpip_adapter", "-lc", "-lstdc++"
189+
"-lgcc", "-ltcpip_adapter", "-lmbedtls", "-lnet80211", "-lsdmmc", "-lfd", "-lmesh", "-lapp_trace", "-lwpa_supplicant", "-ljsmn", "-lface_recognition", "-lmqtt", "-lapp_update", "-llwip", "-lsmartconfig", "-lesp_gdbstub", "-lopenssl", "-lbt", "-lconsole", "-ldl", "-lprotocomm", "-lasio", "-lspi_flash", "-lesp_http_server", "-lespcoredump", "-lcoexist", "-lesp_eth", "-lbtdm_app", "-lrtc", "-lnvs_flash", "-ltcp_transport", "-lesp32", "-lesp32-camera", "-lfreertos", "-lxtensa", "-lvfs", "-lcoap", "-lpp", "-lwear_levelling", "-lcxx", "-lprotobuf-c", "-lcore", "-lfr", "-llog", "-limage_util", "-lulp", "-llibsodium", "-ldriver", "-lfreemodbus", "-lesp_https_ota", "-lheap", "-lspiffs", "-lhal", "-lesp_websocket_client", "-lesp_common", "-lfatfs", "-lespnow", "-ljson", "-lunity", "-lesp_wifi", "-lm", "-lfb_gfx", "-lesp_event", "-lesp-tls", "-lesp_local_ctrl", "-lesp_rom", "-lbootloader_support", "-lwifi_provisioning", "-lod", "-lpthread", "-lexpat", "-lface_detection", "-lmdns", "-lesp_http_client", "-lsoc", "-lesp_adc_cal", "-lnewlib", "-lefuse", "-lphy", "-lesp_ringbuf", "-lnghttp", "-lc", "-lstdc++"
190190
],
191191

192192
LIBSOURCE_DIRS=[

tools/sdk/bin/bootloader_dio_40m.bin

0 Bytes
Binary file not shown.

tools/sdk/bin/bootloader_dio_80m.bin

0 Bytes
Binary file not shown.

tools/sdk/bin/bootloader_dout_40m.bin

0 Bytes
Binary file not shown.

tools/sdk/bin/bootloader_dout_80m.bin

0 Bytes
Binary file not shown.

tools/sdk/bin/bootloader_qio_40m.bin

0 Bytes
Binary file not shown.

tools/sdk/bin/bootloader_qio_80m.bin

0 Bytes
Binary file not shown.

tools/sdk/bin/bootloader_qout_40m.bin

0 Bytes
Binary file not shown.

tools/sdk/bin/bootloader_qout_80m.bin

0 Bytes
Binary file not shown.

tools/sdk/include/bt/esp_gap_bt_api.h

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,23 @@ typedef struct {
7979
} esp_bt_gap_dev_prop_t;
8080

8181
/// Extended Inquiry Response data type
82-
typedef enum {
83-
ESP_BT_EIR_TYPE_FLAGS = 0x01, /*!< Flag with information such as BR/EDR and LE support */
84-
ESP_BT_EIR_TYPE_INCMPL_16BITS_UUID = 0x02, /*!< Incomplete list of 16-bit service UUIDs */
85-
ESP_BT_EIR_TYPE_CMPL_16BITS_UUID = 0x03, /*!< Complete list of 16-bit service UUIDs */
86-
ESP_BT_EIR_TYPE_INCMPL_32BITS_UUID = 0x04, /*!< Incomplete list of 32-bit service UUIDs */
87-
ESP_BT_EIR_TYPE_CMPL_32BITS_UUID = 0x05, /*!< Complete list of 32-bit service UUIDs */
88-
ESP_BT_EIR_TYPE_INCMPL_128BITS_UUID = 0x06, /*!< Incomplete list of 128-bit service UUIDs */
89-
ESP_BT_EIR_TYPE_CMPL_128BITS_UUID = 0x07, /*!< Complete list of 128-bit service UUIDs */
90-
ESP_BT_EIR_TYPE_SHORT_LOCAL_NAME = 0x08, /*!< Shortened Local Name */
91-
ESP_BT_EIR_TYPE_CMPL_LOCAL_NAME = 0x09, /*!< Complete Local Name */
92-
ESP_BT_EIR_TYPE_TX_POWER_LEVEL = 0x0a, /*!< Tx power level, value is 1 octet ranging from -127 to 127, unit is dBm*/
93-
ESP_BT_EIR_TYPE_URL = 0x24, /*!< Uniform resource identifier */
94-
ESP_BT_EIR_TYPE_MANU_SPECIFIC = 0xff, /*!< Manufacturer specific data */
95-
} esp_bt_eir_type_t;
96-
#define ESP_BT_EIR_TYPE_MAX_NUM 12 /*!< MAX number of EIR type */
82+
#define ESP_BT_EIR_TYPE_FLAGS 0x01 /*!< Flag with information such as BR/EDR and LE support */
83+
#define ESP_BT_EIR_TYPE_INCMPL_16BITS_UUID 0x02 /*!< Incomplete list of 16-bit service UUIDs */
84+
#define ESP_BT_EIR_TYPE_CMPL_16BITS_UUID 0x03 /*!< Complete list of 16-bit service UUIDs */
85+
#define ESP_BT_EIR_TYPE_INCMPL_32BITS_UUID 0x04 /*!< Incomplete list of 32-bit service UUIDs */
86+
#define ESP_BT_EIR_TYPE_CMPL_32BITS_UUID 0x05 /*!< Complete list of 32-bit service UUIDs */
87+
#define ESP_BT_EIR_TYPE_INCMPL_128BITS_UUID 0x06 /*!< Incomplete list of 128-bit service UUIDs */
88+
#define ESP_BT_EIR_TYPE_CMPL_128BITS_UUID 0x07 /*!< Complete list of 128-bit service UUIDs */
89+
#define ESP_BT_EIR_TYPE_SHORT_LOCAL_NAME 0x08 /*!< Shortened Local Name */
90+
#define ESP_BT_EIR_TYPE_CMPL_LOCAL_NAME 0x09 /*!< Complete Local Name */
91+
#define ESP_BT_EIR_TYPE_TX_POWER_LEVEL 0x0a /*!< Tx power level, value is 1 octet ranging from -127 to 127, unit is dBm*/
92+
#define ESP_BT_EIR_TYPE_URL 0x24 /*!< Uniform resource identifier */
93+
#define ESP_BT_EIR_TYPE_MANU_SPECIFIC 0xff /*!< Manufacturer specific data */
94+
#define ESP_BT_EIR_TYPE_MAX_NUM 12 /*!< MAX number of EIR type */
95+
96+
typedef uint8_t esp_bt_eir_type_t;
97+
98+
9799

98100
/* ESP_BT_EIR_FLAG bit definition */
99101
#define ESP_BT_EIR_FLAG_LIMIT_DISC (0x01 << 0)

tools/sdk/include/bt/esp_gatt_common_api.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ extern "C" {
4444
*/
4545
extern esp_err_t esp_ble_gatt_set_local_mtu (uint16_t mtu);
4646

47+
#if (BLE_INCLUDED == TRUE)
48+
extern uint16_t esp_ble_get_sendable_packets_num (void);
49+
#endif
50+
4751
#ifdef __cplusplus
4852
}
4953
#endif

tools/sdk/include/bt/esp_gatt_defs.h

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extern "C" {
3434
* All "ESP_GATT_UUID_xxx" is attribute types
3535
*/
3636
#define ESP_GATT_UUID_IMMEDIATE_ALERT_SVC 0x1802 /* Immediate alert Service*/
37-
#define ESP_GATT_UUID_LINK_LOSS_SVC 0x1803 /* Link Loss Service*/
37+
#define ESP_GATT_UUID_LINK_LOSS_SVC 0x1803 /* Link Loss Service*/
3838
#define ESP_GATT_UUID_TX_POWER_SVC 0x1804 /* TX Power Service*/
3939
#define ESP_GATT_UUID_CURRENT_TIME_SVC 0x1805 /* Current Time Service Service*/
4040
#define ESP_GATT_UUID_REF_TIME_UPDATE_SVC 0x1806 /* Reference Time Update Service*/
@@ -73,8 +73,14 @@ extern "C" {
7373
#define ESP_GATT_UUID_CHAR_PRESENT_FORMAT 0x2904 /* Characteristic Presentation Format*/
7474
#define ESP_GATT_UUID_CHAR_AGG_FORMAT 0x2905 /* Characteristic Aggregate Format*/
7575
#define ESP_GATT_UUID_CHAR_VALID_RANGE 0x2906 /* Characteristic Valid Range */
76-
#define ESP_GATT_UUID_EXT_RPT_REF_DESCR 0x2907
77-
#define ESP_GATT_UUID_RPT_REF_DESCR 0x2908
76+
#define ESP_GATT_UUID_EXT_RPT_REF_DESCR 0x2907 /* External Report Reference */
77+
#define ESP_GATT_UUID_RPT_REF_DESCR 0x2908 /* Report Reference */
78+
#define ESP_GATT_UUID_NUM_DIGITALS_DESCR 0x2909 /* Number of Digitals */
79+
#define ESP_GATT_UUID_VALUE_TRIGGER_DESCR 0x290A /* Value Trigger Setting */
80+
#define ESP_GATT_UUID_ENV_SENSING_CONFIG_DESCR 0x290B /* Environmental Sensing Configuration */
81+
#define ESP_GATT_UUID_ENV_SENSING_MEASUREMENT_DESCR 0x290C /* Environmental Sensing Measurement */
82+
#define ESP_GATT_UUID_ENV_SENSING_TRIGGER_DESCR 0x290D /* Environmental Sensing Trigger Setting */
83+
#define ESP_GATT_UUID_TIME_TRIGGER_DESCR 0x290E /* Time Trigger Setting */
7884

7985
/* GAP Profile Attributes */
8086
#define ESP_GATT_UUID_GAP_DEVICE_NAME 0x2A00
@@ -304,7 +310,7 @@ typedef enum {
304310
* @brief Attribute description (used to create database)
305311
*/
306312
typedef struct
307-
{
313+
{
308314
uint16_t uuid_length; /*!< UUID length */
309315
uint8_t *uuid_p; /*!< UUID value */
310316
uint16_t perm; /*!< Attribute permission */
@@ -353,7 +359,7 @@ typedef struct
353359
/**
354360
* @brief Gatt include service entry element
355361
*/
356-
typedef struct
362+
typedef struct
357363
{
358364
uint16_t start_hdl; /*!< Gatt start handle value of included service */
359365
uint16_t end_hdl; /*!< Gatt end handle value of included service */
@@ -363,13 +369,13 @@ typedef struct
363369
/**
364370
* @brief Gatt include 128 bit service entry element
365371
*/
366-
typedef struct
372+
typedef struct
367373
{
368374
uint16_t start_hdl; /*!< Gatt start handle value of included 128 bit service */
369375
uint16_t end_hdl; /*!< Gatt end handle value of included 128 bit service */
370376
} esp_gatts_incl128_svc_desc_t; /*!< Gatt include 128 bit service entry element */
371377

372-
/// Gatt attribute value
378+
/// Gatt attribute value
373379
typedef struct {
374380
uint8_t value[ESP_GATT_MAX_ATTR_LEN]; /*!< Gatt attribute value */
375381
uint16_t handle; /*!< Gatt attribute handle */
@@ -442,8 +448,8 @@ typedef struct {
442448
/**
443449
* @brief service element
444450
*/
445-
typedef struct {
446-
bool is_primary; /*!< The service flag, true if the service is primary service, else is secondly service */
451+
typedef struct {
452+
bool is_primary; /*!< The service flag, true if the service is primary service, else is secondary service */
447453
uint16_t start_handle; /*!< The start handle of the service */
448454
uint16_t end_handle; /*!< The end handle of the service */
449455
esp_bt_uuid_t uuid; /*!< The uuid of the service */

tools/sdk/include/config/sdkconfig.h

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
#define CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE 1
8484
#define CONFIG_BTDM_SCAN_DUPL_TYPE 0
8585
#define CONFIG_BTDM_SCAN_DUPL_CACHE_SIZE 20
86+
#define CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED 1
8687
#define CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP 1
8788
#define CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM 100
8889
#define CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD 20
@@ -161,7 +162,9 @@
161162
#define CONFIG_OV2640_SUPPORT 1
162163
#define CONFIG_OV7725_SUPPORT 1
163164
#define CONFIG_OV3660_SUPPORT 1
165+
#define CONFIG_OV5640_SUPPORT 1
164166
#define CONFIG_SCCB_HARDWARE_I2C 1
167+
#define CONFIG_SCCB_HARDWARE_I2C_PORT1 1
165168
#define CONFIG_CAMERA_CORE1 1
166169
#define CONFIG_ADC_CAL_EFUSE_TP_ENABLE 1
167170
#define CONFIG_ADC_CAL_EFUSE_VREF_ENABLE 1
@@ -199,8 +202,6 @@
199202
#define CONFIG_HTTPD_ERR_RESP_NO_DELAY 1
200203
#define CONFIG_HTTPD_PURGE_BUF_LEN 32
201204
#define CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE 1
202-
#define CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_BALANCE 1
203-
#define CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_VALUE 2
204205
#define CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM 16
205206
#define CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM 32
206207
#define CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER 1
@@ -394,6 +395,7 @@
394395
#define CONFIG_WL_SECTOR_SIZE_4096 1
395396
#define CONFIG_WL_SECTOR_SIZE 4096
396397
#define CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES 16
398+
#define CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT 30
397399
#define CONFIG_WPA_MBEDTLS_CRYPTO 1
398400

399401
/* List of deprecated options */
@@ -1829,26 +1831,6 @@
18291831
#define CONFIG_SW_COEXIST_ENABLE CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE
18301832
#endif
18311833

1832-
#ifdef CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE
1833-
#define CONFIG_SW_COEXIST_PREFERENCE CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE
1834-
#endif
1835-
1836-
#ifdef CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_BALANCE
1837-
#define CONFIG_SW_COEXIST_PREFERENCE_BALANCE CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_BALANCE
1838-
#endif
1839-
1840-
#ifdef CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_BT
1841-
#define CONFIG_SW_COEXIST_PREFERENCE_BT CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_BT
1842-
#endif
1843-
1844-
#ifdef CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_VALUE
1845-
#define CONFIG_SW_COEXIST_PREFERENCE_VALUE CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_VALUE
1846-
#endif
1847-
1848-
#ifdef CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_WIFI
1849-
#define CONFIG_SW_COEXIST_PREFERENCE_WIFI CONFIG_ESP32_WIFI_SW_COEXIST_PREFERENCE_WIFI
1850-
#endif
1851-
18521834
#ifdef CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE
18531835
#define CONFIG_SYSTEM_EVENT_QUEUE_SIZE CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE
18541836
#endif
@@ -2005,5 +1987,5 @@
20051987
#define CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
20061988
#endif
20071989

2008-
#define CONFIG_ARDUINO_IDF_COMMIT "b6bec84c6"
1990+
#define CONFIG_ARDUINO_IDF_COMMIT "a3f3c7bdc"
20091991
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.0"

tools/sdk/include/driver/driver/ledc.h

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,22 @@ typedef enum {
4646
LEDC_DUTY_DIR_MAX,
4747
} ledc_duty_direction_t;
4848

49-
typedef enum {
50-
LEDC_REF_TICK = 0, /*!< LEDC timer clock divided from reference tick (1Mhz) */
51-
LEDC_APB_CLK, /*!< LEDC timer clock divided from APB clock (80Mhz) */
52-
} ledc_clk_src_t;
53-
5449
typedef enum {
55-
LEDC_AUTO_CLK, /*!< The driver will automatically select the source clock(REF_TICK or APB) based on the giving resolution and duty parameter when init the timer*/
50+
LEDC_AUTO_CLK, /*!< The driver will automatically select the source clock(REF_TICK or APB) based on the giving resolution and duty parameter when init the timer*/
5651
LEDC_USE_REF_TICK, /*!< LEDC timer select REF_TICK clock as source clock*/
5752
LEDC_USE_APB_CLK, /*!< LEDC timer select APB clock as source clock*/
5853
LEDC_USE_RTC8M_CLK, /*!< LEDC timer select RTC8M_CLK as source clock. Only for low speed channels and this parameter must be the same for all low speed channels*/
5954
} ledc_clk_cfg_t;
6055

56+
/* Note: Setting numeric values to match ledc_clk_cfg_t values are a hack to avoid collision with
57+
LEDC_AUTO_CLK in the driver, as these enums have very similar names and user may pass
58+
one of these by mistake. */
59+
typedef enum {
60+
LEDC_REF_TICK = LEDC_USE_REF_TICK, /*!< LEDC timer clock divided from reference tick (1Mhz) */
61+
LEDC_APB_CLK = LEDC_USE_APB_CLK, /*!< LEDC timer clock divided from APB clock (80Mhz) */
62+
} ledc_clk_src_t;
63+
64+
6165
typedef enum {
6266
LEDC_TIMER_0 = 0, /*!< LEDC timer 0 */
6367
LEDC_TIMER_1, /*!< LEDC timer 1 */
@@ -178,6 +182,19 @@ esp_err_t ledc_timer_config(const ledc_timer_config_t* timer_conf);
178182
*/
179183
esp_err_t ledc_update_duty(ledc_mode_t speed_mode, ledc_channel_t channel);
180184

185+
/**
186+
* @brief Set LEDC output gpio.
187+
*
188+
* @param gpio_num The LEDC output gpio
189+
* @param speed_mode Select the LEDC speed_mode, high-speed mode and low-speed mode
190+
* @param ledc_channel LEDC channel (0-7), select from ledc_channel_t
191+
*
192+
* @return
193+
* - ESP_OK Success
194+
* - ESP_ERR_INVALID_ARG Parameter error
195+
*/
196+
esp_err_t ledc_set_pin(int gpio_num, ledc_mode_t speed_mode, ledc_channel_t ledc_channel);
197+
181198
/**
182199
* @brief LEDC stop.
183200
* Disable LEDC output, and set idle level

tools/sdk/include/esp-face/dl_lib_matrix3d.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <math.h>
88
#include <assert.h>
99

10-
#if CONFIG_SPIRAM_SUPPORT
10+
#if CONFIG_ESP32_SPIRAM_SUPPORT
1111
#include "freertos/FreeRTOS.h"
1212
#endif
1313

@@ -80,20 +80,20 @@ typedef struct
8080
* @param align Align of memory. If not required, set 0.
8181
* @return Pointer of allocated memory. Null for failed.
8282
*/
83-
static inline void *dl_lib_calloc(int cnt, int size, int align)
83+
static void *dl_lib_calloc(int cnt, int size, int align)
8484
{
8585
int total_size = cnt * size + align + sizeof(void *);
8686
void *res = malloc(total_size);
8787
if (NULL == res)
8888
{
89-
#if CONFIG_SPIRAM_SUPPORT
89+
#if CONFIG_ESP32_SPIRAM_SUPPORT
9090
res = heap_caps_malloc(total_size, MALLOC_CAP_8BIT | MALLOC_CAP_SPIRAM);
9191
}
9292
if (NULL == res)
9393
{
9494
printf("Item psram alloc failed. Size: %d x %d\n", cnt, size);
9595
#else
96-
printf("Item alloc failed. Size: %d x %d\n", cnt, size);
96+
printf("Item alloc failed. Size: %d x %d, SPIRAM_FLAG: %d\n", cnt, size, CONFIG_ESP32_SPIRAM_SUPPORT);
9797
#endif
9898
return NULL;
9999
}

tools/sdk/include/esp32-camera/esp_camera.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
#include "esp_err.h"
6969
#include "driver/ledc.h"
7070
#include "sensor.h"
71+
#include "sys/time.h"
7172

7273
#ifdef __cplusplus
7374
extern "C" {
@@ -115,6 +116,7 @@ typedef struct {
115116
size_t width; /*!< Width of the buffer in pixels */
116117
size_t height; /*!< Height of the buffer in pixels */
117118
pixformat_t format; /*!< Format of the pixel data */
119+
struct timeval timestamp; /*!< Timestamp since boot of the first DMA buffer of the frame */
118120
} camera_fb_t;
119121

120122
#define ESP_ERR_CAMERA_BASE 0x20000

0 commit comments

Comments
 (0)