Skip to content

Commit ba929be

Browse files
committed
Update IDF to 9a26296
1 parent 0bce98e commit ba929be

File tree

232 files changed

+6314
-2103
lines changed

Some content is hidden

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

232 files changed

+6314
-2103
lines changed

platform.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ compiler.warning_flags.all=-Wall -Werror=all -Wextra
2121

2222
compiler.path={runtime.tools.xtensa-esp32-elf-gcc.path}/bin/
2323
compiler.sdk.path={runtime.platform.path}/tools/sdk
24-
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/bluedroid" "-I{compiler.sdk.path}/include/app_trace" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/heap" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mbedtls_port" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/wear_levelling" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/lwip"
24+
compiler.cpreprocessor.flags=-DESP_PLATFORM -DMBEDTLS_CONFIG_FILE="mbedtls/esp_config.h" -DHAVE_CONFIG_H "-I{compiler.sdk.path}/include/config" "-I{compiler.sdk.path}/include/bluedroid" "-I{compiler.sdk.path}/include/app_trace" "-I{compiler.sdk.path}/include/app_update" "-I{compiler.sdk.path}/include/bootloader_support" "-I{compiler.sdk.path}/include/bt" "-I{compiler.sdk.path}/include/driver" "-I{compiler.sdk.path}/include/esp32" "-I{compiler.sdk.path}/include/esp_adc_cal" "-I{compiler.sdk.path}/include/ethernet" "-I{compiler.sdk.path}/include/fatfs" "-I{compiler.sdk.path}/include/freertos" "-I{compiler.sdk.path}/include/heap" "-I{compiler.sdk.path}/include/jsmn" "-I{compiler.sdk.path}/include/log" "-I{compiler.sdk.path}/include/mdns" "-I{compiler.sdk.path}/include/mbedtls" "-I{compiler.sdk.path}/include/mbedtls_port" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/nvs_flash" "-I{compiler.sdk.path}/include/openssl" "-I{compiler.sdk.path}/include/soc" "-I{compiler.sdk.path}/include/spi_flash" "-I{compiler.sdk.path}/include/sdmmc" "-I{compiler.sdk.path}/include/spiffs" "-I{compiler.sdk.path}/include/tcpip_adapter" "-I{compiler.sdk.path}/include/ulp" "-I{compiler.sdk.path}/include/vfs" "-I{compiler.sdk.path}/include/wear_levelling" "-I{compiler.sdk.path}/include/xtensa-debug-module" "-I{compiler.sdk.path}/include/console" "-I{compiler.sdk.path}/include/newlib" "-I{compiler.sdk.path}/include/coap" "-I{compiler.sdk.path}/include/wpa_supplicant" "-I{compiler.sdk.path}/include/expat" "-I{compiler.sdk.path}/include/json" "-I{compiler.sdk.path}/include/nghttp" "-I{compiler.sdk.path}/include/lwip"
2525

2626
compiler.c.cmd=xtensa-esp32-elf-gcc
2727
compiler.c.flags=-std=gnu99 -Os -g3 -ffunction-sections -fdata-sections -fstrict-volatile-bitfields -mlongcalls -nostdlib -Wpointer-arith {compiler.warning_flags} -Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wno-unused-parameter -Wno-sign-compare -Wno-old-style-declaration -MMD -c
@@ -33,8 +33,8 @@ compiler.S.cmd=xtensa-esp32-elf-gcc
3333
compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
3434

3535
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
36-
compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority
37-
compiler.c.elf.libs=-lgcc -lstdc++ -lapp_trace -lapp_update -lbootloader_support -lbt -lbtdm_app -lc -lc_nano -lcoap -lcoexist -lcore -lcxx -ldriver -lesp32 -lethernet -lexpat -lfatfs -lfreertos -lhal -lheap -ljsmn -ljson -llog -llwip -lm -lmbedtls -lmdns -lmicro-ecc -lnet80211 -lnewlib -lnghttp -lnvs_flash -lopenssl -lphy -lpp -lrtc -lsdmmc -lsmartconfig -lsoc -lspi_flash -ltcpip_adapter -lulp -lvfs -lwear_levelling -lwpa -lwpa2 -lwpa_supplicant -lwps -lxtensa-debug-module
36+
compiler.c.elf.flags=-nostdlib "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" -T esp32_out.ld -T esp32.common.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.spiram_incompatible_fns.ld -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority
37+
compiler.c.elf.libs=-lgcc -lstdc++ -lapp_trace -lapp_update -lbootloader_support -lbt -lbtdm_app -lc -lc_nano -lcoap -lcoexist -lconsole -lcore -lcxx -ldriver -lesp32 -lesp_adc_cal -lethernet -lexpat -lfatfs -lfreertos -lhal -lheap -ljsmn -ljson -llog -llwip -lm -lmbedtls -lmdns -lmicro-ecc -lnet80211 -lnewlib -lnghttp -lnvs_flash -lopenssl -lphy -lpp -lpthread -lrtc -lsdmmc -lsmartconfig -lsoc -lspi_flash -lspiffs -ltcpip_adapter -lulp -lvfs -lwear_levelling -lwpa -lwpa2 -lwpa_supplicant -lwps -lxtensa-debug-module
3838

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

