Skip to content

Commit f963904

Browse files
committed
IDF release/v4.4 d4b4964088
1 parent da66b2b commit f963904

File tree

692 files changed

+2481
-763
lines changed

Some content is hidden

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

692 files changed

+2481
-763
lines changed

platform.txt

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

tools/platformio-build-esp32.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@
323323
"UNITY_INCLUDE_CONFIG_H",
324324
"WITH_POSIX",
325325
"_GNU_SOURCE",
326-
("IDF_VER", '\\"v4.4.2\\"'),
326+
("IDF_VER", '\\"v4.4.2-268-gd4b4964088\\"'),
327327
"ESP_PLATFORM",
328328
"_POSIX_READER_WRITER_LOCKS",
329329
"ARDUINO_ARCH_ESP32",

tools/platformio-build-esp32c3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317
"UNITY_INCLUDE_CONFIG_H",
318318
"WITH_POSIX",
319319
"_GNU_SOURCE",
320-
("IDF_VER", '\\"v4.4.2\\"'),
320+
("IDF_VER", '\\"v4.4.2-268-gd4b4964088\\"'),
321321
"ESP_PLATFORM",
322322
"_POSIX_READER_WRITER_LOCKS",
323323
"ARDUINO_ARCH_ESP32",

tools/platformio-build-esp32s2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@
306306
"UNITY_INCLUDE_CONFIG_H",
307307
"WITH_POSIX",
308308
"_GNU_SOURCE",
309-
("IDF_VER", '\\"v4.4.2\\"'),
309+
("IDF_VER", '\\"v4.4.2-268-gd4b4964088\\"'),
310310
"ESP_PLATFORM",
311311
"_POSIX_READER_WRITER_LOCKS",
312312
"ARDUINO_ARCH_ESP32",

tools/platformio-build-esp32s3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@
322322
"UNITY_INCLUDE_CONFIG_H",
323323
"WITH_POSIX",
324324
"_GNU_SOURCE",
325-
("IDF_VER", '\\"v4.4.2\\"'),
325+
("IDF_VER", '\\"v4.4.2-268-gd4b4964088\\"'),
326326
"ESP_PLATFORM",
327327
"_POSIX_READER_WRITER_LOCKS",
328328
"ARDUINO_ARCH_ESP32",
-32 Bytes
Binary file not shown.
22 KB
Binary file not shown.
-32 Bytes
Binary file not shown.
22 KB
Binary file not shown.
-32 Bytes
Binary file not shown.
22 KB
Binary file not shown.
-32 Bytes
Binary file not shown.
22 KB
Binary file not shown.
-32 Bytes
Binary file not shown.
23 KB
Binary file not shown.
-32 Bytes
Binary file not shown.
23 KB
Binary file not shown.
-32 Bytes
Binary file not shown.
23 KB
Binary file not shown.
-32 Bytes
Binary file not shown.
23 KB
Binary file not shown.

tools/sdk/esp32/dio_qspi/include/sdkconfig.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161
#define CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY 1
162162
#define CONFIG_BT_SMP_ENABLE 1
163163
#define CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT 30
164+
#define CONFIG_BT_MAX_DEVICE_NAME_LEN 32
164165
#define CONFIG_BLE_MESH 1
165166
#define CONFIG_BLE_MESH_HCI_5_0 1
166167
#define CONFIG_BLE_MESH_USE_DUPLICATE_SCAN 1
@@ -289,6 +290,8 @@
289290
#define CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR 1
290291
#define CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES 4
291292
#define CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND 1
293+
#define CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND 1
294+
#define CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND 1
292295
#define CONFIG_ESP_IPC_TASK_STACK_SIZE 1024
293296
#define CONFIG_ESP_IPC_USES_CALLERS_PRIORITY 1
294297
#define CONFIG_ESP_IPC_ISR_ENABLE 1
@@ -759,5 +762,5 @@
759762
#define CONFIG_ULP_COPROC_ENABLED CONFIG_ESP32_ULP_COPROC_ENABLED
760763
#define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM
761764
#define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS
762-
#define CONFIG_ARDUINO_IDF_COMMIT "1b16ef6cfc"
765+
#define CONFIG_ARDUINO_IDF_COMMIT "d4b4964088"
763766
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4"
10.2 KB
Binary file not shown.

