Skip to content

Commit 49e66a3

Browse files
committed
IDF release/v5.1 4bc762621d
1 parent f512564 commit 49e66a3

File tree

237 files changed

+1901
-343
lines changed

Some content is hidden

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

237 files changed

+1901
-343
lines changed

esp32/bin/bootloader_dio_40m.elf

0 Bytes
Binary file not shown.

esp32/bin/bootloader_dio_80m.elf

0 Bytes
Binary file not shown.

esp32/bin/bootloader_dout_40m.elf

0 Bytes
Binary file not shown.

esp32/bin/bootloader_dout_80m.elf

0 Bytes
Binary file not shown.

esp32/bin/bootloader_qio_40m.elf

0 Bytes
Binary file not shown.

esp32/bin/bootloader_qio_80m.elf

0 Bytes
Binary file not shown.

esp32/bin/bootloader_qout_40m.elf

0 Bytes
Binary file not shown.

esp32/bin/bootloader_qout_80m.elf

0 Bytes
Binary file not shown.

esp32/dio_qspi/include/sdkconfig.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,8 @@
876876
#define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 2048
877877
#define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80
878878
#define CONFIG_IO_GLITCH_FILTER_TIME_MS 50
879+
#define CONFIG_DIAG_DATA_STORE_RTC 1
880+
#define CONFIG_DIAG_DATA_STORE_REPORTING_WATERMARK_PERCENT 80
879881
#define CONFIG_OV7670_SUPPORT 1
880882
#define CONFIG_OV7725_SUPPORT 1
881883
#define CONFIG_NT99141_SUPPORT 1
@@ -1082,5 +1084,5 @@
10821084
#define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS
10831085
#define CONFIG_WPA_MBEDTLS_CRYPTO CONFIG_ESP_WIFI_MBEDTLS_CRYPTO
10841086
#define CONFIG_WPA_MBEDTLS_TLS_CLIENT CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT
1085-
#define CONFIG_ARDUINO_IDF_COMMIT "ea5e0ff298"
1087+
#define CONFIG_ARDUINO_IDF_COMMIT "4bc762621d"
10861088
#define CONFIG_ARDUINO_IDF_BRANCH "release/v5.1"

esp32/dout_qspi/include/sdkconfig.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,8 @@
876876
#define CONFIG_RTC_STORE_CRITICAL_DATA_SIZE 2048
877877
#define CONFIG_RTC_STORE_REPORTING_WATERMARK_PERCENT 80
878878
#define CONFIG_IO_GLITCH_FILTER_TIME_MS 50
879+
#define CONFIG_DIAG_DATA_STORE_RTC 1
880+
#define CONFIG_DIAG_DATA_STORE_REPORTING_WATERMARK_PERCENT 80
879881
#define CONFIG_OV7670_SUPPORT 1
880882
#define CONFIG_OV7725_SUPPORT 1
881883
#define CONFIG_NT99141_SUPPORT 1
@@ -1082,5 +1084,5 @@
10821084
#define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS
10831085
#define CONFIG_WPA_MBEDTLS_CRYPTO CONFIG_ESP_WIFI_MBEDTLS_CRYPTO
10841086
#define CONFIG_WPA_MBEDTLS_TLS_CLIENT CONFIG_ESP_WIFI_MBEDTLS_TLS_CLIENT
1085-
#define CONFIG_ARDUINO_IDF_COMMIT "ea5e0ff298"
1087+
#define CONFIG_ARDUINO_IDF_COMMIT "4bc762621d"
10861088
#define CONFIG_ARDUINO_IDF_BRANCH "release/v5.1"

esp32/flags/defines

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-DESP_PLATFORM -DIDF_VER=\"v5.1-beta1-378-gea5e0ff298\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DUNITY_INCLUDE_CONFIG_H -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1
1+
-DESP_PLATFORM -DIDF_VER=\"v5.1-rc1-36-g4bc762621d\" -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -DUNITY_INCLUDE_CONFIG_H -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1

esp32/flags/includes

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