tools/esptool.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import copy
3333
import io
3434

35-
__version__ = "2.1-beta1"
35+
__version__ = "2.1"
3636

3737
MAX_UINT32 = 0xffffffff
3838
MAX_UINT24 = 0xffffff
@@ -1315,7 +1315,7 @@ def __init__(self, load_file=None):
13151315

13161316
if self.append_digest:
13171317
end = load_file.tell()
1318-
self.stored_digest = load_file.read(16)
1318+
self.stored_digest = load_file.read(32)
13191319
load_file.seek(start)
13201320
calc_digest = hashlib.sha256()
13211321
calc_digest.update(load_file.read(end - start))
@@ -1864,6 +1864,15 @@ def image_info(args):
18641864
calc_checksum = image.calculate_checksum()
18651865
print('Checksum: %02x (%s)' % (image.checksum,
18661866
'valid' if image.checksum == calc_checksum else 'invalid - calculated %02x' % calc_checksum))
1867+
try:
1868+
digest_msg = 'Not appended'
1869+
if image.append_digest:
1870+
is_valid = image.stored_digest == image.calc_digest
1871+
digest_msg = "%s (%s)" % (hexify(image.calc_digest).lower(),
1872+
"valid" if is_valid else "invalid")
1873+
print('Validation Hash: %s' % digest_msg)
1874+
except AttributeError:
1875+
pass # ESP8266 image has no append_digest field
18671876

18681877

18691878
def make_image(args):

tools/platformio-build.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
join(FRAMEWORK_DIR, "tools", "sdk", "include", "bt"),
5858
join(FRAMEWORK_DIR, "tools", "sdk", "include", "driver"),
5959
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp32"),
60+
join(FRAMEWORK_DIR, "tools", "sdk", "include", "esp_adc_cal"),
6061
join(FRAMEWORK_DIR, "tools", "sdk", "include", "ethernet"),
6162
join(FRAMEWORK_DIR, "tools", "sdk", "include", "fatfs"),
6263
join(FRAMEWORK_DIR, "tools", "sdk", "include", "freertos"),
@@ -72,11 +73,13 @@
7273
join(FRAMEWORK_DIR, "tools", "sdk", "include", "soc"),
7374
join(FRAMEWORK_DIR, "tools", "sdk", "include", "spi_flash"),
7475
join(FRAMEWORK_DIR, "tools", "sdk", "include", "sdmmc"),
76+
join(FRAMEWORK_DIR, "tools", "sdk", "include", "spiffs"),
7577
join(FRAMEWORK_DIR, "tools", "sdk", "include", "tcpip_adapter"),
7678
join(FRAMEWORK_DIR, "tools", "sdk", "include", "ulp"),
7779
join(FRAMEWORK_DIR, "tools", "sdk", "include", "vfs"),
7880
join(FRAMEWORK_DIR, "tools", "sdk", "include", "wear_levelling"),
7981
join(FRAMEWORK_DIR, "tools", "sdk", "include", "xtensa-debug-module"),
82+
join(FRAMEWORK_DIR, "tools", "sdk", "include", "console"),
8083
join(FRAMEWORK_DIR, "tools", "sdk", "include", "newlib"),
8184
join(FRAMEWORK_DIR, "tools", "sdk", "include", "coap"),
8285
join(FRAMEWORK_DIR, "tools", "sdk", "include", "wpa_supplicant"),
@@ -91,7 +94,7 @@
9194
join(FRAMEWORK_DIR, "tools", "sdk", "ld")
9295
],
9396
LIBS=[
94-
"gcc", "stdc++", "app_trace", "app_update", "bootloader_support", "bt", "btdm_app", "c", "c_nano", "coap", "coexist", "core", "cxx", "driver", "esp32", "ethernet", "expat", "fatfs", "freertos", "hal", "heap", "jsmn", "json", "log", "lwip", "m", "mbedtls", "mdns", "micro-ecc", "net80211", "newlib", "nghttp", "nvs_flash", "openssl", "phy", "pp", "rtc", "sdmmc", "smartconfig", "soc", "spi_flash", "tcpip_adapter", "ulp", "vfs", "wear_levelling", "wpa", "wpa2", "wpa_supplicant", "wps", "xtensa-debug-module"
97+
"gcc", "stdc++", "app_trace", "app_update", "bootloader_support", "bt", "btdm_app", "c", "c_nano", "coap", "coexist", "console", "core", "cxx", "driver", "esp32", "esp_adc_cal", "ethernet", "expat", "fatfs", "freertos", "hal", "heap", "jsmn", "json", "log", "lwip", "m", "mbedtls", "mdns", "micro-ecc", "net80211", "newlib", "nghttp", "nvs_flash", "openssl", "phy", "pp", "pthread", "rtc", "sdmmc", "smartconfig", "soc", "spi_flash", "spiffs", "tcpip_adapter", "ulp", "vfs", "wear_levelling", "wpa", "wpa2", "wpa_supplicant", "wps", "xtensa-debug-module"
9598
],
9699