tools/sdk/esp32/dout_qspi/include/sdkconfig.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161
#define CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY 1
162162
#define CONFIG_BT_SMP_ENABLE 1
163163
#define CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT 30
164+
#define CONFIG_BT_MAX_DEVICE_NAME_LEN 32
164165
#define CONFIG_BLE_MESH 1
165166
#define CONFIG_BLE_MESH_HCI_5_0 1
166167
#define CONFIG_BLE_MESH_USE_DUPLICATE_SCAN 1
@@ -289,6 +290,8 @@
289290
#define CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR 1
290291
#define CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES 4
291292
#define CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND 1
293+
#define CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND 1
294+
#define CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND 1
292295
#define CONFIG_ESP_IPC_TASK_STACK_SIZE 1024
293296
#define CONFIG_ESP_IPC_USES_CALLERS_PRIORITY 1
294297
#define CONFIG_ESP_IPC_ISR_ENABLE 1
@@ -759,5 +762,5 @@
759762
#define CONFIG_ULP_COPROC_ENABLED CONFIG_ESP32_ULP_COPROC_ENABLED
760763
#define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM
761764
#define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS
762-
#define CONFIG_ARDUINO_IDF_COMMIT "1b16ef6cfc"
765+
#define CONFIG_ARDUINO_IDF_COMMIT "d4b4964088"
763766
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4"
10.2 KB
Binary file not shown.