esp32/flags/ld_libs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-lxtensa -lesp_ringbuf -lefuse -ldriver -lesp_pm -lmbedtls -lesp_app_format -lbootloader_support -lesp_partition -lapp_update -lesp_mm -lspi_flash -lpthread -lesp_system -lesp_rom -lhal -llog -lheap -lsoc -lesp_hw_support -lfreertos -lnewlib -lcxx -lesp_common -lesp_timer -lapp_trace -lesp_event -lnvs_flash -lesp_phy -lvfs -llwip -lesp_netif -lwpa_supplicant -lesp_coex -lesp_wifi -lbt -lunity -lcmock -lconsole -lhttp_parser -lesp-tls -lesp_adc -lesp_eth -lesp_gdbstub -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -lesp_psram -lesp_lcd -lprotobuf-c -lprotocomm -lesp_local_ctrl -lespcoredump -lwear_levelling -lsdmmc -lfatfs -ljson -lmqtt -lperfmon -lspiffs -lulp -lwifi_provisioning -lchmorgan__esp-libhelix-mp3 -lespressif__esp-dsp -lespressif__mdns -lcbor -lrmaker_common -lesp_diagnostics -lrtc_store -lesp_insights -ljson_parser -ljson_generator -lesp_schedule -lespressif__esp_secure_cert_mgr -lesp_rainmaker -lgpio_button -lqrcode -lws2812_led -lesp32-camera -lesp_littlefs -lfb_gfx -lapp_trace -lapp_trace -lcmock -lunity -lesp_lcd -lperfmon -lchmorgan__esp-libhelix-mp3 -lespressif__esp-dsp -lesp_hid -lfatfs -lwear_levelling -lsdmmc -lspiffs -lesp_insights -lcbor -lesp_diagnostics -lrtc_store -lesp_rainmaker -lesp_local_ctrl -lesp_https_server -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -ljson -lespressif__mdns -ljson_parser -ljson_generator -lesp_schedule -lespressif__esp_secure_cert_mgr -lqrcode -lrmaker_common -lconsole -lmqtt -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lxtensa -lesp_ringbuf -lefuse -ldriver -lesp_pm -lmbedtls -lesp_app_format -lbootloader_support -lesp_partition -lapp_update -lesp_mm -lspi_flash -lpthread -lesp_system -lesp_rom -lhal -llog -lheap -lsoc -lesp_hw_support -lfreertos -lnewlib -lcxx -lesp_common -lesp_timer -lesp_event -lnvs_flash -lesp_phy -lvfs -llwip -lesp_netif -lwpa_supplicant -lesp_coex -lesp_wifi -lhttp_parser -lesp-tls -lesp_adc -lesp_eth -lesp_gdbstub -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_psram -lespcoredump -lulp -lmbedtls_2 -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lxtensa -lesp_ringbuf -lefuse -ldriver -lesp_pm -lmbedtls -lesp_app_format -lbootloader_support -lesp_partition -lapp_update -lesp_mm -lspi_flash -lpthread -lesp_system -lesp_rom -lhal -llog -lheap -lsoc -lesp_hw_support -lfreertos -lnewlib -lcxx -lesp_common -lesp_timer -lesp_event -lnvs_flash -lesp_phy -lvfs -llwip -lesp_netif -lwpa_supplicant -lesp_coex -lesp_wifi -lhttp_parser -lesp-tls -lesp_adc -lesp_eth -lesp_gdbstub -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_psram -lespcoredump -lulp -lmbedtls_2 -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lxtensa -lesp_ringbuf -lefuse -ldriver -lesp_pm -lmbedtls -lesp_app_format -lbootloader_support -lesp_partition -lapp_update -lesp_mm -lspi_flash -lpthread -lesp_system -lesp_rom -lhal -llog -lheap -lsoc -lesp_hw_support -lfreertos -lnewlib -lcxx -lesp_common -lesp_timer -lesp_event -lnvs_flash -lesp_phy -lvfs -llwip -lesp_netif -lwpa_supplicant -lesp_coex -lesp_wifi -lhttp_parser -lesp-tls -lesp_adc -lesp_eth -lesp_gdbstub -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_psram -lespcoredump -lulp -lmbedtls_2 -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lxtensa -lesp_ringbuf -lefuse -ldriver -lesp_pm -lmbedtls -lesp_app_format -lbootloader_support -lesp_partition -lapp_update -lesp_mm -lspi_flash -lpthread -lesp_system -lesp_rom -lhal -llog -lheap -lsoc -lesp_hw_support -lfreertos -lnewlib -lcxx -lesp_common -lesp_timer -lesp_event -lnvs_flash -lesp_phy -lvfs -llwip -lesp_netif -lwpa_supplicant -lesp_coex -lesp_wifi -lhttp_parser -lesp-tls -lesp_adc -lesp_eth -lesp_gdbstub -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_psram -lespcoredump -lulp -lmbedtls_2 -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lxtensa -lesp_ringbuf -lefuse -ldriver -lesp_pm -lmbedtls -lesp_app_format -lbootloader_support -lesp_partition -lapp_update -lesp_mm -lspi_flash -lpthread -lesp_system -lesp_rom -lhal -llog -lheap -lsoc -lesp_hw_support -lfreertos -lnewlib -lcxx -lesp_common -lesp_timer -lesp_event -lnvs_flash -lesp_phy -lvfs -llwip -lesp_netif -lwpa_supplicant -lesp_coex -lesp_wifi -lhttp_parser -lesp-tls -lesp_adc -lesp_eth -lesp_gdbstub -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_psram -lespcoredump -lulp -lmbedtls_2 -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lxt_hal -lc -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lphy -lrtc -lesp_phy -lphy -lrtc -lesp_phy -lphy -lrtc
1+
-lxtensa -lesp_ringbuf -lefuse -ldriver -lesp_pm -lmbedtls -lesp_app_format -lbootloader_support -lesp_partition -lapp_update -lesp_mm -lspi_flash -lpthread -lesp_system -lesp_rom -lhal -llog -lheap -lsoc -lesp_hw_support -lfreertos -lnewlib -lcxx -lesp_common -lesp_timer -lapp_trace -lesp_event -lnvs_flash -lesp_phy -lvfs -llwip -lesp_netif -lwpa_supplicant -lesp_coex -lesp_wifi -lbt -lunity -lcmock -lconsole -lhttp_parser -lesp-tls -lesp_adc -lesp_eth -lesp_gdbstub -lesp_hid -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_https_server -lesp_psram -lesp_lcd -lprotobuf-c -lprotocomm -lesp_local_ctrl -lespcoredump -lwear_levelling -lsdmmc -lfatfs -ljson -lmqtt -lperfmon -lspiffs -lulp -lwifi_provisioning -lchmorgan__esp-libhelix-mp3 -lespressif__esp-dsp -lespressif__mdns -lcbor2 -lrmaker_common -lesp_diagnostics -lespressif__cbor -lesp_diag_data_store -lesp_insights -lrtc_store -ljson_parser -ljson_generator -lesp_schedule -lespressif__esp_secure_cert_mgr -lesp_rainmaker -lgpio_button -lqrcode -lws2812_led -lesp32-camera -lesp_littlefs -lfb_gfx -lapp_trace -lapp_trace -lcmock -lunity -lesp_lcd -lperfmon -lchmorgan__esp-libhelix-mp3 -lespressif__esp-dsp -lesp_hid -lfatfs -lwear_levelling -lsdmmc -lspiffs -lesp_insights -lesp_diagnostics -lespressif__cbor -lesp_diag_data_store -lesp_rainmaker -lesp_local_ctrl -lesp_https_server -lwifi_provisioning -lprotocomm -lbt -lbtdm_app -lprotobuf-c -ljson -lespressif__mdns -ljson_parser -ljson_generator -lesp_schedule -lespressif__esp_secure_cert_mgr -lqrcode -lrmaker_common -lconsole -lmqtt -lcat_face_detect -lhuman_face_detect -lcolor_detect -lmfn -ldl -lxtensa -lesp_ringbuf -lefuse -ldriver -lesp_pm -lmbedtls -lesp_app_format -lbootloader_support -lesp_partition -lapp_update -lesp_mm -lspi_flash -lpthread -lesp_system -lesp_rom -lhal -llog -lheap -lsoc -lesp_hw_support -lfreertos -lnewlib -lcxx -lesp_common -lesp_timer -lesp_event -lnvs_flash -lesp_phy -lvfs -llwip -lesp_netif -lwpa_supplicant -lesp_coex -lesp_wifi -lhttp_parser -lesp-tls -lesp_adc -lesp_eth -lesp_gdbstub -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_psram -lespcoredump -lulp -lmbedtls_2 -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lxtensa -lesp_ringbuf -lefuse -ldriver -lesp_pm -lmbedtls -lesp_app_format -lbootloader_support -lesp_partition -lapp_update -lesp_mm -lspi_flash -lpthread -lesp_system -lesp_rom -lhal -llog -lheap -lsoc -lesp_hw_support -lfreertos -lnewlib -lcxx -lesp_common -lesp_timer -lesp_event -lnvs_flash -lesp_phy -lvfs -llwip -lesp_netif -lwpa_supplicant -lesp_coex -lesp_wifi -lhttp_parser -lesp-tls -lesp_adc -lesp_eth -lesp_gdbstub -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_psram -lespcoredump -lulp -lmbedtls_2 -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lxtensa -lesp_ringbuf -lefuse -ldriver -lesp_pm -lmbedtls -lesp_app_format -lbootloader_support -lesp_partition -lapp_update -lesp_mm -lspi_flash -lpthread -lesp_system -lesp_rom -lhal -llog -lheap -lsoc -lesp_hw_support -lfreertos -lnewlib -lcxx -lesp_common -lesp_timer -lesp_event -lnvs_flash -lesp_phy -lvfs -llwip -lesp_netif -lwpa_supplicant -lesp_coex -lesp_wifi -lhttp_parser -lesp-tls -lesp_adc -lesp_eth -lesp_gdbstub -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_psram -lespcoredump -lulp -lmbedtls_2 -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lxtensa -lesp_ringbuf -lefuse -ldriver -lesp_pm -lmbedtls -lesp_app_format -lbootloader_support -lesp_partition -lapp_update -lesp_mm -lspi_flash -lpthread -lesp_system -lesp_rom -lhal -llog -lheap -lsoc -lesp_hw_support -lfreertos -lnewlib -lcxx -lesp_common -lesp_timer -lesp_event -lnvs_flash -lesp_phy -lvfs -llwip -lesp_netif -lwpa_supplicant -lesp_coex -lesp_wifi -lhttp_parser -lesp-tls -lesp_adc -lesp_eth -lesp_gdbstub -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_psram -lespcoredump -lulp -lmbedtls_2 -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lxtensa -lesp_ringbuf -lefuse -ldriver -lesp_pm -lmbedtls -lesp_app_format -lbootloader_support -lesp_partition -lapp_update -lesp_mm -lspi_flash -lpthread -lesp_system -lesp_rom -lhal -llog -lheap -lsoc -lesp_hw_support -lfreertos -lnewlib -lcxx -lesp_common -lesp_timer -lesp_event -lnvs_flash -lesp_phy -lvfs -llwip -lesp_netif -lwpa_supplicant -lesp_coex -lesp_wifi -lhttp_parser -lesp-tls -lesp_adc -lesp_eth -lesp_gdbstub -ltcp_transport -lesp_http_client -lesp_http_server -lesp_https_ota -lesp_psram -lespcoredump -lulp -lmbedtls_2 -lmbedcrypto -lmbedx509 -lcoexist -lcore -lespnow -lmesh -lnet80211 -lpp -lsmartconfig -lwapi -lxt_hal -lc -lm -lnewlib -lstdc++ -lpthread -lgcc -lcxx -lphy -lrtc -lesp_phy -lphy -lrtc -lesp_phy -lphy -lrtc
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#pragma once
8+
#include <esp_err.h>
9+
#include <esp_event.h>
10+
11+
#ifdef __cplusplus
12+
extern "C" {
13+
#endif
14+
15+
/**
16+
* @brief Data store event base
17+
*/
18+
ESP_EVENT_DECLARE_BASE(ESP_DIAG_DATA_STORE_EVENT);
19+
20+
/**
21+
* @brief Data store events
22+
*
23+
* Diagnostics data store emits following events using default event loop,
24+
* every event has event data of type \ref esp_diag_data_store_event_data_t
25+
*/
26+
typedef enum {
27+
ESP_DIAG_DATA_STORE_EVENT_CRITICAL_DATA_WRITE_FAIL,
28+
ESP_DIAG_DATA_STORE_EVENT_NON_CRITICAL_DATA_WRITE_FAIL,
29+
ESP_DIAG_DATA_STORE_EVENT_CRITICAL_DATA_LOW_MEM,
30+
ESP_DIAG_DATA_STORE_EVENT_NON_CRITICAL_DATA_LOW_MEM,
31+
} esp_diag_data_store_events_t;
32+
33+
/**
34+
* @brief Write critical data to the diagnostics data store
35+
*
36+
* @param[in] data Buffer holding the data
37+
* @param[in] len length of the data to be written
38+
*
39+
* @return ESP_OK on success, appropriate error code otherwise.
40+
*/
41+
esp_err_t esp_diag_data_store_critical_write(void *data, size_t len);
42+
43+
/**
44+
* @brief Write non_critical data to the diagnostics data store
45+
*
46+
* @param[in] dg Data group of the data
47+
* @param[in] data Buffer holding the data
48+
* @param[in] len length of the data to be written
49+
*
50+
* @return ESP_OK on success, appropriate error code otherwise.
51+
*/
52+
esp_err_t esp_diag_data_store_non_critical_write(const char *dg, void *data, size_t len);
53+
54+
/**
55+
* @brief Read critical data from the diagnostics data store
56+
*
57+
* @param[in] buf buffer to hold the data
58+
* @param[out] size Number of bytes read
59+
*
60+
* @return int bytes > 0 on success. Appropriate error otherwise
61+
*/
62+
int esp_diag_data_store_critical_read(uint8_t *buf, size_t size);
63+
64+
/**
65+
* @brief Read non_critical data from the diagnostics data store
66+
*
67+
* @param[in] buf buffer to hold the data
68+
* @param[out] size Number of bytes read
69+
*
70+
* @return int bytes > 0 on success. Appropriate error otherwise
71+
*/
72+
int esp_diag_data_store_non_critical_read(uint8_t *buf, size_t size);
73+
74+
/**
75+
* @brief Release the size bytes of critical data from diagnostics data store
76+
*
77+
* This API can be used to remove data from buffer when data is sent asynchronously.
78+
*
79+
* @param[in] size Number of bytes to free.
80+
*
81+
* @return ESP_OK on success, appropriate error code otherwise.
82+
*/
83+
esp_err_t esp_diag_data_store_critical_release(size_t size);
84+
85+
/**
86+
* @brief Release the size bytes of non_critical data from diagnostics data store
87+
*
88+
* This API can be used to remove data from buffer when data is sent asynchronously.
89+
*
90+
* @param[in] size Number of bytes to free.
91+
*
92+
* @return ESP_OK on success, appropriate error code otherwise.
93+
*/
94+
esp_err_t esp_diag_data_store_non_critical_release(size_t size);
95+
96+
/**
97+
* @brief Initializes the diagnostics data store
98+
*
99+
* @return ESP_OK on success, appropriate error code otherwise
100+
*/
101+
esp_err_t esp_diag_data_store_init(void);
102+
103+
/**
104+
* @brief Deinitializes the diagnostics data store
105+
*/
106+
void esp_diag_data_store_deinit(void);
107+
108+
#ifdef __cplusplus
109+
}
110+
#endif
111+
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
// Copyright 2021 Espressif Systems (Shanghai) PTE LTD
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#pragma once
16+
#include <esp_err.h>
17+
#include <esp_event.h>
18+
19+
#ifdef __cplusplus
20+
extern "C" {
21+
#endif
22+
23+
#define SHA_SIZE (CONFIG_APP_RETRIEVE_LEN_ELF_SHA / 2)
24+
25+
/**
26+
* @brief header record to identify firmware/boot data a record represent
27+
*/
28+
typedef struct {
29+
uint8_t gen_id; // generated on each hard reset
30+
uint8_t boot_cnt; // updated on each soft reboot
31+
char sha_sum[SHA_SIZE]; // elf shasum
32+
bool valid; //
33+
} rtc_store_meta_header_t;
34+
35+
/**
36+
* @brief get meta header for idx
37+
*
38+
* @param idx idx of meta from records
39+
* @return rtc_store_meta_header_t*
40+
*/
41+
rtc_store_meta_header_t *rtc_store_get_meta_record_by_index(uint8_t idx);
42+
43+
/**
44+
* @brief get current meta header
45+
*
46+
* @return rtc_store_meta_header_t*
47+
*/
48+
rtc_store_meta_header_t *rtc_store_get_meta_record_current();
49+
50+
/**
51+
* @brief Non critical data header
52+
*/
53+
typedef struct {
54+
const char *dg; /*!< Data group of non critical data eg: heap, wifi, ip */
55+
uint32_t len; /*!< Length of data */
56+
} rtc_store_non_critical_data_hdr_t;
57+
58+
/**
59+
* @brief Write critical data to the RTC storage
60+
*
61+
* @param[in] data Pointer to the data
62+
* @param[in] len Length of data
63+
*
64+
* @return ESP_OK on success, appropriate error code otherwise.
65+
*/
66+
esp_err_t rtc_store_critical_data_write(void *data, size_t len);
67+
68+
/**
69+
* @brief Read critical data from the RTC storage
70+
*
71+
* @param[in] buf Buffer to read data in
72+
* @param[in] size Number of bytes to read
73+
*
74+
* @return Number of bytes read or -1 on error
75+
*/
76+
int rtc_store_critical_data_read(uint8_t *buf, size_t size);
77+
78+
/**
79+
* @brief Release the size bytes critical data from RTC storage
80+
*
81+
* This API can be used to remove data from buffer when data is sent asynchronously.
82+
*
83+
* @param[in] size Number of bytes to free.
84+
*
85+
* @return ESP_OK on success, appropriate error code otherwise.
86+
*/
87+
esp_err_t rtc_store_critical_data_release(size_t size);
88+
89+
/**
90+
* @brief Read critical data from the RTC storage and release that data
91+
*
92+
* @param[in] buf Buffer to read data in
93+
* @param[in] size Number of bytes to read
94+
*
95+
* @return Number of bytes read or -1 on error
96+
*/
97+
int rtc_store_critical_data_read_and_release(uint8_t *buf, size_t size);
98+
99+
/**
100+
* @brief Write non critical data to the RTC storage
101+
*
102+
* This API overwrites the data if non critical storage is full
103+
*
104+
* @param[in] dg Data group of data eg: heap, wifi, ip(Must be the string stored in RODATA)
105+
* @param[in] data Pointer to non critical data
106+
* @param[in] len Length of non critical data
107+
*
108+
* @return ESP_OK on success, appropriate error code otherwise.
109+
*
110+
* @note Data is stored in Type-Length-Value format
111+
* Type(Data group) - 4 byte - Pointer to the string in rodata
112+
* Length - 4 byte - Length of data
113+
* Value - Length byte - Data
114+
*/
115+
esp_err_t rtc_store_non_critical_data_write(const char *dg, void *data, size_t len);
116+
117+
/**
118+
* @brief Read non critical data from the RTC storage
119+
*
120+
* @param[in] buf Buffer to read data in
121+
* @param[in] size Number of bytes read
122+
*
123+
* @return Number of bytes read or -1 on error
124+
*/
125+
int rtc_store_non_critical_data_read(uint8_t *buf, size_t size);
126+
127+
/**
128+
* @brief Release the size bytes non critical data from RTC storage
129+
*
130+
* @param[in] size Number of bytes to free.
131+
*
132+
* @return ESP_OK on success, appropriate error code otherwise.
133+
*/
134+
esp_err_t rtc_store_non_critical_data_release(size_t size);
135+
136+
/**
137+
* @brief Read non_critical data from the RTC storage and release that data
138+
*
139+
* @param[in] buf Buffer to read data in
140+
* @param[in] size Number of bytes read
141+
*
142+
* @return Number of bytes read or -1 on error
143+
*/
144+
int rtc_store_non_critical_data_read_and_release(uint8_t *buf, size_t size);
145+
146+
/**
147+
* @brief Initializes the RTC storage
148+
*
149+
* @return ESP_OK on success, appropriate error code otherwise
150+
*/
151+
esp_err_t rtc_store_init(void);
152+
153+
/**
154+
* @brief Deinitializes the RTC storage
155+
*/
156+
void rtc_store_deinit(void);
157+
158+
#ifdef __cplusplus
159+
}
160+
#endif

esp32/include/esp_hw_support/include/esp_private/esp_modem_clock.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ void modem_clock_select_lp_clock_source(periph_module_t module, modem_clock_lpcl
6363
*/
6464
void modem_clock_deselect_lp_clock_source(periph_module_t module);
6565

66+
/**
67+
* @brief Reset wifi mac
68+
*/
69+
void modem_clock_wifi_mac_reset(void);
70+
6671
#ifdef __cplusplus
6772
}
6873
#endif

0 commit comments

Comments
 (0)