97100
UPLOADERFLAGS=[
@@ -110,6 +113,7 @@
110113
"-T", "esp32.common.ld",
111114
"-T", "esp32.rom.ld",
112115
"-T", "esp32.peripherals.ld",
116+
"-T", "esp32.rom.spiram_incompatible_fns.ld",
113117
"-u", "ld_include_panic_highint_hdl"
114118
],
115119

tools/sdk/bin/bootloader.bin

112 Bytes
Binary file not shown.

tools/sdk/bin/bootloader_qio.bin

128 Bytes
Binary file not shown.

tools/sdk/include/app_trace/esp_ota_ops.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,17 @@ esp_err_t esp_ota_set_boot_partition(const esp_partition_t* partition);
126126
*
127127
* If esp_ota_set_boot_partition() has been called, the partition which was set by that function will be returned.
128128
*
129-
* If esp_ota_set_boot_partition() has not been called, the result is
130-
* equivalent to esp_ota_get_running_partition().
129+
* If esp_ota_set_boot_partition() has not been called, the result is usually the same as esp_ota_get_running_partition().
130+
* The two results are not equal if the configured boot partition does not contain a valid app (meaning that the running partition
131+
* will be an app that the bootloader chose via fallback).
132+
*
133+
* If the OTA data partition is not present or not valid then the result is the first app partition found in the
134+
* partition table. In priority order, this means: the factory app, the first OTA app slot, or the test app partition.
131135
*
132136
* Note that there is no guarantee the returned partition is a valid app. Use esp_image_load(ESP_IMAGE_VERIFY, ...) to verify if the
133-
* partition contains a bootable image.
137+
* returned partition contains a bootable image.
134138
*
135-
* @return Pointer to info for partition structure, or NULL if no partition is found or flash read operation failed. Returned pointer is valid for the lifetime of the application.
139+
* @return Pointer to info for partition structure, or NULL if partition table is invalid or a flash read operation failed. Any returned pointer is valid for the lifetime of the application.
136140
*/
137141
const esp_partition_t* esp_ota_get_boot_partition(void);
138142

tools/sdk/include/app_update/esp_ota_ops.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,17 @@ esp_err_t esp_ota_set_boot_partition(const esp_partition_t* partition);
126126
*
127127
* If esp_ota_set_boot_partition() has been called, the partition which was set by that function will be returned.
128128
*
129-
* If esp_ota_set_boot_partition() has not been called, the result is
130-
* equivalent to esp_ota_get_running_partition().
129+
* If esp_ota_set_boot_partition() has not been called, the result is usually the same as esp_ota_get_running_partition().
130+
* The two results are not equal if the configured boot partition does not contain a valid app (meaning that the running partition
131+
* will be an app that the bootloader chose via fallback).
132+
*
133+
* If the OTA data partition is not present or not valid then the result is the first app partition found in the
134+
* partition table. In priority order, this means: the factory app, the first OTA app slot, or the test app partition.
131135
*
132136
* Note that there is no guarantee the returned partition is a valid app. Use esp_image_load(ESP_IMAGE_VERIFY, ...) to verify if the
133-
* partition contains a bootable image.
137+
* returned partition contains a bootable image.
134138
*
135-
* @return Pointer to info for partition structure, or NULL if no partition is found or flash read operation failed. Returned pointer is valid for the lifetime of the application.
139+
* @return Pointer to info for partition structure, or NULL if partition table is invalid or a flash read operation failed. Any returned pointer is valid for the lifetime of the application.
136140
*/
137141
const esp_partition_t* esp_ota_get_boot_partition(void);
138142