tools/sdk/esp32/include/bootloader_support/include/bootloader_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
extern "C" {
2727
#endif
2828

29-
/// Type of hold a GPIO in low state
29+
// Type of hold a GPIO in low state
3030
typedef enum {
3131
GPIO_LONG_HOLD = 1, /*!< The long hold GPIO */
3232
GPIO_SHORT_HOLD = -1, /*!< The short hold GPIO */

tools/sdk/esp32/include/bt/common/api/include/api/esp_blufi_api.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ typedef struct {
114114
} esp_blufi_ap_record_t;
115115

116116
/// Bluetooth address length
117-
#define ESP_BD_ADDR_LEN 6
117+
#define ESP_BLUFI_BD_ADDR_LEN 6
118118
/// Bluetooth device address
119-
typedef uint8_t esp_bd_addr_t[ESP_BD_ADDR_LEN];
119+
typedef uint8_t esp_blufi_bd_addr_t[ESP_BLUFI_BD_ADDR_LEN];
120120

121121
/**
122122
* @brief BLUFI callback parameters union
@@ -147,7 +147,7 @@ typedef union {
147147
* @brief ESP_BLUFI_EVENT_CONNECT
148148
*/
149149
struct blufi_connect_evt_param {
150-
esp_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
150+
esp_blufi_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
151151
uint8_t server_if; /*!< server interface */
152152
uint16_t conn_id; /*!< Connection id */
153153
} connect; /*!< Blufi callback param of ESP_BLUFI_EVENT_CONNECT */
@@ -156,7 +156,7 @@ typedef union {
156156
* @brief ESP_BLUFI_EVENT_DISCONNECT
157157
*/
158158
struct blufi_disconnect_evt_param {
159-
esp_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
159+
esp_blufi_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
160160
} disconnect; /*!< Blufi callback param of ESP_BLUFI_EVENT_DISCONNECT */
161161

162162
/* ESP_BLUFI_EVENT_REQ_WIFI_CONNECT */ /* No callback param */
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#ifndef _FIXED_PKT_QUEUE_H_
8+
#define _FIXED_PKT_QUEUE_H_
9+
10+
11+
#include "osi/pkt_queue.h"
12+
#include "osi/semaphore.h"
13+
14+
#ifdef __cplusplus
15+
extern "C" {
16+
#endif
17+
18+
#ifndef FIXED_PKT_QUEUE_SIZE_MAX
19+
#define FIXED_PKT_QUEUE_SIZE_MAX 254
20+
#endif
21+
22+
#define FIXED_PKT_QUEUE_MAX_TIMEOUT OSI_SEM_MAX_TIMEOUT
23+
24+
struct fixed_pkt_queue_t;
25+
26+
typedef struct fixed_pkt_queue_t fixed_pkt_queue_t;
27+
28+
typedef void (*fixed_pkt_queue_free_cb)(pkt_linked_item_t *data);
29+
typedef void (*fixed_pkt_queue_cb)(fixed_pkt_queue_t *queue);
30+
31+
// Creates a new fixed queue with the given |capacity|. If more elements than
32+
// |capacity| are added to the queue, the caller is blocked until space is
33+
// made available in the queue. Returns NULL on failure. The caller must free
34+
// the returned queue with |fixed_pkt_queue_free|.
35+
fixed_pkt_queue_t *fixed_pkt_queue_new(size_t capacity);
36+
37+
// Freeing a queue that is currently in use (i.e. has waiters
38+
// blocked on it) results in undefined behaviour.
39+
void fixed_pkt_queue_free(fixed_pkt_queue_t *queue, fixed_pkt_queue_free_cb free_cb);
40+
41+
// Returns a value indicating whether the given |queue| is empty. If |queue|
42+
// is NULL, the return value is true.
43+
bool fixed_pkt_queue_is_empty(fixed_pkt_queue_t *queue);
44+
45+
// Returns the length of the |queue|. If |queue| is NULL, the return value
46+
// is 0.
47+
size_t fixed_pkt_queue_length(fixed_pkt_queue_t *queue);
48+
49+
// Returns the maximum number of elements this queue may hold. |queue| may
50+
// not be NULL.
51+
size_t fixed_pkt_queue_capacity(fixed_pkt_queue_t *queue);
52+
53+
// Enqueues the given |data| into the |queue|. The caller will be blocked or immediately return or wait for timeout according to the parameter timeout.
54+
// If enqueue failed, it will return false, otherwise return true
55+
bool fixed_pkt_queue_enqueue(fixed_pkt_queue_t *queue, pkt_linked_item_t *linked_pkt, uint32_t timeout);
56+
57+
// Dequeues the next element from |queue|. If the queue is currently empty,
58+
// this function will block the caller until an item is enqueued or immediately return or wait for timeout according to the parameter timeout.
59+
// If dequeue failed, it will return NULL, otherwise return a point.
60+
pkt_linked_item_t *fixed_pkt_queue_dequeue(fixed_pkt_queue_t *queue, uint32_t timeout);
61+
62+
// Returns the first element from |queue|, if present, without dequeuing it.
63+
// This function will never block the caller. Returns NULL if there are no
64+
// elements in the queue or |queue| is NULL.
65+
pkt_linked_item_t *fixed_pkt_queue_try_peek_first(fixed_pkt_queue_t *queue);
66+
67+
// Registers |queue| with |reactor| for dequeue operations. When there is an element
68+
// in the queue, ready_cb will be called. The |context| parameter is passed, untouched,
69+
// to the callback routine. Neither |queue|, nor |reactor|, nor |read_cb| may be NULL.
70+
// |context| may be NULL.
71+
void fixed_pkt_queue_register_dequeue(fixed_pkt_queue_t *queue, fixed_pkt_queue_cb ready_cb);
72+
73+
// Unregisters the dequeue ready callback for |queue| from whichever reactor
74+
// it is registered with, if any. This function is idempotent.
75+
void fixed_pkt_queue_unregister_dequeue(fixed_pkt_queue_t *queue);
76+
77+
void fixed_pkt_queue_process(fixed_pkt_queue_t *queue);
78+
79+
#endif
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#ifndef _PKT_LIST_H_
8+
#define _PKT_LIST_H_
9+
10+
#include "sys/queue.h"
11+
#include <stdint.h>
12+
#include <stdbool.h>
13+
14+
#ifdef __cplusplus
15+
extern "C" {
16+
#endif
17+
18+
struct pkt_queue;
19+
20+
typedef struct pkt_linked_item {
21+
STAILQ_ENTRY(pkt_linked_item) next;
22+
uint8_t data[];
23+
} pkt_linked_item_t;
24+
25+
#define BT_PKT_LINKED_HDR_SIZE (sizeof (pkt_linked_item_t))
26+
27+
typedef void (*pkt_queue_free_cb)(pkt_linked_item_t *item);
28+
29+
/*
30+
* brief: create a pkt_queue instance. pkt_queue is a wrapper class of a FIFO implemented by single linked list.
31+
* The enqueue and dequeue operations of the FIFO are protected against race conditions of multiple tasks
32+
* return: NULL if not enough memory, otherwise a valid pointer
33+
*/
34+
struct pkt_queue *pkt_queue_create(void);
35+
36+
/*
37+
* brief: enqueue one item to the FIFO
38+
* param queue: pkt_queue instance created using pkt_queue_create
39+
* param item: the item to be enqueued to the FIFO
40+
* return: true if enqueued successfully, false when the arguments passed in are invalid
41+
*/
42+
bool pkt_queue_enqueue(struct pkt_queue *queue, pkt_linked_item_t *item);
43+
44+
/*
45+
* brief: dequeue one item for the FIFO
46+
* param queue: pkt_queue instance created using pkt_queue_create
47+
* return: pointer of type pkt_linked_item_t dequeued, NULL if the queue is empty or upon exception
48+
*/
49+
pkt_linked_item_t *pkt_queue_dequeue(struct pkt_queue *queue);
50+
51+
/*
52+
* brief: get the pointer of the first item from the FIFO but not get it dequeued
53+
* param queue: pkt_queue instance created using pkt_queue_create
54+
* return: pointer of the first item in the FIFO, NULL if the FIFO is empty
55+
*/
56+
pkt_linked_item_t *pkt_queue_try_peek_first(struct pkt_queue *queue);
57+
58+
/*
59+
* brief: retrieve the number of items existing in the FIFO
60+
* param queue: pkt_queue instance created using pkt_queue_create
61+
* return: total number of items in the FIFO
62+
*/
63+
size_t pkt_queue_length(const struct pkt_queue *queue);
64+
65+
/*
66+
* brief: retrieve the status whether the FIFO is empty
67+
* param queue: pkt_queue instance created using pkt_queue_create
68+
* return: false if the FIFO is not empty, otherwise true
69+
*/
70+
bool pkt_queue_is_empty(const struct pkt_queue *queue);
71+
72+
/*
73+
* brief: delete the item in the FIFO one by one
74+
* param free_cb: destructor function for each item in the FIFO, if set to NULL, will use osi_free_func by default
75+
*/
76+
void pkt_queue_flush(struct pkt_queue *queue, pkt_queue_free_cb free_cb);
77+
78+
/*
79+
* brief: delete the items in the FIFO and then destroy the pkt_queue instance.
80+
* param free_cb: destructor function for each item in the FIFO, if set to NULL, will use osi_free_func by default
81+
*/
82+
void pkt_queue_destroy(struct pkt_queue *queue, pkt_queue_free_cb free_cb);
83+
84+
#ifdef __cplusplus
85+
}
86+
#endif
87+
88+
#endif

tools/sdk/esp32/include/bt/common/osi/include/osi/thread.h

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#define OSI_THREAD_MAX_TIMEOUT OSI_SEM_MAX_TIMEOUT
2929

3030
struct osi_thread;
31+
struct osi_event;
3132

3233
typedef struct osi_thread osi_thread_t;
3334

@@ -48,7 +49,7 @@ typedef enum {
4849
* param work_queue_num: speicify queue number, the queue[0] has highest priority, and the priority is decrease by index
4950
* return : if create successfully, return thread handler; otherwise return NULL.
5051
*/
51-
osi_thread_t *osi_thread_create(const char *name, size_t stack_size, int priority, osi_thread_core_t core, uint8_t work_queue_num);
52+
osi_thread_t *osi_thread_create(const char *name, size_t stack_size, int priority, osi_thread_core_t core, uint8_t work_queue_num, const size_t work_queue_len[]);
5253

5354
/*
5455
* brief: Destroy a thread or task
@@ -88,4 +89,42 @@ const char *osi_thread_name(osi_thread_t *thread);
8889
*/
8990
int osi_thread_queue_wait_size(osi_thread_t *thread, int wq_idx);
9091

92+
/*
93+
* brief: Create an osi_event struct and register the handler function and its argument
94+
* An osi_event is a kind of work that can be posted to the workqueue of osi_thread to process,
95+
* but the work can have at most one instance the thread workqueue before it is processed. This
96+
* allows the "single post, multiple data processing" jobs.
97+
* param func: the handler to process the job
98+
* param context: the argument to be passed to the handler function when the job is being processed
99+
* return: NULL if no memory, otherwise a valid struct pointer
100+
*/
101+
struct osi_event *osi_event_create(osi_thread_func_t func, void *context);
102+
103+
/*
104+
* brief: Bind an osi_event to a specific work queue for an osi_thread.
105+
* After binding is completed, a function call of API osi_thread_post_event will send a work
106+
* to the workqueue of the thread, with specified queue index.
107+
* param func: event: the pointer to osi_event that is created using osi_event_create
108+
* param thread: the pointer to osi_thread that is created using osi_thread_create
109+
* param queue_idx: the index of the workqueue of the specified osi_thread, with range starting from 0 to work_queue_num - 1
110+
* return: true if osi_event binds to the thread's workqueue successfully, otherwise false
111+
*/
112+
bool osi_event_bind(struct osi_event* event, osi_thread_t *thread, int queue_idx);
113+
114+
/*
115+
* brief: Destroy the osi_event struct created by osi_event_create and free the allocated memory
116+
* param event: the pointer to osi_event
117+
*/
118+
void osi_event_delete(struct osi_event* event);
119+
120+
/*
121+
* brief: try sending a work to the binded thread's workqueue, so that it can be handled by the worker thread
122+
* param event: pointer to osi_event, created by osi_event_create
123+
* param timeout: post timeout, OSI_THREAD_MAX_TIMEOUT means blocking forever, 0 means never blocking, others means block millisecond
124+
* return: true if the message is enqueued to the thread workqueue, otherwise failed
125+
* note: if the return value of function is false, it is the case that the workqueue of the thread is full, and users
126+
* are expected to post the event sometime later to get the work handled.
127+
*/
128+
bool osi_thread_post_event(struct osi_event *event, uint32_t timeout);
129+
91130
#endif /* __THREAD_H__ */

tools/sdk/esp32/include/bt/esp_ble_mesh/mesh_core/mesh.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extern "C" {
2020
#define BLE_MESH_KEY_ANY 0xffff
2121

2222
#define BLE_MESH_ADDR_IS_UNICAST(addr) ((addr) && (addr) < 0x8000)
23-
#define BLE_MESH_ADDR_IS_GROUP(addr) ((addr) >= 0xc000 && (addr) <= 0xff00)
23+
#define BLE_MESH_ADDR_IS_GROUP(addr) ((addr) >= 0xc000 && (addr) < 0xff00)
2424
#define BLE_MESH_ADDR_IS_VIRTUAL(addr) ((addr) >= 0x8000 && (addr) < 0xc000)
2525
#define BLE_MESH_ADDR_IS_RFU(addr) ((addr) >= 0xff00 && (addr) <= 0xfffb)
2626

tools/sdk/esp32/include/bt/esp_ble_mesh/mesh_core/net.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ struct bt_mesh_friend {
9595
uint8_t fsn:1,
9696
send_last:1,
9797
pending_req:1,
98-
sec_update:1,
9998
pending_buf:1,
10099
valid:1,
101100
established:1;

0 commit comments

Comments
 (0)