tools/sdk/include/bluedroid/alarm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,6 @@ period_ms_t osi_alarm_get_remaining_ms(const osi_alarm_t *alarm);
7676
// t1 and t2 should be no greater than the time of MAX ticks
7777
period_ms_t osi_alarm_time_diff(period_ms_t t1, period_ms_t t2);
7878

79+
uint32_t osi_time_get_os_boottime_ms(void);
80+
7981
#endif /*_ALARM_H_*/

tools/sdk/include/bluedroid/allocator.h

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#define _ALLOCATOR_H_
2121

2222
#include <stddef.h>
23-
//#include <stdlib.h>
23+
#include <stdlib.h>
2424
#include "sdkconfig.h"
2525

2626
typedef void *(*alloc_fn)(size_t size);
@@ -52,7 +52,7 @@ void osi_mem_dbg_show(void);
5252
({ \
5353
void *p; \
5454
\
55-
p = calloc(1, (size)); \
55+
p = malloc((size)); \
5656
osi_mem_dbg_record(p, size, __func__, __LINE__); \
5757
(void *)p; \
5858
})
@@ -67,14 +67,15 @@ void osi_mem_dbg_show(void);
6767
})
6868

6969
#define osi_free(ptr) \
70-
({ \
71-
osi_mem_dbg_clean(ptr, __func__, __LINE__); \
72-
free((ptr)); \
73-
})
70+
do { \
71+
void *tmp_point = (void *)(ptr); \
72+
osi_mem_dbg_clean(tmp_point, __func__, __LINE__); \
73+
free(tmp_point); \
74+
} while (0)
7475

7576
#else
7677

77-
#define osi_malloc(size) calloc(1, (size))
78+
#define osi_malloc(size) malloc((size))
7879
#define osi_calloc(size) calloc(1, (size))
7980
#define osi_free(p) free((p))
8081

tools/sdk/include/bluedroid/avct_int.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
#ifndef AVCT_INT_H
2525
#define AVCT_INT_H
2626

27-
#include "gki.h"
2827
#include "avct_api.h"
2928
#include "avct_defs.h"
3029
#include "l2c_api.h"
30+
#include "fixed_queue.h"
3131

3232
/*****************************************************************************
3333
** constants
@@ -81,7 +81,7 @@ typedef struct {
8181
BT_HDR *p_rx_msg; /* Message being reassembled */
8282
UINT16 conflict_lcid; /* L2CAP channel LCID */
8383
BD_ADDR peer_addr; /* BD address of peer */
84-
BUFFER_Q tx_q; /* Transmit data buffer queue */
84+
fixed_queue_t *tx_q; /* Transmit data buffer queue */
8585
BOOLEAN cong; /* TRUE, if congested */
8686
} tAVCT_LCB;
8787

tools/sdk/include/bluedroid/avdt_int.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
#ifndef AVDT_INT_H
2525
#define AVDT_INT_H
2626

27-
#include "gki.h"
2827
#include "avdt_api.h"
2928
#include "avdtc_api.h"
3029
#include "avdt_defs.h"
3130
#include "l2c_api.h"
3231
#include "btm_api.h"
32+
#include "fixed_queue.h"
3333

3434
#if (AVRC_INCLUDED == TRUE)
3535

@@ -425,8 +425,8 @@ typedef union {
425425
typedef struct {
426426
BD_ADDR peer_addr; /* BD address of peer */
427427
TIMER_LIST_ENT timer_entry; /* CCB timer list entry */
428-
BUFFER_Q cmd_q; /* Queue for outgoing command messages */
429-
BUFFER_Q rsp_q; /* Queue for outgoing response and reject messages */
428+
fixed_queue_t *cmd_q; /* Queue for outgoing command messages */
429+
fixed_queue_t *rsp_q; /* Queue for outgoing response and reject messages */
430430
tAVDT_CTRL_CBACK *proc_cback; /* Procedure callback function */
431431
tAVDT_CTRL_CBACK *p_conn_cback; /* Connection/disconnection callback function */
432432
void *p_proc_data; /* Pointer to data storage for procedure */
@@ -453,7 +453,7 @@ typedef struct {
453453
BT_HDR *p_buf;
454454
UINT32 time_stamp;
455455
#if AVDT_MULTIPLEXING == TRUE
456-
BUFFER_Q frag_q; /* Queue for outgoing media fragments. p_buf should be 0 */
456+
fixed_queue_t *frag_q; /* Queue for outgoing media fragments. p_buf should be 0 */
457457
UINT8 *p_data;
458458
UINT32 data_len;
459459
#endif
@@ -500,7 +500,7 @@ typedef struct {
500500
BOOLEAN cong; /* Whether media transport channel is congested */
501501
UINT8 close_code; /* Error code received in close response */
502502
#if AVDT_MULTIPLEXING == TRUE
503-
BUFFER_Q frag_q; /* Queue for outgoing media fragments */
503+
fixed_queue_t *frag_q; /* Queue for outgoing media fragments */
504504
UINT32 frag_off; /* length of already received media fragments */
505505
UINT32 frag_org_len; /* original length before fragmentation of receiving media packet */
506506
UINT8 *p_next_frag; /* next fragment to send */
@@ -673,7 +673,7 @@ extern void avdt_scb_chk_snd_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
673673
extern void avdt_scb_clr_pkt(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
674674
extern void avdt_scb_tc_timer(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
675675
extern void avdt_scb_clr_vars(tAVDT_SCB *p_scb, tAVDT_SCB_EVT *p_data);
676-
extern void avdt_scb_queue_frags(tAVDT_SCB *p_scb, UINT8 **pp_data, UINT32 *p_data_len, BUFFER_Q *pq);
676+
extern void avdt_scb_queue_frags(tAVDT_SCB *p_scb, UINT8 **pp_data, UINT32 *p_data_len, fixed_queue_t *pq);
677677

678678
/* msg function declarations */
679679
extern BOOLEAN avdt_msg_send(tAVDT_CCB *p_ccb, BT_HDR *p_msg);

tools/sdk/include/bluedroid/bt_defs.h

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
#include <stdlib.h>
2323
#include <stdint.h>
2424
#include "bt_trace.h"
25-
26-
#include "osi_arch.h"
25+
#include "bt_target.h"
2726

2827
#define UNUSED(x) (void)(x)
2928

@@ -32,6 +31,20 @@
3231
#endif
3332
/*Timer Related Defination*/
3433

34+
//by Snake.T
35+
typedef void (TIMER_CBACK)(void *p_tle);
36+
typedef struct _tle {
37+
struct _tle *p_next;
38+
struct _tle *p_prev;
39+
TIMER_CBACK *p_cback;
40+
INT32 ticks;
41+
INT32 ticks_initial;
42+
TIMER_PARAM_TYPE param;
43+
TIMER_PARAM_TYPE data;
44+
UINT16 event;
45+
UINT8 in_use;
46+
} TIMER_LIST_ENT;
47+
3548
#define alarm_timer_t uint32_t
3649
#define alarm_timer_setfn(timer, cb, data) \
3750
do { \
@@ -45,23 +58,6 @@ do { \
4558
#define alarm_timer_now() (0)
4659

4760

48-
/*Thread and locker related defination*/
49-
#define RTOS_SUPPORT
50-
#ifdef RTOS_SUPPORT
51-
#define pthread_mutex_t osi_mutex_t
52-
#define pthread_mutex_init(mutex, a) osi_mutex_new(mutex)
53-
#define pthread_mutex_destroy(mutex) osi_mutex_free(mutex)
54-
#define pthread_mutex_lock osi_mutex_lock
55-
#define pthread_mutex_unlock osi_mutex_unlock
56-
#else
57-
#define pthread_mutex_t uint8_t
58-
#define pthread_mutex_init(x1, x2)
59-
#define pthread_mutex_destroy(mutex)
60-
#define pthread_mutex_lock(mutex)
61-
#define pthread_mutex_unlock(mutex)
62-
#endif
63-
64-
6561
/*Bluetooth Address*/
6662
typedef struct {
6763
uint8_t address[6];

0 commit comments

Comments
 (0)