Update IDF to c4e65d6
This commit is contained in:
parent
e2bd93c092
commit
d27d297195
@ -52,7 +52,7 @@ bool btStop(){
|
||||
return true;
|
||||
}
|
||||
if(esp_bt_controller_get_status() == ESP_BT_CONTROLLER_STATUS_ENABLED){
|
||||
if (esp_bt_controller_disable(ESP_BT_MODE_BTDM)) {
|
||||
if (esp_bt_controller_disable()) {
|
||||
log_e("BT Disable failed");
|
||||
return false;
|
||||
}
|
||||
|
@ -33,12 +33,12 @@
|
||||
{
|
||||
"packager": "esp32",
|
||||
"name": "xtensa-esp32-elf-gcc",
|
||||
"version": "1.22.0-61-gab8375a-5.2.0"
|
||||
"version": "1.22.0-73-ge28a011-5.2.0"
|
||||
},
|
||||
{
|
||||
"packager": "esp32",
|
||||
"name": "esptool",
|
||||
"version": "a420774"
|
||||
"version": "4dab24e"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -46,55 +46,55 @@
|
||||
"tools": [
|
||||
{
|
||||
"name": "xtensa-esp32-elf-gcc",
|
||||
"version": "1.22.0-61-gab8375a-5.2.0",
|
||||
"version": "1.22.0-73-ge28a011-5.2.0",
|
||||
"systems": [
|
||||
{
|
||||
"host": "i686-mingw32",
|
||||
"url": "https://dl.espressif.com/dl/xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0-2.zip",
|
||||
"archiveFileName": "xtensa-esp32-elf-win32-1.22.0-61-gab8375a-5.2.0-2.zip",
|
||||
"checksum": "SHA-256:c00dbdab8e8acc273d4aa319a74f7bb1d9496c843159823201d685359174168f",
|
||||
"size": "76346909"
|
||||
"url": "https://dl.espressif.com/dl/xtensa-esp32-elf-win32-1.22.0-73-ge28a011-5.2.0.zip",
|
||||
"archiveFileName": "xtensa-esp32-elf-win32-1.22.0-73-ge28a011-5.2.0.zip",
|
||||
"checksum": "SHA-256:97566173909b20567b99ec1b0f5746e341d65961f82fdb760a00937193d03d29",
|
||||
"size": "78710389"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-apple-darwin",
|
||||
"url": "https://dl.espressif.com/dl/xtensa-esp32-elf-osx-1.22.0-61-gab8375a-5.2.0.tar.gz",
|
||||
"archiveFileName": "xtensa-esp32-elf-osx-1.22.0-61-gab8375a-5.2.0.tar.gz",
|
||||
"checksum": "SHA-256:89a9a6084ec032ddcd4bdae37b428e533ed5fd0c0ab6b66ddf703e4b3f83d6e4",
|
||||
"size": "40481812"
|
||||
"url": "https://dl.espressif.com/dl/xtensa-esp32-elf-osx-1.22.0-73-ge28a011-5.2.0.tar.gz",
|
||||
"archiveFileName": "xtensa-esp32-elf-osx-1.22.0-73-ge28a011-5.2.0.tar.gz",
|
||||
"checksum": "SHA-256:5eb503462eb7f6a41c0d6c0538b512ab35a0f76ce96514a4e7a6074f6b3ad0d0",
|
||||
"size": "39903635"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-pc-linux-gnu",
|
||||
"url": "https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz",
|
||||
"archiveFileName": "xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz",
|
||||
"checksum": "SHA-256:b74333fd7f622f035fee7c4e0ca57c3e2ccb2515de5d901f33e87e79cdf0d4f9",
|
||||
"size": "37674568"
|
||||
"url": "https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-73-ge28a011-5.2.0.tar.gz",
|
||||
"archiveFileName": "xtensa-esp32-elf-linux64-1.22.0-73-ge28a011-5.2.0.tar.gz",
|
||||
"checksum": "SHA-256:3763dbed9fd43901c07757622e9c46d29e89eda812b83627df5cb9d019cae0e5",
|
||||
"size": "37656793"
|
||||
},
|
||||
{
|
||||
"host": "i686-pc-linux-gnu",
|
||||
"url": "https://dl.espressif.com/dl/xtensa-esp32-elf-linux32-1.22.0-61-gab8375a-5.2.0.tar.gz",
|
||||
"archiveFileName": "xtensa-esp32-elf-linux32-1.22.0-61-gab8375a-5.2.0.tar.gz",
|
||||
"checksum": "SHA-256:dbb342b7c377a7c3a1fcccc60fa1193332d0c37e6a90c5075d3471c13c9e94ad",
|
||||
"size": "41032647"
|
||||
"url": "https://dl.espressif.com/dl/xtensa-esp32-elf-linux32-1.22.0-73-ge28a011-5.2.0.tar.gz",
|
||||
"archiveFileName": "xtensa-esp32-elf-linux32-1.22.0-73-ge28a011-5.2.0.tar.gz",
|
||||
"checksum": "SHA-256:1d8b1dd16223dcb5181af7d713582cf7f22db36c0865d9fcff7b51cfac460641",
|
||||
"size": "38991614"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "esptool",
|
||||
"version": "a420774",
|
||||
"version": "4dab24e",
|
||||
"systems": [
|
||||
{
|
||||
"host": "i686-mingw32",
|
||||
"url": "https://dl.espressif.com/dl/esptool-a420774-windows.zip",
|
||||
"archiveFileName": "esptool-a420774-windows.zip",
|
||||
"checksum": "SHA-256:7778545baa30a85a37a956e47e42a236fa67227f21b160b2164ef83a5e20a41f",
|
||||
"size": "3394137"
|
||||
"url": "https://dl.espressif.com/dl/esptool-4dab24e-windows.zip",
|
||||
"archiveFileName": "esptool-4dab24e-windows.zip",
|
||||
"checksum": "SHA-256:604014edbd79616470ecda20d623bac3a8d916b1147d37f7a66a83959eff066c",
|
||||
"size": "3462819"
|
||||
},
|
||||
{
|
||||
"host": "x86_64-apple-darwin",
|
||||
"url": "https://dl.espressif.com/dl/esptool-a420774-macos.tar.gz",
|
||||
"archiveFileName": "esptool-a420774-macos.tar.gz",
|
||||
"checksum": "SHA-256:1a6237b695fe299357bfd78a9727564464a00e020bc7c7a4cf6fad02250eb2a2",
|
||||
"size": "3808980"
|
||||
"url": "https://dl.espressif.com/dl/esptool-4dab24e-macos.tar.gz",
|
||||
"archiveFileName": "esptool-4dab24e-macos.tar.gz",
|
||||
"checksum": "SHA-256:92fe2f0505ed93051681bd4d5d766664eacfa32745976dda695c728b529dcc8f",
|
||||
"size": "3869525"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ compiler.S.flags=-c -g3 -x assembler-with-cpp -MMD -mlongcalls
|
||||
|
||||
compiler.c.elf.cmd=xtensa-esp32-elf-gcc
|
||||
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
|
||||
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
|
||||
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 -lespnow -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
|
||||
|
||||
compiler.as.cmd=xtensa-esp32-elf-as
|
||||
|
||||
|
Binary file not shown.
@ -51,9 +51,17 @@ class PartitionTable(list):
|
||||
@classmethod
|
||||
def from_csv(cls, csv_contents):
|
||||
res = PartitionTable()
|
||||
lines = csv_contents.split("\n")
|
||||
lines = csv_contents.splitlines()
|
||||
|
||||
def expand_vars(f):
|
||||
f = os.path.expandvars(f)
|
||||
m = re.match(r'(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)', f)
|
||||
if m:
|
||||
raise InputError("unknown variable '%s'" % m.group(1))
|
||||
return f
|
||||
|
||||
for line_no in range(len(lines)):
|
||||
line = lines[line_no].strip()
|
||||
line = expand_vars(lines[line_no]).strip()
|
||||
if line.startswith("#") or len(line) == 0:
|
||||
continue
|
||||
try:
|
||||
@ -181,13 +189,7 @@ class PartitionDefinition(object):
|
||||
def from_csv(cls, line):
|
||||
""" Parse a line from the CSV """
|
||||
line_w_defaults = line + ",,,," # lazy way to support default fields
|
||||
def expand_vars(f):
|
||||
f = os.path.expandvars(f)
|
||||
m = re.match(r'(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)', f)
|
||||
if m:
|
||||
raise InputError("unknown variable '%s'" % m.group(1))
|
||||
return f
|
||||
fields = [ expand_vars(f.strip()) for f in line_w_defaults.split(",") ]
|
||||
fields = [ f.strip() for f in line_w_defaults.split(",") ]
|
||||
|
||||
res = PartitionDefinition()
|
||||
res.name = fields[0]
|
||||
|
@ -94,7 +94,7 @@ env.Prepend(
|
||||
join(FRAMEWORK_DIR, "tools", "sdk", "ld")
|
||||
],
|
||||
LIBS=[
|
||||
"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"
|
||||
"gcc", "stdc++", "app_trace", "app_update", "bootloader_support", "bt", "btdm_app", "c", "c_nano", "coap", "coexist", "console", "core", "cxx", "driver", "esp32", "esp_adc_cal", "espnow", "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"
|
||||
],
|
||||
|
||||
UPLOADERFLAGS=[
|
||||
|
Binary file not shown.
Binary file not shown.
@ -665,6 +665,12 @@
|
||||
#define L2CAP_CLIENT_INCLUDED FALSE
|
||||
#endif
|
||||
|
||||
/* The maximum number of simultaneous applications that can register with LE L2CAP. */
|
||||
#ifndef BLE_MAX_L2CAP_CLIENTS
|
||||
#define BLE_MAX_L2CAP_CLIENTS 15
|
||||
#endif
|
||||
|
||||
|
||||
/* The maximum number of simultaneous links that L2CAP can support. Up to 7*/
|
||||
#ifndef MAX_ACL_CONNECTIONS
|
||||
#define MAX_L2CAP_LINKS 5
|
||||
|
@ -406,6 +406,12 @@ typedef tBTM_SET_PKT_DATA_LENGTH_CBACK tBTA_SET_PKT_DATA_LENGTH_CBACK;
|
||||
|
||||
typedef tBTM_SET_LOCAL_PRIVACY_CBACK tBTA_SET_LOCAL_PRIVACY_CBACK;
|
||||
|
||||
typedef tBTM_CMPL_CB tBTA_CMPL_CB;
|
||||
|
||||
typedef tBTM_TX_POWER_RESULTS tBTA_TX_POWER_RESULTS;
|
||||
|
||||
typedef tBTM_RSSI_RESULTS tBTA_RSSI_RESULTS;
|
||||
|
||||
/* advertising channel map */
|
||||
#define BTA_BLE_ADV_CHNL_37 BTM_BLE_ADV_CHNL_37
|
||||
#define BTA_BLE_ADV_CHNL_38 BTM_BLE_ADV_CHNL_38
|
||||
@ -1404,6 +1410,12 @@ extern void BTA_DisableTestMode(void);
|
||||
*******************************************************************************/
|
||||
extern void BTA_DmSetDeviceName(char *p_name);
|
||||
|
||||
extern void BTA_DmUpdateWhiteList(BOOLEAN add_remove, BD_ADDR remote_addr);
|
||||
|
||||
extern void BTA_DmBleReadAdvTxPower(tBTA_CMPL_CB *cmpl_cb);
|
||||
|
||||
extern void BTA_DmBleReadRSSI(BD_ADDR remote_addr, tBTA_CMPL_CB *cmpl_cb);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_DmSetVisibility
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
#include "bta_api.h"
|
||||
#include "gatt_api.h"
|
||||
#include "list.h"
|
||||
|
||||
#ifndef BTA_GATT_INCLUDED
|
||||
#warning BTA_GATT_INCLUDED not defined
|
||||
@ -43,6 +44,34 @@
|
||||
#define BTA_GATT_DEBUG FALSE
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
BTGATT_DB_PRIMARY_SERVICE,
|
||||
BTGATT_DB_SECONDARY_SERVICE,
|
||||
BTGATT_DB_CHARACTERISTIC,
|
||||
BTGATT_DB_DESCRIPTOR,
|
||||
BTGATT_DB_INCLUDED_SERVICE,
|
||||
}bt_gatt_db_attribute_type_t;
|
||||
|
||||
typedef enum {
|
||||
GATT_OP_GET_SVC_BY_UUID,
|
||||
GATT_OP_GET_ALL_CHAR,
|
||||
GATT_OP_GET_ALL_DESCRI,
|
||||
GATT_OP_GET_CHAR_BY_UUID,
|
||||
GATT_OP_GET_DESCRI_BY_UUID,
|
||||
GATT_OP_GET_DESCRI_BY_HANDLE,
|
||||
GATT_OP_GET_INCLUDE_SVC,
|
||||
}bt_gatt_get_db_op_t;
|
||||
|
||||
typedef struct {
|
||||
bt_gatt_db_attribute_type_t type;
|
||||
UINT16 attribute_handle;
|
||||
UINT16 start_handle;
|
||||
UINT16 end_handle;
|
||||
UINT16 id;
|
||||
UINT8 properties;
|
||||
bt_uuid_t uuid;
|
||||
}btgatt_db_element_t;
|
||||
|
||||
/*****************************************************************************
|
||||
** Constants and data types
|
||||
*****************************************************************************/
|
||||
@ -104,7 +133,7 @@ typedef struct {
|
||||
#define BTA_GATT_APP_RSP GATT_APP_RSP /* 0xE1 */
|
||||
//Error caused by customer application or stack bug
|
||||
#define BTA_GATT_UNKNOWN_ERROR GATT_UNKNOWN_ERROR /* 0XEF */
|
||||
|
||||
/* 0xE0 ~ 0xFC reserved for future use */
|
||||
#define BTA_GATT_CCC_CFG_ERR GATT_CCC_CFG_ERR /* 0xFD Client Characteristic Configuration Descriptor Improperly Configured */
|
||||
#define BTA_GATT_PRC_IN_PROGRESS GATT_PRC_IN_PROGRESS /* 0xFE Procedure Already in progress */
|
||||
#define BTA_GATT_OUT_OF_RANGE GATT_OUT_OF_RANGE /* 0xFFAttribute value out of range */
|
||||
@ -213,41 +242,13 @@ typedef struct {
|
||||
BOOLEAN is_primary;
|
||||
} tBTA_GATT_SRVC_ID;
|
||||
|
||||
typedef struct {
|
||||
tBTA_GATT_SRVC_ID srvc_id;
|
||||
tBTA_GATT_ID char_id;
|
||||
} tBTA_GATTC_CHAR_ID;
|
||||
|
||||
typedef struct {
|
||||
tBTA_GATTC_CHAR_ID char_id;
|
||||
tBTA_GATT_ID descr_id;
|
||||
} tBTA_GATTC_CHAR_DESCR_ID;
|
||||
|
||||
typedef struct {
|
||||
tBTA_GATT_SRVC_ID srvc_id;
|
||||
tBTA_GATT_SRVC_ID incl_svc_id;
|
||||
} tBTA_GATTC_INCL_SVC_ID;
|
||||
|
||||
#define BTA_GATT_TYPE_CHAR 0
|
||||
#define BTA_GATT_TYPE_CHAR_DESCR 1
|
||||
typedef UINT8 tBTA_GATT_ID_TYPE;
|
||||
|
||||
typedef struct {
|
||||
tBTA_GATT_ID_TYPE id_type;
|
||||
union {
|
||||
tBTA_GATTC_CHAR_ID char_id;
|
||||
tBTA_GATTC_CHAR_DESCR_ID char_descr_id;
|
||||
|
||||
} id_value;
|
||||
} tBTA_GATTC_ATTR_ID;
|
||||
|
||||
#define BTA_GATTC_MULTI_MAX GATT_MAX_READ_MULTI_HANDLES
|
||||
|
||||
typedef struct {
|
||||
UINT8 num_attr;
|
||||
tBTA_GATTC_ATTR_ID id_list[BTA_GATTC_MULTI_MAX];
|
||||
|
||||
} tBTA_GATTC_MULTI;
|
||||
UINT16 handles[BTA_GATTC_MULTI_MAX];
|
||||
}tBTA_GATTC_MULTI;
|
||||
|
||||
/* relate to ESP_GATT_xxx in esp_gatt_def.h */
|
||||
#define BTA_GATT_AUTH_REQ_NONE GATT_AUTH_REQ_NONE
|
||||
@ -275,44 +276,28 @@ typedef struct {
|
||||
UINT8 id;
|
||||
UINT8 prop; /* used when attribute type is characteristic */
|
||||
BOOLEAN is_primary; /* used when attribute type is service */
|
||||
} tBTA_GATTC_NV_ATTR;
|
||||
UINT16 incl_srvc_handle; /* used when attribute type is included service */
|
||||
}tBTA_GATTC_NV_ATTR;
|
||||
|
||||
/* callback data structure */
|
||||
typedef struct {
|
||||
tBTA_GATT_STATUS status;
|
||||
tBTA_GATTC_IF client_if;
|
||||
// btla-specific ++
|
||||
tBT_UUID app_uuid;
|
||||
// btla-specific --
|
||||
} tBTA_GATTC_REG;
|
||||
|
||||
typedef struct {
|
||||
UINT8 num_pres_fmt; /* number of presentation format aggregated*/
|
||||
tBTA_GATTC_CHAR_DESCR_ID pre_format[BTA_GATTC_MULTI_MAX];
|
||||
} tBTA_GATT_CHAR_AGGRE_VALUE;
|
||||
|
||||
typedef union {
|
||||
tBTA_GATT_CHAR_AGGRE_VALUE aggre_value;
|
||||
tBTA_GATT_UNFMT unformat;
|
||||
|
||||
} tBTA_GATT_READ_VAL;
|
||||
}tBTA_GATTC_REG;
|
||||
|
||||
typedef struct {
|
||||
UINT16 conn_id;
|
||||
tBTA_GATT_STATUS status;
|
||||
tBTA_GATT_SRVC_ID srvc_id;
|
||||
tBTA_GATT_ID char_id;
|
||||
tBTA_GATT_ID descr_type;
|
||||
tBTA_GATT_READ_VAL *p_value;
|
||||
} tBTA_GATTC_READ;
|
||||
UINT16 handle;
|
||||
tBTA_GATT_UNFMT *p_value;
|
||||
}tBTA_GATTC_READ;
|
||||
|
||||
typedef struct {
|
||||
UINT16 conn_id;
|
||||
tBTA_GATT_STATUS status;
|
||||
tBTA_GATT_SRVC_ID srvc_id;
|
||||
tBTA_GATT_ID char_id;
|
||||
tBTA_GATT_ID descr_type;
|
||||
} tBTA_GATTC_WRITE;
|
||||
UINT16 handle;
|
||||
}tBTA_GATTC_WRITE;
|
||||
|
||||
typedef struct {
|
||||
UINT16 conn_id;
|
||||
@ -326,8 +311,10 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
UINT16 conn_id;
|
||||
tBTA_GATT_SRVC_ID service_uuid;
|
||||
} tBTA_GATTC_SRVC_RES;
|
||||
UINT16 start_handle;
|
||||
UINT16 end_handle;
|
||||
tBTA_GATT_ID service_uuid;
|
||||
}tBTA_GATTC_SRVC_RES;
|
||||
|
||||
typedef struct {
|
||||
UINT16 conn_id;
|
||||
@ -355,8 +342,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
UINT16 conn_id;
|
||||
BD_ADDR bda;
|
||||
tBTA_GATTC_CHAR_ID char_id;
|
||||
tBTA_GATT_ID descr_type;
|
||||
UINT16 handle;
|
||||
UINT16 len;
|
||||
UINT8 value[BTA_GATT_MAX_ATTR_LEN];
|
||||
BOOLEAN is_notify;
|
||||
@ -367,14 +353,12 @@ typedef struct {
|
||||
BOOLEAN congested; /* congestion indicator */
|
||||
} tBTA_GATTC_CONGEST;
|
||||
|
||||
// btla-specific ++
|
||||
typedef struct {
|
||||
tBTA_GATT_STATUS status;
|
||||
tBTA_GATTC_IF client_if;
|
||||
UINT16 conn_id;
|
||||
BD_ADDR remote_bda;
|
||||
} tBTA_GATTC_OPEN_CLOSE;
|
||||
// btla-specific --
|
||||
}tBTA_GATTC_OPEN_CLOSE;
|
||||
|
||||
typedef struct {
|
||||
tBTA_GATTC_IF client_if;
|
||||
@ -395,6 +379,8 @@ typedef struct {
|
||||
BD_ADDR remote_bda;
|
||||
} tBTA_GATTC_DISCONNECT;
|
||||
|
||||
|
||||
|
||||
typedef union {
|
||||
tBTA_GATT_STATUS status;
|
||||
|
||||
@ -541,33 +527,26 @@ typedef struct {
|
||||
typedef struct {
|
||||
tBTA_GATTS_IF server_if;
|
||||
tBTA_GATT_STATUS status;
|
||||
// btla-specific ++
|
||||
tBT_UUID uuid;
|
||||
// btla-specific --
|
||||
} tBTA_GATTS_REG_OPER;
|
||||
}tBTA_GATTS_REG_OPER;
|
||||
|
||||
|
||||
typedef struct {
|
||||
tBTA_GATTS_IF server_if;
|
||||
UINT16 service_id;
|
||||
// btla-specific ++
|
||||
UINT16 svc_instance;
|
||||
BOOLEAN is_primary;
|
||||
tBTA_GATT_STATUS status;
|
||||
tBT_UUID uuid;
|
||||
// btla-specific --
|
||||
} tBTA_GATTS_CREATE;
|
||||
}tBTA_GATTS_CREATE;
|
||||
|
||||
typedef struct {
|
||||
tBTA_GATTS_IF server_if;
|
||||
UINT16 service_id;
|
||||
UINT16 attr_id;
|
||||
tBTA_GATT_STATUS status;
|
||||
// btla-specific ++
|
||||
tBT_UUID char_uuid;
|
||||
// btla-specific --
|
||||
} tBTA_GATTS_ADD_RESULT;
|
||||
|
||||
}tBTA_GATTS_ADD_RESULT;
|
||||
typedef struct{
|
||||
tBTA_GATTS_IF server_if;
|
||||
UINT16 service_id;
|
||||
@ -614,7 +593,6 @@ typedef struct {
|
||||
tBTA_GATT_STATUS status;
|
||||
tBTA_GATTS_IF server_if;
|
||||
} tBTA_GATTS_CANCEL_OPEN;
|
||||
|
||||
/* GATTS callback data */
|
||||
typedef union {
|
||||
tBTA_GATTS_REG_OPER reg_oper;
|
||||
@ -648,6 +626,41 @@ typedef void (tBTA_GATTS_ENB_CBACK)(tBTA_GATT_STATUS status);
|
||||
|
||||
/* Server callback function */
|
||||
typedef void (tBTA_GATTS_CBACK)(tBTA_GATTS_EVT event, tBTA_GATTS *p_data);
|
||||
typedef struct
|
||||
{
|
||||
tBT_UUID uuid;
|
||||
BOOLEAN is_primary;
|
||||
UINT16 handle;
|
||||
UINT16 s_handle;
|
||||
UINT16 e_handle;
|
||||
list_t *characteristics; /* list of tBTA_GATTC_CHARACTERISTIC */
|
||||
list_t *included_svc; /* list of tBTA_GATTC_INCLUDED_SVC */
|
||||
} __attribute__((packed)) tBTA_GATTC_SERVICE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
tBT_UUID uuid;
|
||||
UINT16 handle;
|
||||
tBTA_GATT_CHAR_PROP properties;
|
||||
tBTA_GATTC_SERVICE *service; /* owning service*/
|
||||
list_t *descriptors; /* list of tBTA_GATTC_DESCRIPTOR */
|
||||
} __attribute__((packed)) tBTA_GATTC_CHARACTERISTIC;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
tBT_UUID uuid;
|
||||
UINT16 handle;
|
||||
tBTA_GATTC_CHARACTERISTIC *characteristic; /* owning characteristic */
|
||||
} __attribute__((packed)) tBTA_GATTC_DESCRIPTOR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
tBT_UUID uuid;
|
||||
UINT16 handle;
|
||||
UINT16 incl_srvc_s_handle;
|
||||
tBTA_GATTC_SERVICE *owning_service; /* owning service*/
|
||||
tBTA_GATTC_SERVICE *included_service;
|
||||
} __attribute__((packed)) tBTA_GATTC_INCLUDED_SVC;
|
||||
|
||||
/*****************************************************************************
|
||||
** External Function Declarations
|
||||
@ -770,175 +783,114 @@ extern void BTA_GATTC_ServiceSearchRequest(UINT16 conn_id, tBT_UUID *p_srvc_uuid
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_GATTC_GetFirstChar
|
||||
** Function BTA_GATTC_GetServices
|
||||
**
|
||||
** Description This function is called to find the first charatceristic of the
|
||||
** service on the given server.
|
||||
** Description This function is called to find the services on the given server.
|
||||
**
|
||||
** Parameters conn_id: connection ID which identify the server.
|
||||
** p_srvc_id: the service ID of which the characteristic is belonged to.
|
||||
** p_char_uuid_cond: Characteristic UUID, if NULL find the first available
|
||||
** characteristic.
|
||||
** p_char_result: output parameter which will store the GATT
|
||||
** characteristic ID.
|
||||
** p_property: output parameter to carry the characteristic property.
|
||||
**
|
||||
** Returns returns status.
|
||||
** Returns returns list_t of tBTA_GATTC_SERVICE or NULL.
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tBTA_GATT_STATUS BTA_GATTC_GetFirstChar (UINT16 conn_id,
|
||||
tBTA_GATT_SRVC_ID *p_srvc_id,
|
||||
tBT_UUID *p_char_uuid_cond,
|
||||
tBTA_GATTC_CHAR_ID *p_char_result,
|
||||
tBTA_GATT_CHAR_PROP *p_property);
|
||||
extern const list_t* BTA_GATTC_GetServices(UINT16 conn_id);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_GATTC_GetNextChar
|
||||
** Function BTA_GATTC_GetCharacteristic
|
||||
**
|
||||
** Description This function is called to find the next charatceristic of the
|
||||
** service on the given server.
|
||||
** Description This function is called to find the characteristic on the given server.
|
||||
**
|
||||
** Parameters conn_id: connection ID which identify the server.
|
||||
** p_start_char_id: start the characteristic search from the next record
|
||||
** after the one identified by char_id.
|
||||
** p_char_uuid_cond: Characteristic UUID, if NULL find the first available
|
||||
** characteristic.
|
||||
** p_char_result: output parameter which will store the GATT
|
||||
** characteristic ID.
|
||||
** p_property: output parameter, characteristic property.
|
||||
** handle: characteristic handle
|
||||
**
|
||||
** Returns returns status.
|
||||
** Returns returns pointer to tBTA_GATTC_CHARACTERISTIC or NULL.
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tBTA_GATT_STATUS BTA_GATTC_GetNextChar (UINT16 conn_id,
|
||||
tBTA_GATTC_CHAR_ID *p_start_char_id,
|
||||
tBT_UUID *p_char_uuid_cond,
|
||||
tBTA_GATTC_CHAR_ID *p_char_result,
|
||||
tBTA_GATT_CHAR_PROP *p_property);
|
||||
extern const tBTA_GATTC_CHARACTERISTIC* BTA_GATTC_GetCharacteristic(UINT16 conn_id, UINT16 handle);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_GATTC_GetFirstCharDescr
|
||||
** Function BTA_GATTC_GetDescriptor
|
||||
**
|
||||
** Description This function is called to find the first charatceristic descriptor of the
|
||||
** charatceristic on the given server.
|
||||
** Description This function is called to find the characteristic on the given server.
|
||||
**
|
||||
** Parameters conn_id: connection ID which identify the server.
|
||||
** p_char_id: the characteristic ID of which the descriptor is belonged to.
|
||||
** p_descr_uuid_cond: Characteristic Descr UUID, if NULL find the first available
|
||||
** characteristic.
|
||||
** p_descr_result: output parameter which will store the GATT
|
||||
** characteristic descriptor ID.
|
||||
** handle: descriptor handle
|
||||
**
|
||||
** Returns returns status.
|
||||
** Returns returns pointer to tBTA_GATTC_DESCRIPTOR or NULL.
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tBTA_GATT_STATUS BTA_GATTC_GetFirstCharDescr (UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id,
|
||||
tBT_UUID *p_descr_uuid_cond,
|
||||
tBTA_GATTC_CHAR_DESCR_ID *p_descr_result);
|
||||
extern const tBTA_GATTC_DESCRIPTOR* BTA_GATTC_GetDescriptor(UINT16 conn_id, UINT16 handle);
|
||||
|
||||
extern void BTA_GATTC_GetServiceWithUUID(UINT16 conn_id, tBT_UUID *svc_uuid,
|
||||
btgatt_db_element_t **db, int *count);
|
||||
|
||||
extern void BTA_GATTC_GetAllChar(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle,
|
||||
btgatt_db_element_t **db, int *count);
|
||||
|
||||
extern void BTA_GATTC_GetAllDescriptor(UINT16 conn_id, UINT16 char_handle,
|
||||
btgatt_db_element_t **db, int *count);
|
||||
|
||||
extern void BTA_GATTC_GetCharByUUID(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle, tBT_UUID char_uuid,
|
||||
btgatt_db_element_t **db, int *count);
|
||||
|
||||
extern void BTA_GATTC_GetDescrByUUID(UINT16 conn_id, uint16_t start_handle, uint16_t end_handle,
|
||||
tBT_UUID char_uuid, tBT_UUID descr_uuid,
|
||||
btgatt_db_element_t **db, int *count);
|
||||
|
||||
extern void BTA_GATTC_GetDescrByCharHandle(UINT16 conn_id, UINT16 char_handle, tBT_UUID descr_uuid,
|
||||
btgatt_db_element_t **db, int *count);
|
||||
|
||||
extern void BTA_GATTC_GetIncludeService(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle,
|
||||
tBT_UUID *incl_uuid, btgatt_db_element_t **db, int *count);
|
||||
|
||||
extern void BTA_GATTC_GetDBSize(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle, int *count);
|
||||
|
||||
extern void BTA_GATTC_GetDBSizeByType(UINT16 conn_id, bt_gatt_db_attribute_type_t type,
|
||||
UINT16 start_handle, UINT16 end_handle, UINT16 char_handle, int *count);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_GATTC_GetNextCharDescr
|
||||
** Function BTA_GATTC_GetGattDb
|
||||
**
|
||||
** Description This function is called to find the next charatceristic of the
|
||||
** service on the given server.
|
||||
** Description This function is called to get gatt db.
|
||||
**
|
||||
** Parameters conn_id: connection ID which identify the server.
|
||||
** p_start_descr_id: start the characteristic search from the next record
|
||||
** after the one identified by p_start_descr_id.
|
||||
** p_descr_uuid_cond: Characteristic descriptor UUID, if NULL find
|
||||
** the first available characteristic descriptor.
|
||||
** p_descr_result: output parameter which will store the GATT
|
||||
** characteristic descriptor ID.
|
||||
**
|
||||
** Returns returns status.
|
||||
** db: output parameter which will contain gatt db copy.
|
||||
** Caller is responsible for freeing it.
|
||||
** count: number of elements in db.
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tBTA_GATT_STATUS BTA_GATTC_GetNextCharDescr (UINT16 conn_id,
|
||||
tBTA_GATTC_CHAR_DESCR_ID *p_start_descr_id,
|
||||
tBT_UUID *p_descr_uuid_cond,
|
||||
tBTA_GATTC_CHAR_DESCR_ID *p_descr_result);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_GATTC_GetFirstIncludedService
|
||||
**
|
||||
** Description This function is called to find the first included service of the
|
||||
** service on the given server.
|
||||
**
|
||||
** Parameters conn_id: connection ID which identify the server.
|
||||
** p_srvc_id: the service ID of which the included service is belonged to.
|
||||
** p_uuid_cond: include service UUID, if NULL find the first available
|
||||
** included service.
|
||||
** p_result: output parameter which will store the GATT ID
|
||||
** of the included service found.
|
||||
**
|
||||
** Returns returns status.
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tBTA_GATT_STATUS BTA_GATTC_GetFirstIncludedService(UINT16 conn_id,
|
||||
tBTA_GATT_SRVC_ID *p_srvc_id,
|
||||
tBT_UUID *p_uuid_cond,
|
||||
tBTA_GATTC_INCL_SVC_ID *p_result);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_GATTC_GetNextIncludedService
|
||||
**
|
||||
** Description This function is called to find the next included service of the
|
||||
** service on the given server.
|
||||
**
|
||||
** Parameters conn_id: connection ID which identify the server.
|
||||
** p_start_id: start the search from the next record
|
||||
** after the one identified by p_start_id.
|
||||
** p_uuid_cond: Included service UUID, if NULL find the first available
|
||||
** included service.
|
||||
** p_result: output parameter which will store the GATT ID
|
||||
** of the included service found.
|
||||
**
|
||||
** Returns returns status.
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tBTA_GATT_STATUS BTA_GATTC_GetNextIncludedService(UINT16 conn_id,
|
||||
tBTA_GATTC_INCL_SVC_ID *p_start_id,
|
||||
tBT_UUID *p_uuid_cond,
|
||||
tBTA_GATTC_INCL_SVC_ID *p_result);
|
||||
extern void BTA_GATTC_GetGattDb(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle,
|
||||
btgatt_db_element_t **db, int *count);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_GATTC_ReadCharacteristic
|
||||
**
|
||||
** Description This function is called to read a service's characteristics of
|
||||
** the given characteritisc ID.
|
||||
** Description This function is called to read a characteristics value
|
||||
**
|
||||
** Parameters conn_id - connection ID.
|
||||
** p_char_id - characteritic ID to read.
|
||||
** Parameters conn_id - connectino ID.
|
||||
** handle - characteritic handle to read.
|
||||
**
|
||||
** Returns None
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void BTA_GATTC_ReadCharacteristic (UINT16 conn_id,
|
||||
tBTA_GATTC_CHAR_ID *p_char_id,
|
||||
tBTA_GATT_AUTH_REQ auth_req);
|
||||
void BTA_GATTC_ReadCharacteristic(UINT16 conn_id, UINT16 handle, tBTA_GATT_AUTH_REQ auth_req);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTA_GATTC_ReadCharDescr
|
||||
**
|
||||
** Description This function is called to read a characteristics descriptor.
|
||||
** Description This function is called to read a descriptor value.
|
||||
**
|
||||
** Parameters conn_id - connection ID.
|
||||
** p_char_descr_id - characteritic descriptor ID to read.
|
||||
** handle - descriptor handle to read.
|
||||
**
|
||||
** Returns None
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void BTA_GATTC_ReadCharDescr (UINT16 conn_id,
|
||||
tBTA_GATTC_CHAR_DESCR_ID *p_char_descr_id,
|
||||
tBTA_GATT_AUTH_REQ auth_req);
|
||||
void BTA_GATTC_ReadCharDescr (UINT16 conn_id, UINT16 handle, tBTA_GATT_AUTH_REQ auth_req);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@ -947,7 +899,7 @@ extern void BTA_GATTC_ReadCharDescr (UINT16 conn_id,
|
||||
** Description This function is called to write characteristic value.
|
||||
**
|
||||
** Parameters conn_id - connection ID.
|
||||
** p_char_id - characteristic ID to write.
|
||||
** handle - characteristic handle to write.
|
||||
** write_type - type of write.
|
||||
** len: length of the data to be written.
|
||||
** p_value - the value to be written.
|
||||
@ -955,8 +907,8 @@ extern void BTA_GATTC_ReadCharDescr (UINT16 conn_id,
|
||||
** Returns None
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void BTA_GATTC_WriteCharValue (UINT16 conn_id,
|
||||
tBTA_GATTC_CHAR_ID *p_char_id,
|
||||
void BTA_GATTC_WriteCharValue ( UINT16 conn_id,
|
||||
UINT16 handle,
|
||||
tBTA_GATTC_WRITE_TYPE write_type,
|
||||
UINT16 len,
|
||||
UINT8 *p_value,
|
||||
@ -966,18 +918,18 @@ extern void BTA_GATTC_WriteCharValue (UINT16 conn_id,
|
||||
**
|
||||
** Function BTA_GATTC_WriteCharDescr
|
||||
**
|
||||
** Description This function is called to write characteristic descriptor value.
|
||||
** Description This function is called to write descriptor value.
|
||||
**
|
||||
** Parameters conn_id - connection ID
|
||||
** p_char_descr_id - characteristic descriptor ID to write.
|
||||
** handle - descriptor handle to write.
|
||||
** write_type - type of write.
|
||||
** p_value - the value to be written.
|
||||
**
|
||||
** Returns None
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void BTA_GATTC_WriteCharDescr (UINT16 conn_id,
|
||||
tBTA_GATTC_CHAR_DESCR_ID *p_char_descr_id,
|
||||
void BTA_GATTC_WriteCharDescr (UINT16 conn_id,
|
||||
UINT16 handle,
|
||||
tBTA_GATTC_WRITE_TYPE write_type,
|
||||
tBTA_GATT_UNFMT *p_data,
|
||||
tBTA_GATT_AUTH_REQ auth_req);
|
||||
@ -989,12 +941,12 @@ extern void BTA_GATTC_WriteCharDescr (UINT16 conn_id,
|
||||
** Description This function is called to send handle value confirmation.
|
||||
**
|
||||
** Parameters conn_id - connection ID.
|
||||
** p_char_id - characteristic ID to confrim.
|
||||
** handle - characteristic handle to confirm.
|
||||
**
|
||||
** Returns None
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void BTA_GATTC_SendIndConfirm (UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char_id);
|
||||
extern void BTA_GATTC_SendIndConfirm (UINT16 conn_id, UINT16 handle);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@ -1004,15 +956,14 @@ extern void BTA_GATTC_SendIndConfirm (UINT16 conn_id, tBTA_GATTC_CHAR_ID *p_char
|
||||
**
|
||||
** Parameters client_if - client interface.
|
||||
** remote_bda - target GATT server.
|
||||
** p_char_id - pointer to GATT characteristic ID.
|
||||
** handle - GATT characteristic handle.
|
||||
**
|
||||
** Returns OK if registration succeed, otherwise failed.
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tBTA_GATT_STATUS BTA_GATTC_RegisterForNotifications (tBTA_GATTC_IF client_if,
|
||||
BD_ADDR remote_bda,
|
||||
tBTA_GATTC_CHAR_ID *p_char_id);
|
||||
|
||||
UINT16 handle);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@ -1022,14 +973,14 @@ extern tBTA_GATT_STATUS BTA_GATTC_RegisterForNotifications (tBTA_GATTC_IF c
|
||||
**
|
||||
** Parameters client_if - client interface.
|
||||
** remote_bda - target GATT server.
|
||||
** p_char_id - pointer to a GATT characteristic ID.
|
||||
** handle - GATT characteristic handle.
|
||||
**
|
||||
** Returns OK if deregistration succeed, otherwise failed.
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF client_if,
|
||||
BD_ADDR remote_bda,
|
||||
tBTA_GATTC_CHAR_ID *p_char_id);
|
||||
UINT16 handle);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
@ -1038,16 +989,16 @@ extern tBTA_GATT_STATUS BTA_GATTC_DeregisterForNotifications (tBTA_GATTC_IF
|
||||
** Description This function is called to prepare write a characteristic value.
|
||||
**
|
||||
** Parameters conn_id - connection ID.
|
||||
** p_char_id - GATT characteritic ID of the service.
|
||||
** handle - GATT characteritic handle.
|
||||
** offset - offset of the write value.
|
||||
** len: length of the data to be written.
|
||||
** len - length of the data to be written.
|
||||
** p_value - the value to be written.
|
||||
**
|
||||
** Returns None
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void BTA_GATTC_PrepareWrite (UINT16 conn_id,
|
||||
tBTA_GATTC_CHAR_ID *p_char_id,
|
||||
UINT16 handle,
|
||||
UINT16 offset,
|
||||
UINT16 len,
|
||||
UINT8 *p_value,
|
||||
@ -1069,7 +1020,7 @@ extern void BTA_GATTC_PrepareWrite (UINT16 conn_id,
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void BTA_GATTC_PrepareWriteCharDescr (UINT16 conn_id,
|
||||
tBTA_GATTC_CHAR_DESCR_ID *p_char_descr_id,
|
||||
UINT16 handle,
|
||||
UINT16 offset,
|
||||
tBTA_GATT_UNFMT *p_data,
|
||||
tBTA_GATT_AUTH_REQ auth_req);
|
||||
|
@ -58,12 +58,6 @@ enum {
|
||||
BTA_GATTC_OP_CMPL_EVT,
|
||||
BTA_GATTC_INT_DISCONN_EVT,
|
||||
|
||||
/* for cache loading/saving */
|
||||
BTA_GATTC_START_CACHE_EVT,
|
||||
BTA_GATTC_CI_CACHE_OPEN_EVT,
|
||||
BTA_GATTC_CI_CACHE_LOAD_EVT,
|
||||
BTA_GATTC_CI_CACHE_SAVE_EVT,
|
||||
|
||||
BTA_GATTC_INT_START_IF_EVT,
|
||||
BTA_GATTC_API_REG_EVT,
|
||||
BTA_GATTC_API_DEREG_EVT,
|
||||
@ -74,6 +68,8 @@ enum {
|
||||
};
|
||||
typedef UINT16 tBTA_GATTC_INT_EVT;
|
||||
|
||||
#define BTA_GATTC_SERVICE_CHANGED_LEN 4
|
||||
|
||||
/* max client application GATTC can support */
|
||||
#ifndef BTA_GATTC_CL_MAX
|
||||
#define BTA_GATTC_CL_MAX 3 // 32
|
||||
@ -95,7 +91,7 @@ typedef UINT16 tBTA_GATTC_INT_EVT;
|
||||
#endif
|
||||
|
||||
#define BTA_GATTC_WRITE_PREPARE GATT_WRITE_PREPARE
|
||||
|
||||
#define BTA_GATTC_INVALID_HANDLE 0
|
||||
|
||||
/* internal strucutre for GATTC register API */
|
||||
typedef struct {
|
||||
@ -125,17 +121,15 @@ typedef tBTA_GATTC_API_OPEN tBTA_GATTC_API_CANCEL_OPEN;
|
||||
typedef struct {
|
||||
BT_HDR hdr;
|
||||
tBTA_GATT_AUTH_REQ auth_req;
|
||||
tBTA_GATT_SRVC_ID srvc_id;
|
||||
tBTA_GATT_ID char_id;
|
||||
tBTA_GATT_ID *p_descr_type;
|
||||
UINT16 handle;
|
||||
tBTA_GATTC_EVT cmpl_evt;
|
||||
} tBTA_GATTC_API_READ;
|
||||
|
||||
typedef struct {
|
||||
BT_HDR hdr;
|
||||
tBTA_GATT_AUTH_REQ auth_req;
|
||||
tBTA_GATT_SRVC_ID srvc_id;
|
||||
tBTA_GATT_ID char_id;
|
||||
tBTA_GATT_ID *p_descr_type;
|
||||
UINT16 handle;
|
||||
tBTA_GATTC_EVT cmpl_evt;
|
||||
tBTA_GATTC_WRITE_TYPE write_type;
|
||||
UINT16 offset;
|
||||
UINT16 len;
|
||||
@ -149,8 +143,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
BT_HDR hdr;
|
||||
tBTA_GATT_SRVC_ID srvc_id;
|
||||
tBTA_GATT_ID char_id;
|
||||
UINT16 handle;
|
||||
} tBTA_GATTC_API_CONFIRM;
|
||||
|
||||
typedef tGATT_CL_COMPLETE tBTA_GATTC_CMPL;
|
||||
@ -171,8 +164,8 @@ typedef struct {
|
||||
BT_HDR hdr;
|
||||
tBTA_GATT_AUTH_REQ auth_req;
|
||||
UINT8 num_attr;
|
||||
tBTA_GATTC_ATTR_ID *p_id_list;
|
||||
} tBTA_GATTC_API_READ_MULTI;
|
||||
UINT16 handles[GATT_MAX_READ_MULTI_HANDLES];
|
||||
}tBTA_GATTC_API_READ_MULTI;
|
||||
|
||||
typedef struct {
|
||||
BT_HDR hdr;
|
||||
@ -215,9 +208,6 @@ typedef union {
|
||||
tBTA_GATTC_API_READ_MULTI api_read_multi;
|
||||
tBTA_GATTC_API_CFG_MTU api_mtu;
|
||||
tBTA_GATTC_OP_CMPL op_cmpl;
|
||||
tBTA_GATTC_CI_EVT ci_open;
|
||||
tBTA_GATTC_CI_EVT ci_save;
|
||||
tBTA_GATTC_CI_LOAD ci_load;
|
||||
tBTA_GATTC_INT_CONN int_conn;
|
||||
tBTA_GATTC_ENC_CMPL enc_cmpl;
|
||||
|
||||
@ -230,43 +220,13 @@ typedef union {
|
||||
|
||||
|
||||
/* GATT server cache on the client */
|
||||
typedef union {
|
||||
UINT8 uuid128[LEN_UUID_128];
|
||||
UINT16 uuid16;
|
||||
} tBTA_GATTC_UUID;
|
||||
|
||||
typedef struct gattc_attr_cache {
|
||||
tBTA_GATTC_UUID *p_uuid;
|
||||
struct gattc_attr_cache *p_next;
|
||||
UINT16 uuid_len;
|
||||
UINT16 attr_handle;
|
||||
UINT8 inst_id;
|
||||
tBTA_GATT_CHAR_PROP property; /* if characteristic, it is char property;
|
||||
if included service, flag primary,
|
||||
if descriptor, not used */
|
||||
tBTA_GATTC_ATTR_TYPE attr_type;
|
||||
// btla-specific ++
|
||||
} __attribute__((packed)) tBTA_GATTC_CACHE_ATTR;
|
||||
// btla-specific --
|
||||
|
||||
typedef struct gattc_svc_cache {
|
||||
tBTA_GATT_SRVC_ID service_uuid;
|
||||
tBTA_GATTC_CACHE_ATTR *p_attr;
|
||||
tBTA_GATTC_CACHE_ATTR *p_last_attr;
|
||||
UINT16 s_handle;
|
||||
UINT16 e_handle;
|
||||
struct gattc_svc_cache *p_next;
|
||||
tBTA_GATTC_CACHE_ATTR *p_cur_char;
|
||||
// btla-specific ++
|
||||
} __attribute__((packed)) tBTA_GATTC_CACHE;
|
||||
// btla-specific --
|
||||
|
||||
typedef struct {
|
||||
tBT_UUID uuid;
|
||||
UINT16 s_handle;
|
||||
UINT16 e_handle;
|
||||
// this field is set only for characteristic
|
||||
UINT16 char_decl_handle;
|
||||
BOOLEAN is_primary;
|
||||
UINT8 srvc_inst_id;
|
||||
tBTA_GATT_CHAR_PROP property;
|
||||
} tBTA_GATTC_ATTR_REC;
|
||||
|
||||
@ -299,11 +259,7 @@ typedef struct {
|
||||
|
||||
UINT8 state;
|
||||
|
||||
tBTA_GATTC_CACHE *p_srvc_cache;
|
||||
tBTA_GATTC_CACHE *p_cur_srvc;
|
||||
fixed_queue_t *cache_buffer; /* buffer queue used for storing the cache data */
|
||||
UINT8 *p_free; /* starting point to next available byte */
|
||||
UINT16 free_byte; /* number of available bytes in server cache buffer */
|
||||
list_t *p_srvc_cache; /* list of tBTA_GATTC_SERVICE */
|
||||
UINT8 update_count; /* indication received */
|
||||
UINT8 num_clcb; /* number of associated CLCB */
|
||||
|
||||
@ -314,7 +270,7 @@ typedef struct {
|
||||
UINT8 next_avail_idx;
|
||||
UINT8 total_srvc;
|
||||
UINT8 total_char;
|
||||
|
||||
UINT16 total_attr;
|
||||
UINT8 srvc_hdl_chg; /* service handle change indication pending */
|
||||
UINT16 attr_index; /* cahce NV saving/loading attribute index */
|
||||
|
||||
@ -328,8 +284,8 @@ typedef struct {
|
||||
typedef struct {
|
||||
BOOLEAN in_use;
|
||||
BD_ADDR remote_bda;
|
||||
tBTA_GATTC_CHAR_ID char_id;
|
||||
} tBTA_GATTC_NOTIF_REG;
|
||||
UINT16 handle;
|
||||
}tBTA_GATTC_NOTIF_REG;
|
||||
|
||||
typedef struct {
|
||||
tBTA_GATTC_CBACK *p_cback;
|
||||
@ -403,11 +359,7 @@ typedef struct {
|
||||
|
||||
tBTA_GATTC_CLCB clcb[BTA_GATTC_CLCB_MAX];
|
||||
tBTA_GATTC_SERV known_server[BTA_GATTC_KNOWN_SR_MAX];
|
||||
#if (SDP_INCLUDED == TRUE)
|
||||
tSDP_DISCOVERY_DB *p_sdp_db;
|
||||
#endif ///SDP_INCLUDED == TRUE
|
||||
UINT16 sdp_conn_id;
|
||||
} tBTA_GATTC_CB;
|
||||
}tBTA_GATTC_CB;
|
||||
|
||||
typedef enum {
|
||||
SERVICE_CHANGE_CCC_WRITTEN_SUCCESS = 0,
|
||||
@ -474,10 +426,7 @@ extern void bta_gattc_confirm(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
|
||||
extern void bta_gattc_execute(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
|
||||
extern void bta_gattc_read_multi(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
|
||||
extern void bta_gattc_ci_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
|
||||
extern void bta_gattc_ci_load(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
|
||||
extern void bta_gattc_ci_close(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
|
||||
extern void bta_gattc_ci_save(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
|
||||
extern void bta_gattc_cache_open(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
|
||||
extern void bta_gattc_ignore_op_cmpl(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
|
||||
extern void bta_gattc_restart_discover(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_msg);
|
||||
extern void bta_gattc_init_bk_conn(tBTA_GATTC_API_OPEN *p_data, tBTA_GATTC_RCB *p_clreg);
|
||||
@ -509,20 +458,13 @@ extern tBTA_GATTC_CLCB *bta_gattc_find_int_disconn_clcb(tBTA_GATTC_DATA *p_msg);
|
||||
|
||||
extern BOOLEAN bta_gattc_enqueue(tBTA_GATTC_CLCB *p_clcb, tBTA_GATTC_DATA *p_data);
|
||||
|
||||
extern UINT16 bta_gattc_id2handle(tBTA_GATTC_SERV *p_srcb, tBTA_GATT_SRVC_ID *p_service_id, tBTA_GATT_ID *p_char_id, tBTA_GATT_ID *p_descr_uuid);
|
||||
extern BOOLEAN bta_gattc_handle2id(tBTA_GATTC_SERV *p_srcb, UINT16 handle, tBTA_GATT_SRVC_ID *service_id, tBTA_GATT_ID *char_id, tBTA_GATT_ID *p_type);
|
||||
extern BOOLEAN bta_gattc_uuid_compare (tBT_UUID *p_src, tBT_UUID *p_tar, BOOLEAN is_precise);
|
||||
extern void bta_gattc_pack_attr_uuid(tBTA_GATTC_CACHE_ATTR *p_attr, tBT_UUID *p_uuid);
|
||||
extern BOOLEAN bta_gattc_uuid_compare (const tBT_UUID *p_src, const tBT_UUID *p_tar, BOOLEAN is_precise);
|
||||
extern BOOLEAN bta_gattc_check_notif_registry(tBTA_GATTC_RCB *p_clreg, tBTA_GATTC_SERV *p_srcb, tBTA_GATTC_NOTIFY *p_notify);
|
||||
extern tBTA_GATT_STATUS bta_gattc_pack_read_cb_data(tBTA_GATTC_SERV *p_srcb, tBT_UUID *p_descr_uuid, tGATT_VALUE *p_attr, tBTA_GATT_READ_VAL *p_value);
|
||||
extern BOOLEAN bta_gattc_mark_bg_conn (tBTA_GATTC_IF client_if, BD_ADDR_PTR remote_bda, BOOLEAN add, BOOLEAN is_listen);
|
||||
extern BOOLEAN bta_gattc_check_bg_conn (tBTA_GATTC_IF client_if, BD_ADDR remote_bda, UINT8 role);
|
||||
extern UINT8 bta_gattc_num_reg_app(void);
|
||||
extern void bta_gattc_clear_notif_registration(UINT16 conn_id);
|
||||
extern tBTA_GATTC_SERV *bta_gattc_find_srvr_cache(BD_ADDR bda);
|
||||
extern BOOLEAN bta_gattc_charid_compare(tBTA_GATTC_CHAR_ID *p_src, tBTA_GATTC_CHAR_ID *p_tar);
|
||||
extern BOOLEAN bta_gattc_srvcid_compare(tBTA_GATT_SRVC_ID *p_src, tBTA_GATT_SRVC_ID *p_tar);
|
||||
extern void bta_gattc_cpygattid(tBTA_GATT_ID *p_des, tBTA_GATT_ID *p_src);
|
||||
extern void bta_gattc_clear_notif_registration(tBTA_GATTC_SERV *p_srcb, UINT16 conn_id, UINT16 start_handle, UINT16 end_handle);
|
||||
extern tBTA_GATTC_SERV * bta_gattc_find_srvr_cache(BD_ADDR bda);
|
||||
|
||||
/* discovery functions */
|
||||
extern void bta_gattc_disc_res_cback (UINT16 conn_id, tGATT_DISC_TYPE disc_type, tGATT_DISC_RES *p_data);
|
||||
@ -530,17 +472,41 @@ extern void bta_gattc_disc_cmpl_cback (UINT16 conn_id, tGATT_DISC_TYPE disc_type
|
||||
extern tBTA_GATT_STATUS bta_gattc_discover_procedure(UINT16 conn_id, tBTA_GATTC_SERV *p_server_cb, UINT8 disc_type);
|
||||
extern tBTA_GATT_STATUS bta_gattc_discover_pri_service(UINT16 conn_id, tBTA_GATTC_SERV *p_server_cb, UINT8 disc_type);
|
||||
extern void bta_gattc_search_service(tBTA_GATTC_CLCB *p_clcb, tBT_UUID *p_uuid);
|
||||
extern tBTA_GATT_STATUS bta_gattc_query_cache(UINT16 conn_id, UINT8 query_type, tBTA_GATT_SRVC_ID *p_srvc_id,
|
||||
tBTA_GATT_ID *p_start_rec, tBT_UUID *p_uuid_cond,
|
||||
tBTA_GATT_ID *p_output, void *p_param);
|
||||
extern tBTA_GATT_STATUS bta_gattc_init_cache(tBTA_GATTC_SERV *p_srvc_cb);
|
||||
extern void bta_gattc_rebuild_cache(tBTA_GATTC_SERV *p_srcv, UINT16 num_attr, tBTA_GATTC_NV_ATTR *p_attr, UINT16 attr_index);
|
||||
extern BOOLEAN bta_gattc_cache_save(tBTA_GATTC_SERV *p_srvc_cb, UINT16 conn_id);
|
||||
extern const list_t* bta_gattc_get_services(UINT16 conn_id);
|
||||
extern const tBTA_GATTC_SERVICE* bta_gattc_get_service_for_handle(UINT16 conn_id, UINT16 handle);
|
||||
tBTA_GATTC_CHARACTERISTIC* bta_gattc_get_characteristic_srcb(tBTA_GATTC_SERV *p_srcb, UINT16 handle);
|
||||
extern tBTA_GATTC_CHARACTERISTIC* bta_gattc_get_characteristic(UINT16 conn_id, UINT16 handle);
|
||||
extern tBTA_GATTC_DESCRIPTOR* bta_gattc_get_descriptor(UINT16 conn_id, UINT16 handle);
|
||||
extern void bta_gattc_get_db_size_handle(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle, int *count);
|
||||
extern void bta_gattc_get_db_size_with_type_handle(UINT16 conn_id, bt_gatt_db_attribute_type_t type,
|
||||
UINT16 start_handle, UINT16 end_handle, UINT16 char_handle, int *count);
|
||||
extern void bta_gattc_get_service_with_uuid(UINT16 conn_id, tBT_UUID *svc_uuid,
|
||||
btgatt_db_element_t **svc_db,
|
||||
int *count);
|
||||
|
||||
extern void bta_gattc_get_db_with_opration(UINT16 conn_id,
|
||||
bt_gatt_get_db_op_t op,
|
||||
UINT16 char_handle,
|
||||
tBT_UUID *incl_uuid,
|
||||
tBT_UUID *char_uuid,
|
||||
tBT_UUID *descr_uuid,
|
||||
UINT16 start_handle, UINT16 end_handle,
|
||||
btgatt_db_element_t **char_db,
|
||||
int *count);
|
||||
|
||||
extern void bta_gattc_get_gatt_db(UINT16 conn_id, UINT16 start_handle, UINT16 end_handle, btgatt_db_element_t **db, int *count);
|
||||
|
||||
extern tBTA_GATT_STATUS bta_gattc_init_cache(tBTA_GATTC_SERV *p_srvc_cb);
|
||||
extern void bta_gattc_rebuild_cache(tBTA_GATTC_SERV *p_srcv, UINT16 num_attr, tBTA_GATTC_NV_ATTR *attr);
|
||||
extern void bta_gattc_cache_save(tBTA_GATTC_SERV *p_srvc_cb, UINT16 conn_id);
|
||||
extern void bta_gattc_reset_discover_st(tBTA_GATTC_SERV *p_srcb, tBTA_GATT_STATUS status);
|
||||
|
||||
extern tBTA_GATTC_CONN *bta_gattc_conn_alloc(BD_ADDR remote_bda);
|
||||
extern tBTA_GATTC_CONN *bta_gattc_conn_find(BD_ADDR remote_bda);
|
||||
extern tBTA_GATTC_CONN *bta_gattc_conn_find_alloc(BD_ADDR remote_bda);
|
||||
extern BOOLEAN bta_gattc_conn_dealloc(BD_ADDR remote_bda);
|
||||
|
||||
extern bool bta_gattc_cache_load(tBTA_GATTC_CLCB *p_clcb);
|
||||
extern void bta_gattc_cache_reset(BD_ADDR server_bda);
|
||||
|
||||
#endif /* BTA_GATTC_INT_H */
|
||||
|
@ -23,52 +23,25 @@
|
||||
#define BTC_LE_LOCAL_KEY_DHK (1<<2)
|
||||
#define BTC_LE_LOCAL_KEY_ER (1<<3)
|
||||
|
||||
#define BTC_BLE_STORAGE_DEV_TYPE_STR "DevType"
|
||||
#define BTC_BLE_STORAGE_ADDR_TYPE_STR "AddrType"
|
||||
#define BTC_BLE_STORAGE_LINK_KEY_STR "LinkKey"
|
||||
#define BTC_BLE_STORAGE_LE_KEY_PENC_STR "LE_KEY_PENC"
|
||||
#define BTC_BLE_STORAGE_LE_KEY_PID_STR "LE_KEY_PID"
|
||||
#define BTC_BLE_STORAGE_LE_KEY_PCSRK_STR "LE_KEY_PCSRK"
|
||||
#define BTC_BLE_STORAGE_LE_KEY_LENC_STR "LE_KEY_LENC"
|
||||
#define BTC_BLE_STORAGE_LE_KEY_LID_STR "LE_KEY_LID"
|
||||
#define BTC_BLE_STORAGE_LE_KEY_LCSRK_STR "LE_KEY_LCSRK"
|
||||
|
||||
#define BTC_BLE_STORAGE_LOCAL_ADAPTER_STR "Adapter"
|
||||
#define BTC_BLE_STORAGE_LE_LOCAL_KEY_IR_STR "LE_LOCAL_KEY_IR"
|
||||
#define BTC_BLE_STORAGE_LE_LOCAL_KEY_IRK_STR "LE_LOCAL_KEY_IRK"
|
||||
#define BTC_BLE_STORAGE_LE_LOCAL_KEY_DHK_STR "LE_LOCAL_KEY_DHK"
|
||||
#define BTC_BLE_STORAGE_LE_LOCAL_KEY_ER_STR "LE_LOCAL_KEY_ER"
|
||||
|
||||
/************************************************************************************
|
||||
** Local type definitions
|
||||
************************************************************************************/
|
||||
typedef struct
|
||||
{
|
||||
uint32_t num_devices;
|
||||
bt_bdaddr_t devices[BTM_SEC_MAX_DEVICE_RECORDS];
|
||||
} btc_bonded_devices_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool is_penc_key_rcvd;
|
||||
tBTM_LE_PENC_KEYS penc_key; /* received peer encryption key */
|
||||
bool is_pcsrk_key_rcvd;
|
||||
tBTM_LE_PCSRK_KEYS pcsrk_key; /* received peer device SRK */
|
||||
bool is_pid_key_rcvd;
|
||||
tBTM_LE_PID_KEYS pid_key; /* peer device ID key */
|
||||
bool is_lenc_key_rcvd;
|
||||
tBTM_LE_LENC_KEYS lenc_key; /* local encryption reproduction keys LTK = = d1(ER,DIV,0)*/
|
||||
bool is_lcsrk_key_rcvd;
|
||||
tBTM_LE_LCSRK_KEYS lcsrk_key; /* local device CSRK = d1(ER,DIV,1)*/
|
||||
bool is_lidk_key_rcvd; /* local identity key received */
|
||||
} btc_dm_ble_cb_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bt_bdaddr_t static_bdaddr;
|
||||
BD_ADDR bd_addr;
|
||||
btc_dm_ble_cb_t ble;
|
||||
} btc_dm_pairing_cb_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t ir[BT_OCTET16_LEN];
|
||||
uint8_t irk[BT_OCTET16_LEN];
|
||||
uint8_t dhk[BT_OCTET16_LEN];
|
||||
}btc_dm_local_key_id_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool is_er_rcvd;
|
||||
uint8_t er[BT_OCTET16_LEN];
|
||||
bool is_id_keys_rcvd;
|
||||
btc_dm_local_key_id_t id_keys; /* ID kyes */
|
||||
}btc_dm_local_key_cb_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
BT_OCTET16 sp_c;
|
||||
@ -77,63 +50,37 @@ typedef struct
|
||||
} btc_dm_oob_cb_t;
|
||||
|
||||
|
||||
extern btc_dm_pairing_cb_t pairing_cb;
|
||||
extern btc_dm_local_key_cb_t ble_local_key_cb;
|
||||
extern btc_bonded_devices_t bonded_devices;
|
||||
void btc_storage_save(void);
|
||||
|
||||
bt_status_t btc_storage_load_bonded_ble_devices(void);
|
||||
bt_status_t btc_storage_add_ble_bonding_key( bt_bdaddr_t *remote_bd_addr, char *key, uint8_t key_type, uint8_t key_length);
|
||||
|
||||
bt_status_t btc_get_bonded_ble_devices_list(esp_ble_bond_dev_t *bond_dev);
|
||||
|
||||
bt_status_t btc_in_fetch_bonded_ble_devices(int add);
|
||||
|
||||
void btc_dm_remove_ble_bonding_keys(void);
|
||||
|
||||
bt_status_t btc_storage_add_ble_bonding_key( bt_bdaddr_t *remote_bd_addr,
|
||||
char *key,
|
||||
uint8_t key_type,
|
||||
uint8_t key_length);
|
||||
|
||||
bool btc_compare_le_key_value(const uint8_t key_type, const size_t key_len, const tBTA_LE_KEY_VALUE *key_vaule,
|
||||
bt_bdaddr_t bd_addr);
|
||||
|
||||
void btc_save_ble_bonding_keys(void);
|
||||
|
||||
bt_status_t btc_in_fetch_bonded_ble_device(const char *remote_bd_addr, int add,
|
||||
btc_bonded_devices_t *p_bonded_devices);
|
||||
|
||||
bt_status_t btc_storage_get_ble_bonding_key(bt_bdaddr_t *remote_bd_addr,
|
||||
uint8_t key_type,
|
||||
char *key_value,
|
||||
int key_length);
|
||||
|
||||
bool btc_storage_compare_address_key_value(bt_bdaddr_t *remote_bd_addr,
|
||||
uint8_t key_type, void *key_value, int key_length);
|
||||
bt_status_t btc_storage_add_ble_local_key(char *key,
|
||||
uint8_t key_type,
|
||||
uint8_t key_length);
|
||||
bt_status_t btc_storage_get_ble_bonding_key(bt_bdaddr_t *remote_bd_addr, uint8_t key_type, char *key_value, int key_length);
|
||||
|
||||
bt_status_t btc_storage_remove_ble_bonding_keys(bt_bdaddr_t *remote_bd_addr);
|
||||
|
||||
bt_status_t btc_storage_clear_bond_devices(void);
|
||||
bool btc_storage_compare_address_key_value(bt_bdaddr_t *remote_bd_addr, uint8_t key_type, void *key_value, int key_length);
|
||||
|
||||
bt_status_t btc_storage_add_ble_local_key(char *key, uint8_t key_type, uint8_t key_length);
|
||||
|
||||
bt_status_t btc_storage_remove_ble_local_keys(void);
|
||||
|
||||
bt_status_t btc_storage_get_ble_local_key(uint8_t key_type,
|
||||
char *key_value,
|
||||
int key_len);
|
||||
bt_status_t btc_storage_get_ble_local_key(uint8_t key_type, char *key_value, int key_len);
|
||||
|
||||
bt_status_t btc_storage_get_remote_addr_type(bt_bdaddr_t *remote_bd_addr,
|
||||
int *addr_type);
|
||||
bt_status_t btc_storage_get_remote_addr_type(bt_bdaddr_t *remote_bd_addr, int *addr_type);
|
||||
|
||||
bt_status_t btc_storage_set_remote_addr_type(bt_bdaddr_t *remote_bd_addr, uint8_t addr_type, bool flush);
|
||||
|
||||
bt_status_t btc_storage_remove_remote_addr_type(bt_bdaddr_t *remote_bd_addr, bool flush);
|
||||
|
||||
bt_status_t btc_storage_set_ble_dev_type(bt_bdaddr_t *bd_addr, bool flush);
|
||||
|
||||
bt_status_t btc_storage_remove_ble_dev_type(bt_bdaddr_t *remote_bd_addr, bool flush);
|
||||
|
||||
bt_status_t btc_storage_load_bonded_ble_devices(void);
|
||||
|
||||
bt_status_t btc_storage_get_bonded_ble_devices_list(esp_ble_bond_dev_t *bond_dev, int dev_num);
|
||||
|
||||
int btc_storage_get_num_ble_bond_devices(void);
|
||||
|
||||
bt_status_t btc_storage_set_remote_addr_type(bt_bdaddr_t *remote_bd_addr,
|
||||
uint8_t addr_type);
|
||||
|
||||
void btc_dm_load_ble_local_keys(void);
|
||||
|
||||
void btc_dm_get_ble_local_keys(tBTA_DM_BLE_LOCAL_KEY_MASK *p_key_mask, BT_OCTET16 er,
|
||||
tBTA_BLE_LOCAL_ID_KEYS *p_id_keys);
|
||||
#endif ///SMP_INCLUDED == TRUE
|
||||
#endif ///__BTC_BLE_STORAGE_H__
|
@ -20,8 +20,6 @@
|
||||
|
||||
#include "bt_types.h"
|
||||
|
||||
#define BTC_LE_DEV_TYPE "DevType"
|
||||
|
||||
typedef struct btc_config_section_iter_t btc_config_section_iter_t;
|
||||
|
||||
bool btc_config_init(void);
|
||||
@ -46,7 +44,6 @@ const btc_config_section_iter_t *btc_config_section_end(void);
|
||||
const btc_config_section_iter_t *btc_config_section_next(const btc_config_section_iter_t *section);
|
||||
const char *btc_config_section_name(const btc_config_section_iter_t *section);
|
||||
|
||||
void btc_config_save(void);
|
||||
void btc_config_flush(void);
|
||||
int btc_config_clear(void);
|
||||
|
||||
@ -55,4 +52,7 @@ bool btc_get_address_type(const BD_ADDR bd_addr, int *p_addr_type);
|
||||
bool btc_compare_address_key_value(const char *section, char *key_type, void *key_value, int key_length);
|
||||
bool btc_get_device_type(const BD_ADDR bd_addr, int *p_device_type);
|
||||
|
||||
void btc_config_lock(void);
|
||||
void btc_config_unlock(void);
|
||||
|
||||
#endif
|
||||
|
@ -29,6 +29,45 @@ typedef union {
|
||||
tBTA_DM_SEC sec;
|
||||
} btc_dm_sec_args_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool is_penc_key_rcvd;
|
||||
tBTM_LE_PENC_KEYS penc_key; /* received peer encryption key */
|
||||
bool is_pcsrk_key_rcvd;
|
||||
tBTM_LE_PCSRK_KEYS pcsrk_key; /* received peer device SRK */
|
||||
bool is_pid_key_rcvd;
|
||||
tBTM_LE_PID_KEYS pid_key; /* peer device ID key */
|
||||
bool is_lenc_key_rcvd;
|
||||
tBTM_LE_LENC_KEYS lenc_key; /* local encryption reproduction keys LTK = = d1(ER,DIV,0)*/
|
||||
bool is_lcsrk_key_rcvd;
|
||||
tBTM_LE_LCSRK_KEYS lcsrk_key; /* local device CSRK = d1(ER,DIV,1)*/
|
||||
bool is_lidk_key_rcvd; /* local identity key received */
|
||||
} btc_dm_ble_cb_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bt_bdaddr_t static_bdaddr;
|
||||
BD_ADDR bd_addr;
|
||||
btc_dm_ble_cb_t ble;
|
||||
} btc_dm_pairing_cb_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t ir[BT_OCTET16_LEN];
|
||||
uint8_t irk[BT_OCTET16_LEN];
|
||||
uint8_t dhk[BT_OCTET16_LEN];
|
||||
} btc_dm_local_key_id_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool is_er_rcvd;
|
||||
uint8_t er[BT_OCTET16_LEN];
|
||||
bool is_id_keys_rcvd;
|
||||
btc_dm_local_key_id_t id_keys; /* ID kyes */
|
||||
} btc_dm_local_key_cb_t;
|
||||
|
||||
|
||||
|
||||
// void btc_dm_call_handler(btc_msg_t *msg);
|
||||
void btc_dm_sec_evt(tBTA_DM_SEC_EVT event, tBTA_DM_SEC *data);
|
||||
void btc_dm_sec_cb_handler(btc_msg_t *msg);
|
||||
@ -37,4 +76,11 @@ void btc_dm_sec_arg_deep_copy(btc_msg_t *msg, void *dst, void *src);
|
||||
bt_status_t btc_dm_enable_service(tBTA_SERVICE_ID service_id);
|
||||
bt_status_t btc_dm_disable_service(tBTA_SERVICE_ID service_id);
|
||||
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
void btc_dm_load_ble_local_keys(void);
|
||||
|
||||
void btc_dm_get_ble_local_keys(tBTA_DM_BLE_LOCAL_KEY_MASK *p_key_mask, BT_OCTET16 er,
|
||||
tBTA_BLE_LOCAL_ID_KEYS *p_id_keys);
|
||||
#endif
|
||||
|
||||
#endif /* __BTC_DM_H__ */
|
||||
|
@ -31,9 +31,12 @@ typedef enum {
|
||||
BTC_GAP_BLE_ACT_SET_PKT_DATA_LEN,
|
||||
BTC_GAP_BLE_ACT_SET_RAND_ADDRESS,
|
||||
BTC_GAP_BLE_ACT_CONFIG_LOCAL_PRIVACY,
|
||||
BTC_GAP_BLE_ACT_UPDATE_WHITE_LIST,
|
||||
BTC_GAP_BLE_ACT_SET_CONN_PARAMS,
|
||||
BTC_GAP_BLE_ACT_SET_DEV_NAME,
|
||||
BTC_GAP_BLE_ACT_CFG_ADV_DATA_RAW,
|
||||
BTC_GAP_BLE_ACT_CFG_SCAN_RSP_DATA_RAW,
|
||||
BTC_GAP_BLE_ACT_READ_RSSI,
|
||||
BTC_GAP_BLE_SET_ENCRYPTION_EVT,
|
||||
BTC_GAP_BLE_SET_SECURITY_PARAM_EVT,
|
||||
BTC_GAP_BLE_SECURITY_RSP_EVT,
|
||||
@ -41,8 +44,6 @@ typedef enum {
|
||||
BTC_GAP_BLE_CONFIRM_REPLY_EVT,
|
||||
BTC_GAP_BLE_DISCONNECT_EVT,
|
||||
BTC_GAP_BLE_REMOVE_BOND_DEV_EVT,
|
||||
BTC_GAP_BLE_CLEAR_BOND_DEV_EVT,
|
||||
BTC_GAP_BLE_GET_BOND_DEV_EVT,
|
||||
} btc_gap_ble_act_t;
|
||||
|
||||
/* btc_ble_gap_args_t */
|
||||
@ -82,6 +83,24 @@ typedef union {
|
||||
struct cfg_local_privacy_args {
|
||||
bool privacy_enable;
|
||||
} cfg_local_privacy;
|
||||
//BTC_GAP_BLE_ACT_UPDATE_WHITE_LIST
|
||||
struct update_white_list_args {
|
||||
bool add_remove;
|
||||
esp_bd_addr_t remote_bda;
|
||||
}update_white_list;
|
||||
//BTC_GAP_BLE_ACT_SET_CONN_PARAMS
|
||||
struct set_conn_params_args {
|
||||
esp_bd_addr_t bd_addr;
|
||||
uint16_t min_conn_int;
|
||||
uint16_t max_conn_int;
|
||||
uint16_t slave_latency;
|
||||
uint16_t supervision_tout;
|
||||
}set_conn_params;
|
||||
//BTC_GAP_BLE_ACT_SET_DEV_NAME,
|
||||
struct set_dev_name_args {
|
||||
#define ESP_GAP_DEVICE_NAME_MAX (32)
|
||||
char device_name[ESP_GAP_DEVICE_NAME_MAX + 1];
|
||||
} set_dev_name;
|
||||
//BTC_GAP_BLE_ACT_CFG_ADV_DATA_RAW,
|
||||
struct config_adv_data_raw_args {
|
||||
uint8_t *raw_adv;
|
||||
@ -127,11 +146,15 @@ typedef union {
|
||||
struct remove_bond_device_args {
|
||||
esp_bd_addr_t bd_addr;
|
||||
} remove_bond_device;
|
||||
//BTC_GAP_BLE_ACT_READ_RSSI
|
||||
struct read_rssi_args {
|
||||
esp_bd_addr_t remote_addr;
|
||||
} read_rssi;
|
||||
} btc_ble_gap_args_t;
|
||||
|
||||
void btc_gap_ble_call_handler(btc_msg_t *msg);
|
||||
void btc_gap_ble_cb_handler(btc_msg_t *msg);
|
||||
|
||||
void btc_get_whitelist_size(uint16_t *length);
|
||||
void btc_gap_ble_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src);
|
||||
void btc_gap_ble_arg_deep_free(btc_msg_t *msg);
|
||||
void btc_gap_ble_cb_deep_free(btc_msg_t *msg);
|
||||
|
@ -27,13 +27,8 @@ typedef enum {
|
||||
BTC_GATTC_ACT_CLOSE,
|
||||
BTC_GATTC_ACT_CFG_MTU,
|
||||
BTC_GATTC_ACT_SEARCH_SERVICE,
|
||||
BTC_GATTC_ACT_GET_FIRST_CHAR,
|
||||
BTC_GATTC_ACT_GET_NEXT_CHAR,
|
||||
BTC_GATTC_ACT_GET_FIRST_DESCR,
|
||||
BTC_GATTC_ACT_GET_NEXT_DESCR,
|
||||
BTC_GATTC_ACT_GET_FIRST_INCL_SERVICE,
|
||||
BTC_GATTC_ACT_GET_NEXT_INCL_SERVICE,
|
||||
BTC_GATTC_ACT_READ_CHAR,
|
||||
BTC_GATTC_ACT_READ_MULTIPLE_CHAR,
|
||||
BTC_GATTC_ACT_READ_CHAR_DESCR,
|
||||
BTC_GATTC_ACT_WRITE_CHAR,
|
||||
BTC_GATTC_ACT_WRITE_CHAR_DESCR,
|
||||
@ -75,62 +70,50 @@ typedef union {
|
||||
bool filter_uuid_enable;
|
||||
esp_bt_uuid_t filter_uuid;
|
||||
} search_srvc;
|
||||
//BTC_GATTC_ACT_GET_FIRST_CHAR,
|
||||
struct get_first_char_arg {
|
||||
//BTC_GATTC_ACT_GET_CHAR,
|
||||
struct get_char_arg {
|
||||
uint16_t conn_id;
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
} get_first_char;
|
||||
//BTC_GATTC_ACT_GET_NEXT_CHAR,
|
||||
struct get_next_char_arg {
|
||||
uint16_t handle;
|
||||
} get_char;
|
||||
//BTC_GATTC_ACT_GET_DESCR,
|
||||
struct get_descr_arg {
|
||||
uint16_t conn_id;
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
esp_gatt_id_t char_id;
|
||||
} get_next_char;
|
||||
//BTC_GATTC_ACT_GET_FIRST_DESCR,
|
||||
struct get_first_descr_arg {
|
||||
uint16_t conn_id;
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
esp_gatt_id_t char_id;
|
||||
} get_first_descr;
|
||||
//BTC_GATTC_ACT_GET_NEXT_DESCR,
|
||||
struct get_next_descr_arg {
|
||||
uint16_t conn_id;
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
esp_gatt_id_t char_id;
|
||||
esp_gatt_id_t descr_id;
|
||||
} get_next_descr;
|
||||
uint16_t handle;
|
||||
} get_descr;
|
||||
//BTC_GATTC_ACT_GET_FIRST_INCL_SERVICE,
|
||||
struct get_first_incl_srvc_arg {
|
||||
uint16_t conn_id;
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
uint16_t handle;
|
||||
} get_first_incl_srvc;
|
||||
//BTC_GATTC_ACT_GET_NEXT_INCL_SERVICE,
|
||||
struct get_next_incl_srvc_arg {
|
||||
uint16_t conn_id;
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
esp_gatt_srvc_id_t start_service_id;
|
||||
uint16_t handle;
|
||||
} get_next_incl_srvc;
|
||||
//BTC_GATTC_ACT_READ_CHAR,
|
||||
struct read_char_arg {
|
||||
uint16_t conn_id;
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
esp_gatt_id_t char_id;
|
||||
uint16_t handle;
|
||||
esp_gatt_auth_req_t auth_req;
|
||||
} read_char;
|
||||
//BTC_GATTC_ACT_READ_MULTIPLE_CHAR
|
||||
struct read_multiple_arg {
|
||||
uint16_t conn_id;
|
||||
uint8_t num_attr;
|
||||
uint16_t handles[ESP_GATT_MAX_READ_MULTI_HANDLES];
|
||||
esp_gatt_auth_req_t auth_req;
|
||||
} read_multiple;
|
||||
//BTC_GATTC_ACT_READ_CHAR_DESCR,
|
||||
struct read_descr_arg {
|
||||
uint16_t conn_id;
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
esp_gatt_id_t char_id;
|
||||
esp_gatt_id_t descr_id;
|
||||
uint16_t handle;
|
||||
esp_gatt_auth_req_t auth_req;
|
||||
} read_descr;
|
||||
//BTC_GATTC_ACT_WRITE_CHAR,
|
||||
struct write_char_arg {
|
||||
uint16_t conn_id;
|
||||
uint16_t value_len;
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
esp_gatt_id_t char_id;
|
||||
uint16_t handle;
|
||||
uint8_t *value;
|
||||
esp_gatt_write_type_t write_type;
|
||||
esp_gatt_auth_req_t auth_req;
|
||||
@ -139,9 +122,7 @@ typedef union {
|
||||
struct write_descr_arg {
|
||||
uint16_t conn_id;
|
||||
uint16_t value_len;
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
esp_gatt_id_t char_id;
|
||||
esp_gatt_id_t descr_id;
|
||||
uint16_t handle;
|
||||
uint8_t *value;
|
||||
esp_gatt_write_type_t write_type;
|
||||
esp_gatt_auth_req_t auth_req;
|
||||
@ -149,8 +130,7 @@ typedef union {
|
||||
//BTC_GATTC_ACT_PREPARE_WRITE,
|
||||
struct prep_write_arg {
|
||||
uint16_t conn_id;
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
esp_gatt_id_t char_id;
|
||||
uint16_t handle;
|
||||
uint16_t offset;
|
||||
uint16_t value_len;
|
||||
uint8_t *value;
|
||||
@ -159,9 +139,7 @@ typedef union {
|
||||
//BTC_GATTC_ACT_PREPARE_WRITE_CHAR_DESCR,
|
||||
struct prep_write_descr_arg {
|
||||
uint16_t conn_id;
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
esp_gatt_id_t char_id;
|
||||
esp_gatt_id_t descr_id;
|
||||
uint16_t handle;
|
||||
uint16_t offset;
|
||||
uint16_t value_len;
|
||||
uint8_t *value;
|
||||
@ -176,15 +154,13 @@ typedef union {
|
||||
struct reg_for_notify_arg {
|
||||
esp_gatt_if_t gattc_if;
|
||||
esp_bd_addr_t remote_bda;
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
esp_gatt_id_t char_id;
|
||||
uint16_t handle;
|
||||
} reg_for_notify;
|
||||
//BTC_GATTC_ACT_UNREG_FOR_NOTIFY
|
||||
struct unreg_for_notify_arg {
|
||||
esp_gatt_if_t gattc_if;
|
||||
esp_bd_addr_t remote_bda;
|
||||
esp_gatt_srvc_id_t service_id;
|
||||
esp_gatt_id_t char_id;
|
||||
uint16_t handle;
|
||||
} unreg_for_notify;
|
||||
//BTC_GATTC_ACT_CACHE_REFRESH,
|
||||
struct cache_refresh_arg {
|
||||
@ -195,5 +171,56 @@ typedef union {
|
||||
void btc_gattc_call_handler(btc_msg_t *msg);
|
||||
void btc_gattc_cb_handler(btc_msg_t *msg);
|
||||
void btc_gattc_arg_deep_copy(btc_msg_t *msg, void *p_dest, void *p_src);
|
||||
esp_gatt_status_t btc_ble_gattc_get_service(uint16_t conn_id, esp_bt_uuid_t *svc_uuid,
|
||||
esp_gattc_service_elem_t *result,
|
||||
uint16_t *count, uint16_t offset);
|
||||
esp_gatt_status_t btc_ble_gattc_get_all_char(uint16_t conn_id,
|
||||
uint16_t start_handle,
|
||||
uint16_t end_handle,
|
||||
esp_gattc_char_elem_t *result,
|
||||
uint16_t *count, uint16_t offset);
|
||||
esp_gatt_status_t btc_ble_gattc_get_all_descr(uint16_t conn_id,
|
||||
uint16_t char_handle,
|
||||
esp_gattc_descr_elem_t *result,
|
||||
uint16_t *count, uint16_t offset);
|
||||
esp_gatt_status_t btc_ble_gattc_get_char_by_uuid(uint16_t conn_id,
|
||||
uint16_t start_handle,
|
||||
uint16_t end_handle,
|
||||
esp_bt_uuid_t char_uuid,
|
||||
esp_gattc_char_elem_t *result,
|
||||
uint16_t *count);
|
||||
esp_gatt_status_t btc_ble_gattc_get_descr_by_uuid(uint16_t conn_id,
|
||||
uint16_t start_handle,
|
||||
uint16_t end_handle,
|
||||
esp_bt_uuid_t char_uuid,
|
||||
esp_bt_uuid_t descr_uuid,
|
||||
esp_gattc_descr_elem_t *result,
|
||||
uint16_t *count);
|
||||
|
||||
esp_gatt_status_t btc_ble_gattc_get_descr_by_char_handle(uint16_t conn_id,
|
||||
uint16_t char_handle,
|
||||
esp_bt_uuid_t descr_uuid,
|
||||
esp_gattc_descr_elem_t *result,
|
||||
uint16_t *count);
|
||||
|
||||
esp_gatt_status_t btc_ble_gattc_get_include_service(uint16_t conn_id,
|
||||
uint16_t start_handle,
|
||||
uint16_t end_handle,
|
||||
esp_bt_uuid_t *incl_uuid,
|
||||
esp_gattc_incl_svc_elem_t *result,
|
||||
uint16_t *count);
|
||||
|
||||
esp_gatt_status_t btc_ble_gattc_get_attr_count(uint16_t conn_id,
|
||||
esp_gatt_db_attr_type_t type,
|
||||
uint16_t start_handle,
|
||||
uint16_t end_handle,
|
||||
uint16_t char_handle,
|
||||
uint16_t *count);
|
||||
|
||||
esp_gatt_status_t btc_ble_gattc_get_db(uint16_t conn_id, uint16_t start_handle, uint16_t end_handle,
|
||||
esp_gattc_db_elem_t *db, uint16_t *count);
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* __BTC_GATTC_H__ */
|
||||
|
@ -19,6 +19,12 @@
|
||||
#include "bt_defs.h"
|
||||
#include "bt_types.h"
|
||||
|
||||
|
||||
#define BTC_STORAGE_DEV_CLASS_STR "DevClass"
|
||||
#define BTC_STORAGE_LINK_KEY_STR "LinkKey" /* same as the ble */
|
||||
#define BTC_STORAGE_LINK_KEY_TYPE_STR "LinkKeyType"
|
||||
#define BTC_STORAGE_PIN_LENGTH_STR "PinLength"
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function btc_storage_add_bonded_device
|
||||
|
@ -2833,6 +2833,11 @@ tBTM_STATUS BTM_ReadRSSI (BD_ADDR remote_bda, tBTM_CMPL_CB *p_cb);
|
||||
tBTM_STATUS BTM_ReadTxPower (BD_ADDR remote_bda,
|
||||
tBT_TRANSPORT transport, tBTM_CMPL_CB *p_cb);
|
||||
|
||||
tBTM_STATUS BTM_BleReadAdvTxPower(tBTM_CMPL_CB *p_cb);
|
||||
|
||||
void BTM_BleGetWhiteListSize(uint16_t *length);
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function BTM_ReadLinkQuality
|
||||
|
@ -416,6 +416,15 @@ void btm_sco_chk_pend_rolechange (UINT16 hci_handle);
|
||||
** Define structure for Security Service Record.
|
||||
** A record exists for each service registered with the Security Manager
|
||||
*/
|
||||
#define BTM_SEC_OUT_FLAGS (BTM_SEC_OUT_AUTHENTICATE | BTM_SEC_OUT_ENCRYPT | BTM_SEC_OUT_AUTHORIZE)
|
||||
#define BTM_SEC_IN_FLAGS (BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT | BTM_SEC_IN_AUTHORIZE)
|
||||
|
||||
#define BTM_SEC_OUT_LEVEL4_FLAGS (BTM_SEC_OUT_AUTHENTICATE | BTM_SEC_OUT_ENCRYPT | \
|
||||
BTM_SEC_OUT_MITM | BTM_SEC_MODE4_LEVEL4)
|
||||
|
||||
#define BTM_SEC_IN_LEVEL4_FLAGS (BTM_SEC_IN_AUTHENTICATE | BTM_SEC_IN_ENCRYPT | \
|
||||
BTM_SEC_IN_MITM | BTM_SEC_MODE4_LEVEL4)
|
||||
|
||||
typedef struct {
|
||||
UINT32 mx_proto_id; /* Service runs over this multiplexer protocol */
|
||||
UINT32 orig_mx_chan_id; /* Channel on the multiplexer protocol */
|
||||
@ -878,6 +887,15 @@ typedef struct{
|
||||
}tBTM_CallbackFunc;
|
||||
|
||||
extern tBTM_CallbackFunc conn_param_update_cb;
|
||||
/* security action for L2CAP COC channels */
|
||||
#define BTM_SEC_OK 1
|
||||
#define BTM_SEC_ENCRYPT 2 /* encrypt the link with current key */
|
||||
#define BTM_SEC_ENCRYPT_NO_MITM 3 /* unauthenticated encryption or better */
|
||||
#define BTM_SEC_ENCRYPT_MITM 4 /* authenticated encryption */
|
||||
#define BTM_SEC_ENC_PENDING 5 /* wait for link encryption pending */
|
||||
|
||||
typedef UINT8 tBTM_SEC_ACTION;
|
||||
|
||||
/*
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
@ -1082,6 +1100,10 @@ BOOLEAN btm_sec_is_a_bonded_dev (BD_ADDR bda);
|
||||
void btm_consolidate_dev(tBTM_SEC_DEV_REC *p_target_rec);
|
||||
BOOLEAN btm_sec_is_le_capable_dev (BD_ADDR bda);
|
||||
BOOLEAN btm_ble_init_pseudo_addr (tBTM_SEC_DEV_REC *p_dev_rec, BD_ADDR new_pseudo_addr);
|
||||
extern BOOLEAN btm_ble_start_sec_check(BD_ADDR bd_addr, UINT16 psm, BOOLEAN is_originator,
|
||||
tBTM_SEC_CALLBACK *p_callback, void *p_ref_data);
|
||||
extern tBTM_SEC_SERV_REC *btm_sec_find_first_serv (CONNECTION_TYPE conn_type, UINT16 psm);
|
||||
|
||||
#endif /* BLE_INCLUDED */
|
||||
|
||||
tINQ_DB_ENT *btm_inq_db_new (BD_ADDR p_bda);
|
||||
|
@ -66,8 +66,13 @@ typedef uint8_t esp_link_key[ESP_BT_OCTET16_LEN]; /* Link Key */
|
||||
/// Default GATT interface id
|
||||
#define ESP_DEFAULT_GATT_IF 0xff
|
||||
|
||||
/// Default BLE connection param, if the value doesn't be overwritten
|
||||
#define ESP_BLE_CONN_PARAM_UNDEF 0xffff /* use this value when a specific value not to be overwritten */
|
||||
#define ESP_BLE_CONN_INT_MIN 0x0006 /*!< relate to BTM_BLE_CONN_INT_MIN in btm_ble_api.h */
|
||||
#define ESP_BLE_CONN_INT_MAX 0x0C80 /*!< relate to BTM_BLE_CONN_INT_MAX in btm_ble_api.h */
|
||||
#define ESP_BLE_CONN_LATENCY_MAX 500 /*!< relate to ESP_BLE_CONN_LATENCY_MAX in btm_ble_api.h */
|
||||
#define ESP_BLE_CONN_SUP_TOUT_MIN 0x000A /*!< relate to BTM_BLE_CONN_SUP_TOUT_MIN in btm_ble_api.h */
|
||||
#define ESP_BLE_CONN_SUP_TOUT_MAX 0x0C80 /*!< relate to ESP_BLE_CONN_SUP_TOUT_MAX in btm_ble_api.h */
|
||||
#define ESP_BLE_CONN_PARAM_UNDEF 0xffff /* use this value when a specific value not to be overwritten */ /* relate to ESP_BLE_CONN_PARAM_UNDEF in btm_ble_api.h */
|
||||
#define ESP_BLE_SCAN_PARAM_UNDEF 0xffffffff /* relate to ESP_BLE_SCAN_PARAM_UNDEF in btm_ble_api.h */
|
||||
|
||||
/// Check the param is valid or not
|
||||
#define ESP_BLE_IS_VALID_PARAM(x, min, max) (((x) >= (min) && (x) <= (max)) || ((x) == ESP_BLE_CONN_PARAM_UNDEF))
|
||||
|
@ -68,7 +68,6 @@ typedef uint8_t esp_ble_auth_req_t; /*!< combination of the above bit
|
||||
#define ESP_IO_CAP_KBDISP 4 /*!< Keyboard display */ /* relate to BTM_IO_CAP_KBDISP in btm_api.h */
|
||||
typedef uint8_t esp_ble_io_cap_t; /*!< combination of the io capability */
|
||||
|
||||
|
||||
/// GAP BLE callback event type
|
||||
typedef enum {
|
||||
ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT = 0, /*!< When advertising data set complete, the event comes */
|
||||
@ -97,6 +96,7 @@ typedef enum {
|
||||
ESP_GAP_BLE_REMOVE_BOND_DEV_COMPLETE_EVT, /*!< When remove the bond device complete, the event comes */
|
||||
ESP_GAP_BLE_CLEAR_BOND_DEV_COMPLETE_EVT, /*!< When clear the bond device clear complete, the event comes */
|
||||
ESP_GAP_BLE_GET_BOND_DEV_COMPLETE_EVT, /*!< When get the bond device list complete, the event comes */
|
||||
ESP_GAP_BLE_READ_RSSI_COMPLETE_EVT, /*!< When read the rssi complete, the event comes */
|
||||
ESP_GAP_BLE_EVT_MAX,
|
||||
} esp_gap_ble_cb_event_t;
|
||||
|
||||
@ -591,6 +591,15 @@ typedef union {
|
||||
uint8_t dev_num; /*!< Indicate the get number device in the bond list */
|
||||
esp_ble_bond_dev_t *bond_dev; /*!< the pointer to the bond device Structure */
|
||||
}get_bond_dev_cmpl; /*!< Event parameter of ESP_GAP_BLE_GET_BOND_DEV_COMPLETE_EVT */
|
||||
/**
|
||||
* @brief ESP_GAP_BLE_READ_RSSI_COMPLETE_EVT
|
||||
*/
|
||||
struct ble_read_rssi_cmpl_evt_param {
|
||||
esp_bt_status_t status; /*!< Indicate the read adv tx power operation success status */
|
||||
int8_t rssi; /*!< The ble remote device rssi value, the range is from -127 to 20, the unit is dbm,
|
||||
if the RSSI cannot be read, the RSSI metric shall be set to 127. */
|
||||
esp_bd_addr_t remote_addr; /*!< The remote device address */
|
||||
} read_rssi_cmpl; /*!< Event parameter of ESP_GAP_BLE_READ_RSSI_COMPLETE_EVT */
|
||||
} esp_ble_gap_cb_param_t;
|
||||
|
||||
/**
|
||||
@ -742,6 +751,48 @@ esp_err_t esp_ble_gap_set_rand_addr(esp_bd_addr_t rand_addr);
|
||||
*/
|
||||
esp_err_t esp_ble_gap_config_local_privacy (bool privacy_enable);
|
||||
|
||||
/**
|
||||
* @brief Add or remove device from white list
|
||||
*
|
||||
* @param[in] add_remove: the value is true if added the ble device to the white list, and false remove to the white list.
|
||||
* @param[in] remote_bda: the remote device address add/remove from the white list.
|
||||
* @return
|
||||
* - ESP_OK : success
|
||||
* - other : failed
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_ble_gap_update_whitelist(bool add_remove, esp_bd_addr_t remote_bda);
|
||||
|
||||
/**
|
||||
* @brief Get the whitelist size in the controller
|
||||
*
|
||||
* @param[out] length: the white list length.
|
||||
* @return
|
||||
* - ESP_OK : success
|
||||
* - other : failed
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_ble_gap_get_whitelist_size(uint16_t *length);
|
||||
|
||||
/**
|
||||
* @brief This function is called to set the preferred connection
|
||||
* parameters when default connection parameter is not desired before connecting.
|
||||
* This API can only be used in the master role.
|
||||
*
|
||||
* @param[in] bd_addr: BD address of the peripheral
|
||||
* @param[in] min_conn_int: minimum preferred connection interval
|
||||
* @param[in] max_conn_int: maximum preferred connection interval
|
||||
* @param[in] slave_latency: preferred slave latency
|
||||
* @param[in] supervision_tout: preferred supervision timeout
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : success
|
||||
* - other : failed
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_ble_gap_set_prefer_conn_params(esp_bd_addr_t bd_addr,
|
||||
uint16_t min_conn_int, uint16_t max_conn_int,
|
||||
uint16_t slave_latency, uint16_t supervision_tout);
|
||||
|
||||
/**
|
||||
* @brief Set device name to the local device
|
||||
@ -796,7 +847,20 @@ esp_err_t esp_ble_gap_config_adv_data_raw(uint8_t *raw_data, uint32_t raw_data_l
|
||||
*/
|
||||
esp_err_t esp_ble_gap_config_scan_rsp_data_raw(uint8_t *raw_data, uint32_t raw_data_len);
|
||||
|
||||
/**
|
||||
* @brief This function is called to read the RSSI of remote device.
|
||||
* The address of link policy results are returned in the gap callback function with
|
||||
* ESP_GAP_BLE_READ_RSSI_COMPLETE_EVT event.
|
||||
*
|
||||
* @param[in] remote_addr : The remote connection device address.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : success
|
||||
* - other : failed
|
||||
*/
|
||||
esp_err_t esp_ble_gap_read_rssi(esp_bd_addr_t remote_addr);
|
||||
|
||||
#if (SMP_INCLUDED == TRUE)
|
||||
/**
|
||||
* @brief Set a GAP security parameter value. Overrides the default value.
|
||||
*
|
||||
@ -879,24 +943,32 @@ esp_err_t esp_ble_confirm_reply(esp_bd_addr_t bd_addr, bool accept);
|
||||
esp_err_t esp_ble_remove_bond_device(esp_bd_addr_t bd_addr);
|
||||
|
||||
/**
|
||||
* @brief Removes all of the device from the security database list of
|
||||
* peer device. It manages unpairing event while connected.
|
||||
* @brief Get the device number from the security database list of peer device.
|
||||
* It will return the device bonded number immediately.
|
||||
*
|
||||
* @return - ESP_OK : success
|
||||
* - other : failed
|
||||
* @return - >= 0 : bonded devices number.
|
||||
* - < 0 : failed
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_ble_clear_bond_device_list(void);
|
||||
int esp_ble_get_bond_device_num(void);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get the device from the security database list of peer device.
|
||||
* It will return the device bonded information from the ESP_GAP_BLE_GET_BOND_DEV_COMPLETE_EVT event.
|
||||
* It will return the device bonded information immediately.
|
||||
* @param[inout] dev_num: Indicate the dev_list array(buffer) size as input.
|
||||
* If dev_num is large enough, it means the actual number as output.
|
||||
* Suggest that dev_num value equal to esp_ble_get_bond_device_num().
|
||||
*
|
||||
* @param[out] dev_list: an array(buffer) of `esp_ble_bond_dev_t` type. Use for storing the bonded devices address.
|
||||
* The dev_list should be allocated by who call this API.
|
||||
* @return - ESP_OK : success
|
||||
* - other : failed
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_ble_get_bond_device_list(void);
|
||||
esp_err_t esp_ble_get_bond_device_list(int *dev_num, esp_ble_bond_dev_t *dev_list);
|
||||
|
||||
#endif /* #if (SMP_INCLUDED == TRUE) */
|
||||
|
||||
/**
|
||||
* @brief This function is to disconnect the physical connection of the peer device
|
||||
|
@ -27,6 +27,7 @@ extern "C" {
|
||||
#define ESP_GATT_ILLEGAL_HANDLE 0
|
||||
/// GATT attribute max handle
|
||||
#define ESP_GATT_ATTR_HANDLE_MAX 100
|
||||
#define ESP_GATT_MAX_READ_MULTI_HANDLES 10 /* Max attributes to read in one request */
|
||||
|
||||
|
||||
/**@{
|
||||
@ -323,8 +324,8 @@ typedef struct
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
esp_attr_control_t attr_control; /*!< The attribute control type*/
|
||||
esp_attr_desc_t att_desc; /*!< The attribute type*/
|
||||
esp_attr_control_t attr_control; /*!< The attribute control type */
|
||||
esp_attr_desc_t att_desc; /*!< The attribute type */
|
||||
} esp_gatts_attr_db_t;
|
||||
|
||||
|
||||
@ -358,9 +359,6 @@ typedef struct
|
||||
uint16_t end_hdl; /*!< Gatt end handle value of included 128 bit service */
|
||||
} esp_gatts_incl128_svc_desc_t; /*!< Gatt include 128 bit service entry element */
|
||||
|
||||
|
||||
|
||||
|
||||
/// Gatt attribute value
|
||||
typedef struct {
|
||||
uint8_t value[ESP_GATT_MAX_ATTR_LEN]; /*!< Gatt attribute value */
|
||||
@ -388,6 +386,75 @@ typedef enum {
|
||||
|
||||
typedef uint8_t esp_gatt_if_t; /*!< Gatt interface type, different application on GATT client use different gatt_if */
|
||||
|
||||
/**
|
||||
* @brief the type of attribute element
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_GATT_DB_PRIMARY_SERVICE, /*!< Gattc primary service attribute type in the cache */
|
||||
ESP_GATT_DB_SECONDARY_SERVICE, /*!< Gattc secondary service attribute type in the cache */
|
||||
ESP_GATT_DB_CHARACTERISTIC, /*!< Gattc characteristic attribute type in the cache */
|
||||
ESP_GATT_DB_DESCRIPTOR, /*!< Gattc characteristic descriptor attribute type in the cache */
|
||||
ESP_GATT_DB_INCLUDED_SERVICE, /*!< Gattc include service attribute type in the cache */
|
||||
ESP_GATT_DB_ALL, /*!< Gattc all the attribute (primary service & secondary service & include service & char & descriptor) type in the cache */
|
||||
} esp_gatt_db_attr_type_t; /*!< Gattc attribute type element */
|
||||
|
||||
/**
|
||||
* @brief read multiple attribute
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t num_attr; /*!< The number of the attribute */
|
||||
uint16_t handles[ESP_GATT_MAX_READ_MULTI_HANDLES]; /*!< The handles list */
|
||||
} esp_gattc_multi_t; /*!< The gattc multiple read element */
|
||||
|
||||
/**
|
||||
* @brief data base attribute element
|
||||
*/
|
||||
typedef struct {
|
||||
esp_gatt_db_attr_type_t type; /*!< The attribute type */
|
||||
uint16_t attribute_handle; /*!< The attribute handle, it's valid for all of the type */
|
||||
uint16_t start_handle; /*!< The service start handle, it's valid only when the type = ESP_GATT_DB_PRIMARY_SERVICE or ESP_GATT_DB_SECONDARY_SERVICE */
|
||||
uint16_t end_handle; /*!< The service end handle, it's valid only when the type = ESP_GATT_DB_PRIMARY_SERVICE or ESP_GATT_DB_SECONDARY_SERVICE */
|
||||
esp_gatt_char_prop_t properties; /*!< The characteristic properties, it's valid only when the type = ESP_GATT_DB_CHARACTERISTIC */
|
||||
esp_bt_uuid_t uuid; /*!< The attribute uuid, it's valid for all of the type */
|
||||
} esp_gattc_db_elem_t; /*!< The gattc service data base element in the cache */
|
||||
|
||||
/**
|
||||
* @brief service element
|
||||
*/
|
||||
typedef struct {
|
||||
bool is_primary; /*!< The service flag, ture if the service is primary service, else is secondly service */
|
||||
uint16_t start_handle; /*!< The start handle of the service */
|
||||
uint16_t end_handle; /*!< The end handle of the service */
|
||||
esp_bt_uuid_t uuid; /*!< The uuid of the service */
|
||||
} esp_gattc_service_elem_t; /*!< The gattc service element */
|
||||
|
||||
/**
|
||||
* @brief characteristic element
|
||||
*/
|
||||
typedef struct {
|
||||
uint16_t char_handle; /*!< The characteristic handle */
|
||||
esp_gatt_char_prop_t properties; /*!< The characteristic properties */
|
||||
esp_bt_uuid_t uuid; /*!< The characteristic uuid */
|
||||
} esp_gattc_char_elem_t; /*!< The gattc characteristic element */
|
||||
|
||||
/**
|
||||
* @brief descriptor element
|
||||
*/
|
||||
typedef struct {
|
||||
uint16_t handle; /*!< The characteristic descriptor handle */
|
||||
esp_bt_uuid_t uuid; /*!< The characteristic descriptor uuid */
|
||||
} esp_gattc_descr_elem_t; /*!< The gattc descriptor type element */
|
||||
|
||||
/**
|
||||
* @brief include service element
|
||||
*/
|
||||
typedef struct {
|
||||
uint16_t handle; /*!< The include service current attribute handle */
|
||||
uint16_t incl_srvc_s_handle; /*!< The start hanlde of the service which has been included */
|
||||
esp_bt_uuid_t uuid; /*!< The include service uuid */
|
||||
} esp_gattc_incl_svc_elem_t; /*!< The gattc inclue service element */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -59,9 +59,6 @@ typedef enum {
|
||||
ESP_GATTC_SCAN_FLT_PARAM_EVT = 32, /*!< When Scan filter parameters are set, the event comes */
|
||||
ESP_GATTC_SCAN_FLT_STATUS_EVT = 33, /*!< When Scan filter status is reported, the event comes */
|
||||
ESP_GATTC_ADV_VSC_EVT = 34, /*!< When advertising vendor spec content event is reported, the event comes */
|
||||
ESP_GATTC_GET_CHAR_EVT = 35, /*!< When characteristic is got from GATT server, the event comes */
|
||||
ESP_GATTC_GET_DESCR_EVT = 36, /*!< When characteristic descriptor is got from GATT server, the event comes */
|
||||
ESP_GATTC_GET_INCL_SRVC_EVT = 37, /*!< When included service is got from GATT server, the event comes */
|
||||
ESP_GATTC_REG_FOR_NOTIFY_EVT = 38, /*!< When register for notification of a service completes, the event comes */
|
||||
ESP_GATTC_UNREG_FOR_NOTIFY_EVT = 39, /*!< When unregister for notification of a service completes, the event comes */
|
||||
ESP_GATTC_CONNECT_EVT = 40, /*!< When the ble physical connection is set up, the event comes */
|
||||
@ -123,7 +120,9 @@ typedef union {
|
||||
*/
|
||||
struct gattc_search_res_evt_param {
|
||||
uint16_t conn_id; /*!< Connection id */
|
||||
esp_gatt_srvc_id_t srvc_id; /*!< Service id, include service uuid and other information */
|
||||
uint16_t start_handle; /*!< Service start handle */
|
||||
uint16_t end_handle; /*!< Service end handle */
|
||||
esp_gatt_id_t srvc_id; /*!< Service id, include service uuid and other information */
|
||||
} search_res; /*!< Gatt client callback param of ESP_GATTC_SEARCH_RES_EVT */
|
||||
|
||||
/**
|
||||
@ -133,17 +132,8 @@ typedef union {
|
||||
|
||||
esp_gatt_status_t status; /*!< Operation status */
|
||||
uint16_t conn_id; /*!< Connection id */
|
||||
esp_gatt_srvc_id_t srvc_id; /*!< Service id, include service uuid and other information */
|
||||
esp_gatt_id_t char_id; /*!< Characteristic id, include characteristic uuid and other information */
|
||||
esp_gatt_id_t descr_id; /*!< Descriptor id, include descriptor uuid and other information */
|
||||
uint16_t handle; /*!< Characteristic handle */
|
||||
uint8_t *value; /*!< Characteristic value */
|
||||
uint16_t value_type; /*!< Characteristic value type, there is two value for this type:
|
||||
ESP_GATTC_READ_VALUE_TYPE_VALUE(0x0000) and
|
||||
ESP_GATTC_READ_VALUE_TYPE_AGG_FORMAT(0x2905).
|
||||
If the value is ESP_GATTC_READ_VALUE_TYPE_VALUE means it is a generally
|
||||
value type, and if is the type of ESP_GATTC_READ_VALUE_TYPE_AGG_FORMAT,
|
||||
the unit of the value will indicate in the Characteristic
|
||||
aggregate format descriptor */
|
||||
uint16_t value_len; /*!< Characteristic value length */
|
||||
} read; /*!< Gatt client callback param of ESP_GATTC_READ_CHAR_EVT */
|
||||
|
||||
@ -153,9 +143,7 @@ typedef union {
|
||||
struct gattc_write_evt_param {
|
||||
esp_gatt_status_t status; /*!< Operation status */
|
||||
uint16_t conn_id; /*!< Connection id */
|
||||
esp_gatt_srvc_id_t srvc_id; /*!< Service id, include service uuid and other information */
|
||||
esp_gatt_id_t char_id; /*!< Characteristic id, include characteristic uuid and other information */
|
||||
esp_gatt_id_t descr_id; /*!< Descriptor id, include descriptor uuid and other information */
|
||||
uint16_t handle; /*!< The Characteristic or descriptor handle */
|
||||
} write; /*!< Gatt client callback param of ESP_GATTC_WRITE_DESCR_EVT */
|
||||
|
||||
/**
|
||||
@ -172,9 +160,7 @@ typedef union {
|
||||
struct gattc_notify_evt_param {
|
||||
uint16_t conn_id; /*!< Connection id */
|
||||
esp_bd_addr_t remote_bda; /*!< Remote bluetooth device address */
|
||||
esp_gatt_srvc_id_t srvc_id; /*!< Service id, include service uuid and other information */
|
||||
esp_gatt_id_t char_id; /*!< Characteristic id, include characteristic uuid and other information */
|
||||
esp_gatt_id_t descr_id; /*!< Descriptor id, include descriptor uuid and other information */
|
||||
uint16_t handle; /*!< The Characteristic or descriptor handle */
|
||||
uint16_t value_len; /*!< Notify attribute value */
|
||||
uint8_t *value; /*!< Notify attribute value */
|
||||
bool is_notify; /*!< True means notify, false means indicate */
|
||||
@ -194,46 +180,12 @@ typedef union {
|
||||
uint16_t conn_id; /*!< Connection id */
|
||||
bool congested; /*!< Congested or not */
|
||||
} congest; /*!< Gatt client callback param of ESP_GATTC_CONGEST_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_GATTC_GET_CHAR_EVT
|
||||
*/
|
||||
struct gattc_get_char_evt_param {
|
||||
esp_gatt_status_t status; /*!< Operation status */
|
||||
uint16_t conn_id; /*!< Connection id */
|
||||
esp_gatt_srvc_id_t srvc_id; /*!< Service id, include service uuid and other information */
|
||||
esp_gatt_id_t char_id; /*!< Characteristic id, include characteristic uuid and other information */
|
||||
esp_gatt_char_prop_t char_prop; /*!< Characteristic property */
|
||||
} get_char; /*!< Gatt client callback param of ESP_GATTC_GET_CHAR_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_GATTC_GET_DESCR_EVT
|
||||
*/
|
||||
struct gattc_get_descr_evt_param {
|
||||
esp_gatt_status_t status; /*!< Operation status */
|
||||
uint16_t conn_id; /*!< Connection id */
|
||||
esp_gatt_srvc_id_t srvc_id; /*!< Service id, include service uuid and other information */
|
||||
esp_gatt_id_t char_id; /*!< Characteristic id, include characteristic uuid and other information */
|
||||
esp_gatt_id_t descr_id; /*!< Descriptor id, include descriptor uuid and other information */
|
||||
} get_descr; /*!< Gatt client callback param of ESP_GATTC_GET_DESCR_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_GATTC_GET_INCL_SRVC_EVT
|
||||
*/
|
||||
struct gattc_get_incl_srvc_evt_param {
|
||||
esp_gatt_status_t status; /*!< Operation status */
|
||||
uint16_t conn_id; /*!< Connection id */
|
||||
esp_gatt_srvc_id_t srvc_id; /*!< Service id, include service uuid and other information */
|
||||
esp_gatt_srvc_id_t incl_srvc_id;/*!< Included service id, include service uuid and other information */
|
||||
} get_incl_srvc; /*!< Gatt client callback param of ESP_GATTC_GET_INCL_SRVC_EVT */
|
||||
|
||||
/**
|
||||
* @brief ESP_GATTC_REG_FOR_NOTIFY_EVT
|
||||
*/
|
||||
struct gattc_reg_for_notify_evt_param {
|
||||
esp_gatt_status_t status; /*!< Operation status */
|
||||
esp_gatt_srvc_id_t srvc_id; /*!< Service id, include service uuid and other information */
|
||||
esp_gatt_id_t char_id; /*!< Characteristic id, include characteristic uuid and other information */
|
||||
uint16_t handle; /*!< The characteristic or descriptor handle */
|
||||
} reg_for_notify; /*!< Gatt client callback param of ESP_GATTC_REG_FOR_NOTIFY_EVT */
|
||||
|
||||
/**
|
||||
@ -241,8 +193,7 @@ typedef union {
|
||||
*/
|
||||
struct gattc_unreg_for_notify_evt_param {
|
||||
esp_gatt_status_t status; /*!< Operation status */
|
||||
esp_gatt_srvc_id_t srvc_id; /*!< Service id, include service uuid and other information */
|
||||
esp_gatt_id_t char_id; /*!< Characteristic id, include characteristic uuid and other information */
|
||||
uint16_t handle; /*!< The characteristic or descriptor handle */
|
||||
} unreg_for_notify; /*!< Gatt client callback param of ESP_GATTC_UNREG_FOR_NOTIFY_EVT */
|
||||
|
||||
/**
|
||||
@ -383,76 +334,233 @@ esp_err_t esp_ble_gattc_send_mtu_req (esp_gatt_if_t gattc_if, uint16_t conn_id);
|
||||
*/
|
||||
esp_err_t esp_ble_gattc_search_service(esp_gatt_if_t gattc_if, uint16_t conn_id, esp_bt_uuid_t *filter_uuid);
|
||||
|
||||
|
||||
/**
|
||||
* @brief This function is called to find the first characteristic of the
|
||||
* service on the given server.
|
||||
* @brief Find all the service with the given service uuid in the gattc cache, if the svc_uuid is NULL, find all the service.
|
||||
* Note: It just get service from local cache, won't get from remote devices. If want to get it from remote device, need
|
||||
* to used the esp_ble_gattc_search_service.
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id: connection ID which identify the server.
|
||||
* @param[in] srvc_id: service ID
|
||||
* @param[in] start_char_id: the start characteristic ID
|
||||
* @return
|
||||
* - ESP_OK: success
|
||||
* - other: failed
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_ble_gattc_get_characteristic(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
esp_gatt_srvc_id_t *srvc_id,
|
||||
esp_gatt_id_t *start_char_id);
|
||||
|
||||
/**
|
||||
* @brief This function is called to find the descriptor of the
|
||||
* service on the given server.
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id: connection ID which identify the server.
|
||||
* @param[in] srvc_id: the service ID of which the characteristic is belonged to.
|
||||
* @param[in] char_id: Characteristic ID, if NULL find the first available
|
||||
* characteristic.
|
||||
* @param[in] start_descr_id: the start descriptor id
|
||||
* @param[in] svc_uuid: the pointer to the service uuid.
|
||||
* @param[out] result: The pointer to the service whith has been found in the gattc cache.
|
||||
* @param[inout] count: input the number of service want to find,
|
||||
* it will output the number of service has been found in the gattc cache with the given service uuid.
|
||||
* @param[in] offset: Offset of the service position to get.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: success
|
||||
* - other: failed
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_ble_gattc_get_descriptor(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
esp_gatt_srvc_id_t *srvc_id,
|
||||
esp_gatt_id_t *char_id,
|
||||
esp_gatt_id_t *start_descr_id);
|
||||
|
||||
esp_gatt_status_t esp_ble_gattc_get_service(esp_gatt_if_t gattc_if, uint16_t conn_id, esp_bt_uuid_t *svc_uuid,
|
||||
esp_gattc_service_elem_t *result, uint16_t *count, uint16_t offset);
|
||||
|
||||
/**
|
||||
* @brief This function is called to find the first characteristic of the
|
||||
* service on the given server.
|
||||
* @brief Find all the characteristic with the given service in the gattc cache
|
||||
* Note: It just get characteristic from local cache, won't get from remote devices.
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id: connection ID which identify the server.
|
||||
* @param[in] srvc_id: the service ID of which the characteristic is belonged to.
|
||||
* @param[in] start_incl_srvc_id: the start include service id
|
||||
* @param[in] start_handle: the attribute start handle.
|
||||
* @param[in] end_handle: the attribute end handle
|
||||
* @param[out] result: The pointer to the charateristic in the service.
|
||||
* @param[inout] count: input the number of characteristic want to find,
|
||||
* it will output the number of characteristic has been found in the gattc cache with the given service.
|
||||
* @param[in] offset: Offset of the characteristic position to get.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: success
|
||||
* - other: failed
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_ble_gattc_get_included_service(esp_gatt_if_t gattc_if,
|
||||
esp_gatt_status_t esp_ble_gattc_get_all_char(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
esp_gatt_srvc_id_t *srvc_id,
|
||||
esp_gatt_srvc_id_t *start_incl_srvc_id);
|
||||
uint16_t start_handle,
|
||||
uint16_t end_handle,
|
||||
esp_gattc_char_elem_t *result,
|
||||
uint16_t *count, uint16_t offset);
|
||||
|
||||
/**
|
||||
* @brief Find all the descriptor with the given characteristic in the gattc cache
|
||||
* Note: It just get descriptor from local cache, won't get from remote devices.
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id: connection ID which identify the server.
|
||||
* @param[in] char_handle: the given characteristic handle
|
||||
* @param[out] result: The pointer to the descriptor in the characteristic.
|
||||
* @param[inout] count: input the number of descriptor want to find,
|
||||
* it will output the number of descriptor has been found in the gattc cache with the given characteristic.
|
||||
* @param[in] offset: Offset of the descriptor position to get.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: success
|
||||
* - other: failed
|
||||
*
|
||||
*/
|
||||
esp_gatt_status_t esp_ble_gattc_get_all_descr(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
uint16_t char_handle,
|
||||
esp_gattc_descr_elem_t *result,
|
||||
uint16_t *count, uint16_t offset);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Find the characteristic with the given characteristic uuid in the gattc cache
|
||||
* Note: It just get characteristic from local cache, won't get from remote devices.
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id: connection ID which identify the server.
|
||||
* @param[in] start_handle: the attribute start handle
|
||||
* @param[in] end_handle: the attribute end handle
|
||||
* @param[in] char_uuid: the characteristic uuid
|
||||
* @param[out] result: The pointer to the characteristic in the service.
|
||||
* @param[inout] count: input the number of characteristic want to find,
|
||||
* it will output the number of characteristic has been found in the gattc cache with the given service.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: success
|
||||
* - other: failed
|
||||
*
|
||||
*/
|
||||
esp_gatt_status_t esp_ble_gattc_get_char_by_uuid(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
uint16_t start_handle,
|
||||
uint16_t end_handle,
|
||||
esp_bt_uuid_t char_uuid,
|
||||
esp_gattc_char_elem_t *result,
|
||||
uint16_t *count);
|
||||
|
||||
/**
|
||||
* @brief Find the descriptor with the given characteristic uuid in the gattc cache
|
||||
* Note: It just get descriptor from local cache, won't get from remote devices.
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id: connection ID which identify the server.
|
||||
* @param[in] start_handle: the attribute start handle
|
||||
* @param[in] end_handle: the attribute end handle
|
||||
* @param[in] char_uuid: the characteristic uuid.
|
||||
* @param[in] descr_uuid: the descriptor uuid.
|
||||
* @param[out] result: The pointer to the descriptor in the given characteristic.
|
||||
* @param[inout] count: input the number of descriptor want to find,
|
||||
* it will output the number of descriptor has been found in the gattc cache with the given characteristic.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: success
|
||||
* - other: failed
|
||||
*
|
||||
*/
|
||||
esp_gatt_status_t esp_ble_gattc_get_descr_by_uuid(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
uint16_t start_handle,
|
||||
uint16_t end_handle,
|
||||
esp_bt_uuid_t char_uuid,
|
||||
esp_bt_uuid_t descr_uuid,
|
||||
esp_gattc_descr_elem_t *result,
|
||||
uint16_t *count);
|
||||
|
||||
/**
|
||||
* @brief Find the descriptor with the given characteristic handle in the gattc cache
|
||||
* Note: It just get descriptor from local cache, won't get from remote devices.
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id: connection ID which identify the server.
|
||||
* @param[in] char_handle: the characteristic handle.
|
||||
* @param[in] descr_uuid: the descriptor uuid.
|
||||
* @param[out] result: The pointer to the descriptor in the given characteristic.
|
||||
* @param[inout] count: input the number of descriptor want to find,
|
||||
* it will output the number of descriptor has been found in the gattc cache with the given characteristic.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: success
|
||||
* - other: failed
|
||||
*
|
||||
*/
|
||||
esp_gatt_status_t esp_ble_gattc_get_descr_by_char_handle(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
uint16_t char_handle,
|
||||
esp_bt_uuid_t descr_uuid,
|
||||
esp_gattc_descr_elem_t *result,
|
||||
uint16_t *count);
|
||||
|
||||
/**
|
||||
* @brief Find the include service with the given service handle in the gattc cache
|
||||
* Note: It just get include service from local cache, won't get from remote devices.
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id: connection ID which identify the server.
|
||||
* @param[in] start_handle: the attribute start handle
|
||||
* @param[in] end_handle: the attribute end handle
|
||||
* @param[in] incl_uuid: the include service uuid
|
||||
* @param[out] result: The pointer to the include service in the given service.
|
||||
* @param[inout] count: input the number of include service want to find,
|
||||
* it will output the number of include service has been found in the gattc cache with the given service.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: success
|
||||
* - other: failed
|
||||
*
|
||||
*/
|
||||
esp_gatt_status_t esp_ble_gattc_get_include_service(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
uint16_t start_handle,
|
||||
uint16_t end_handle,
|
||||
esp_bt_uuid_t *incl_uuid,
|
||||
esp_gattc_incl_svc_elem_t *result,
|
||||
uint16_t *count);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Find the attribute count with the given service or characteristic in the gattc cache
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id: connection ID which identify the server.
|
||||
* @param[in] type: the attribute type.
|
||||
* @param[in] start_handle: the attribute start handle, if the type is ESP_GATT_DB_DESCRIPTOR, this parameter should be ignore
|
||||
* @param[in] end_handle: the attribute end handle, if the type is ESP_GATT_DB_DESCRIPTOR, this parameter should be ignore
|
||||
* @param[in] char_handle: the characteristic handle, this parameter valid when the type is ESP_GATT_DB_DESCRIPTOR. If the type
|
||||
* isn't ESP_GATT_DB_DESCRIPTOR, this parameter should be ignore.
|
||||
* @param[out] count: output the number of attribute has been found in the gattc cache with the given attribute type.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: success
|
||||
* - other: failed
|
||||
*
|
||||
*/
|
||||
esp_gatt_status_t esp_ble_gattc_get_attr_count(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
esp_gatt_db_attr_type_t type,
|
||||
uint16_t start_handle,
|
||||
uint16_t end_handle,
|
||||
uint16_t char_handle,
|
||||
uint16_t *count);
|
||||
|
||||
/**
|
||||
* @brief This function is called to get the GATT database.
|
||||
* Note: It just get attribute data base from local cache, won't get from remote devices.
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] start_handle: the attribute start handle
|
||||
* @param[in] end_handle: the attribute end handle
|
||||
* @param[in] conn_id: connection ID which identify the server.
|
||||
* @param[in] db: output parameter which will contain the GATT database copy.
|
||||
* Caller is responsible for freeing it.
|
||||
* @param[in] count: number of elements in database.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: success
|
||||
* - other: failed
|
||||
*
|
||||
*/
|
||||
esp_gatt_status_t esp_ble_gattc_get_db(esp_gatt_if_t gattc_if, uint16_t conn_id, uint16_t start_handle, uint16_t end_handle,
|
||||
esp_gattc_db_elem_t *db, uint16_t *count);
|
||||
|
||||
/**
|
||||
* @brief This function is called to read a service's characteristics of
|
||||
* the given characteristic ID
|
||||
* the given characteristic handle
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id : connection ID.
|
||||
* @param[in] srvc_id : service ID.
|
||||
* @param[in] char_id : characteristic ID to read.
|
||||
* @param[in] handle : characteritic handle to read.
|
||||
* @param[in] auth_req : authenticate request type
|
||||
*
|
||||
* @return
|
||||
@ -462,8 +570,25 @@ esp_err_t esp_ble_gattc_get_included_service(esp_gatt_if_t gattc_if,
|
||||
*/
|
||||
esp_err_t esp_ble_gattc_read_char (esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
esp_gatt_srvc_id_t *srvc_id,
|
||||
esp_gatt_id_t *char_id,
|
||||
uint16_t handle,
|
||||
esp_gatt_auth_req_t auth_req);
|
||||
|
||||
/**
|
||||
* @brief This function is called to read multiple characteristic or
|
||||
* characteristic descriptors.
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id : connection ID.
|
||||
* @param[in] read_multi : pointer to the read multiple parameter.
|
||||
* @param[in] auth_req : authenticate request type
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: success
|
||||
* - other: failed
|
||||
*
|
||||
*/
|
||||
esp_err_t esp_ble_gattc_read_multiple(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id, esp_gattc_multi_t *read_multi,
|
||||
esp_gatt_auth_req_t auth_req);
|
||||
|
||||
|
||||
@ -472,9 +597,7 @@ esp_err_t esp_ble_gattc_read_char (esp_gatt_if_t gattc_if,
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id : connection ID.
|
||||
* @param[in] srvc_id : service ID.
|
||||
* @param[in] char_id : characteristic ID to read.
|
||||
* @param[in] descr_id : characteristic descriptor ID to read.
|
||||
* @param[in] handle : descriptor handle to read.
|
||||
* @param[in] auth_req : authenticate request type
|
||||
*
|
||||
* @return
|
||||
@ -484,9 +607,7 @@ esp_err_t esp_ble_gattc_read_char (esp_gatt_if_t gattc_if,
|
||||
*/
|
||||
esp_err_t esp_ble_gattc_read_char_descr (esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
esp_gatt_srvc_id_t *srvc_id,
|
||||
esp_gatt_id_t *char_id,
|
||||
esp_gatt_id_t *descr_id,
|
||||
uint16_t handle,
|
||||
esp_gatt_auth_req_t auth_req);
|
||||
|
||||
|
||||
@ -495,8 +616,7 @@ esp_err_t esp_ble_gattc_read_char_descr (esp_gatt_if_t gattc_if,
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id : connection ID.
|
||||
* @param[in] srvc_id : service ID.
|
||||
* @param[in] char_id : characteristic ID to write.
|
||||
* @param[in] handle : characteristic handle to write.
|
||||
* @param[in] value_len: length of the value to be written.
|
||||
* @param[in] value : the value to be written.
|
||||
* @param[in] write_type : the type of attribute write operation.
|
||||
@ -509,8 +629,7 @@ esp_err_t esp_ble_gattc_read_char_descr (esp_gatt_if_t gattc_if,
|
||||
*/
|
||||
esp_err_t esp_ble_gattc_write_char( esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
esp_gatt_srvc_id_t *srvc_id,
|
||||
esp_gatt_id_t *char_id,
|
||||
uint16_t handle,
|
||||
uint16_t value_len,
|
||||
uint8_t *value,
|
||||
esp_gatt_write_type_t write_type,
|
||||
@ -522,9 +641,7 @@ esp_err_t esp_ble_gattc_write_char( esp_gatt_if_t gattc_if,
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id : connection ID
|
||||
* @param[in] srvc_id : service ID.
|
||||
* @param[in] char_id : characteristic ID.
|
||||
* @param[in] descr_id : characteristic descriptor ID to write.
|
||||
* @param[in] handle : descriptor hadle to write.
|
||||
* @param[in] value_len: length of the value to be written.
|
||||
* @param[in] value : the value to be written.
|
||||
* @param[in] write_type : the type of attribute write operation.
|
||||
@ -537,9 +654,7 @@ esp_err_t esp_ble_gattc_write_char( esp_gatt_if_t gattc_if,
|
||||
*/
|
||||
esp_err_t esp_ble_gattc_write_char_descr (esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
esp_gatt_srvc_id_t *srvc_id,
|
||||
esp_gatt_id_t *char_id,
|
||||
esp_gatt_id_t *descr_id,
|
||||
uint16_t handle,
|
||||
uint16_t value_len,
|
||||
uint8_t *value,
|
||||
esp_gatt_write_type_t write_type,
|
||||
@ -551,8 +666,7 @@ esp_err_t esp_ble_gattc_write_char_descr (esp_gatt_if_t gattc_if,
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id : connection ID.
|
||||
* @param[in] srvc_id : service ID.
|
||||
* @param[in] char_id : GATT characteristic ID of the service.
|
||||
* @param[in] handle : charateristic handle to prepare write.
|
||||
* @param[in] offset : offset of the write value.
|
||||
* @param[in] value_len: length of the value to be written.
|
||||
* @param[in] value : the value to be written.
|
||||
@ -565,8 +679,7 @@ esp_err_t esp_ble_gattc_write_char_descr (esp_gatt_if_t gattc_if,
|
||||
*/
|
||||
esp_err_t esp_ble_gattc_prepare_write(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
esp_gatt_srvc_id_t *srvc_id,
|
||||
esp_gatt_id_t *char_id,
|
||||
uint16_t handle,
|
||||
uint16_t offset,
|
||||
uint16_t value_len,
|
||||
uint8_t *value,
|
||||
@ -578,9 +691,7 @@ esp_err_t esp_ble_gattc_prepare_write(esp_gatt_if_t gattc_if,
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] conn_id : connection ID.
|
||||
* @param[in] srvc_id : service ID.
|
||||
* @param[in] char_id : GATT characteristic ID of the service.
|
||||
* @param[in] descr_id : characteristic descriptor ID to write.
|
||||
* @param[in] handle : characteristic descriptor hanlde to prepare write.
|
||||
* @param[in] offset : offset of the write value.
|
||||
* @param[in] value_len: length of the value to be written.
|
||||
* @param[in] value : the value to be written.
|
||||
@ -593,9 +704,7 @@ esp_err_t esp_ble_gattc_prepare_write(esp_gatt_if_t gattc_if,
|
||||
*/
|
||||
esp_err_t esp_ble_gattc_prepare_write_char_descr(esp_gatt_if_t gattc_if,
|
||||
uint16_t conn_id,
|
||||
esp_gatt_srvc_id_t *srvc_id,
|
||||
esp_gatt_id_t *char_id,
|
||||
esp_gatt_id_t *descr_id,
|
||||
uint16_t handle,
|
||||
uint16_t offset,
|
||||
uint16_t value_len,
|
||||
uint8_t *value,
|
||||
@ -622,8 +731,7 @@ esp_err_t esp_ble_gattc_execute_write (esp_gatt_if_t gattc_if, uint16_t conn_id,
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] server_bda : target GATT server.
|
||||
* @param[in] srvc_id : pointer to GATT service ID.
|
||||
* @param[in] char_id : pointer to GATT characteristic ID.
|
||||
* @param[in] handle : GATT characteristic handle.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: registration succeeds
|
||||
@ -632,8 +740,7 @@ esp_err_t esp_ble_gattc_execute_write (esp_gatt_if_t gattc_if, uint16_t conn_id,
|
||||
*/
|
||||
esp_err_t esp_ble_gattc_register_for_notify (esp_gatt_if_t gattc_if,
|
||||
esp_bd_addr_t server_bda,
|
||||
esp_gatt_srvc_id_t *srvc_id,
|
||||
esp_gatt_id_t *char_id);
|
||||
uint16_t handle);
|
||||
|
||||
|
||||
/**
|
||||
@ -641,8 +748,7 @@ esp_err_t esp_ble_gattc_register_for_notify (esp_gatt_if_t gattc_if,
|
||||
*
|
||||
* @param[in] gattc_if: Gatt client access interface.
|
||||
* @param[in] server_bda : target GATT server.
|
||||
* @param[in] srvc_id : pointer to GATT service ID.
|
||||
* @param[in] char_id : pointer to GATT characteristic ID.
|
||||
* @param[in] handle : GATT characteristic handle.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: unregister succeeds
|
||||
@ -651,8 +757,7 @@ esp_err_t esp_ble_gattc_register_for_notify (esp_gatt_if_t gattc_if,
|
||||
*/
|
||||
esp_err_t esp_ble_gattc_unregister_for_notify (esp_gatt_if_t gattc_if,
|
||||
esp_bd_addr_t server_bda,
|
||||
esp_gatt_srvc_id_t *srvc_id,
|
||||
esp_gatt_id_t *char_id);
|
||||
uint16_t handle);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
#include "bt_types.h"
|
||||
#include "allocator.h"
|
||||
#include "fixed_queue.h"
|
||||
#include "osi.h"
|
||||
#include "future.h"
|
||||
///// LEGACY DEFINITIONS /////
|
||||
|
@ -124,6 +124,8 @@ typedef UINT8 tL2CAP_CHNL_DATA_RATE;
|
||||
*/
|
||||
#define L2C_INVALID_PSM(psm) (((psm) & 0x0101) != 0x0001)
|
||||
#define L2C_IS_VALID_PSM(psm) (((psm) & 0x0101) == 0x0001)
|
||||
#define L2C_IS_VALID_LE_PSM(psm) (((psm) > 0x0000) && ((psm) < 0x0100))
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
** Type Definitions
|
||||
@ -164,6 +166,17 @@ typedef struct {
|
||||
UINT16 flags; /* bit 0: 0-no continuation, 1-continuation */
|
||||
} tL2CAP_CFG_INFO;
|
||||
|
||||
/* Define a structure to hold the configuration parameter for LE L2CAP connection
|
||||
** oriented channels.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
UINT16 mtu;
|
||||
UINT16 mps;
|
||||
UINT16 credits;
|
||||
} tL2CAP_LE_CFG_INFO;
|
||||
|
||||
|
||||
/* L2CAP channel configured field bitmap */
|
||||
#define L2CAP_CH_CFG_MASK_MTU 0x0001
|
||||
#define L2CAP_CH_CFG_MASK_QOS 0x0002
|
||||
@ -486,6 +499,72 @@ extern BOOLEAN L2CA_DisconnectReq (UINT16 cid);
|
||||
extern BOOLEAN L2CA_DisconnectRsp (UINT16 cid);
|
||||
#endif ///CLASSIC_BT_INCLUDED == TRUE
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function L2CA_RegisterLECoc
|
||||
**
|
||||
** Description Other layers call this function to register for L2CAP
|
||||
** Connection Oriented Channel.
|
||||
**
|
||||
** Returns PSM to use or zero if error. Typically, the PSM returned
|
||||
** is the same as was passed in, but for an outgoing-only
|
||||
** connection to a dynamic PSM, a "virtual" PSM is returned
|
||||
** and should be used in the calls to L2CA_ConnectLECocReq()
|
||||
** and BTM_SetSecurityLevel().
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern UINT16 L2CA_RegisterLECoc (UINT16 psm, tL2CAP_APPL_INFO *p_cb_info);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function L2CA_DeregisterLECoc
|
||||
**
|
||||
** Description Other layers call this function to deregister for L2CAP
|
||||
** Connection Oriented Channel.
|
||||
**
|
||||
** Returns void
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern void L2CA_DeregisterLECoc (UINT16 psm);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function L2CA_ConnectLECocReq
|
||||
**
|
||||
** Description Higher layers call this function to create an L2CAP LE COC.
|
||||
** Note that the connection is not established at this time, but
|
||||
** connection establishment gets started. The callback function
|
||||
** will be invoked when connection establishes or fails.
|
||||
**
|
||||
** Returns the CID of the connection, or 0 if it failed to start
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern UINT16 L2CA_ConnectLECocReq (UINT16 psm, BD_ADDR p_bd_addr, tL2CAP_LE_CFG_INFO *p_cfg);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function L2CA_ConnectLECocRsp
|
||||
**
|
||||
** Description Higher layers call this function to accept an incoming
|
||||
** L2CAP LE COC connection, for which they had gotten an connect
|
||||
** indication callback.
|
||||
**
|
||||
** Returns TRUE for success, FALSE for failure
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN L2CA_ConnectLECocRsp (BD_ADDR p_bd_addr, UINT8 id, UINT16 lcid, UINT16 result,
|
||||
UINT16 status, tL2CAP_LE_CFG_INFO *p_cfg);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
** Function L2CA_GetPeerLECocConfig
|
||||
**
|
||||
** Description Get peers configuration for LE Connection Oriented Channel.
|
||||
**
|
||||
** Return value: TRUE if peer is connected
|
||||
**
|
||||
*******************************************************************************/
|
||||
extern BOOLEAN L2CA_GetPeerLECocConfig (UINT16 lcid, tL2CAP_LE_CFG_INFO* peer_cfg);
|
||||
|
||||
/*******************************************************************************
|
||||
**
|
||||
|
@ -34,6 +34,17 @@
|
||||
|
||||
#define L2CAP_MIN_MTU 48 /* Minimum acceptable MTU is 48 bytes */
|
||||
|
||||
/* LE credit based L2CAP connection parameters */
|
||||
#define L2CAP_LE_MIN_MTU 23
|
||||
#define L2CAP_LE_MIN_MPS 23
|
||||
#define L2CAP_LE_MAX_MPS 65533
|
||||
#define L2CAP_LE_MIN_CREDIT 0
|
||||
#define L2CAP_LE_MAX_CREDIT 65535
|
||||
#define L2CAP_LE_DEFAULT_MTU 512
|
||||
#define L2CAP_LE_DEFAULT_MPS 23
|
||||
#define L2CAP_LE_DEFAULT_CREDIT 1
|
||||
|
||||
|
||||
/* Timeouts. Since L2CAP works off a 1-second list, all are in seconds.
|
||||
*/
|
||||
#define L2CAP_LINK_ROLE_SWITCH_TOUT 10 /* 10 seconds */
|
||||
@ -240,6 +251,17 @@ typedef struct {
|
||||
tL2CAP_APPL_INFO api;
|
||||
} tL2C_RCB;
|
||||
|
||||
typedef void (tL2CAP_SEC_CBACK) (BD_ADDR bd_addr, tBT_TRANSPORT trasnport,
|
||||
void *p_ref_data, tBTM_STATUS result);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT16 psm;
|
||||
tBT_TRANSPORT transport;
|
||||
BOOLEAN is_originator;
|
||||
tL2CAP_SEC_CBACK *p_callback;
|
||||
void *p_ref_data;
|
||||
}tL2CAP_SEC_DATA;
|
||||
|
||||
#ifndef L2CAP_CBB_DEFAULT_DATA_RATE_BUFF_QUOTA
|
||||
#define L2CAP_CBB_DEFAULT_DATA_RATE_BUFF_QUOTA 100
|
||||
@ -252,6 +274,8 @@ typedef struct {
|
||||
typedef struct t_l2c_ccb {
|
||||
BOOLEAN in_use; /* TRUE when in use, FALSE when not */
|
||||
tL2C_CHNL_STATE chnl_state; /* Channel state */
|
||||
tL2CAP_LE_CFG_INFO local_conn_cfg; /* Our config for ble conn oriented channel */
|
||||
tL2CAP_LE_CFG_INFO peer_conn_cfg; /* Peer device config ble conn oriented channel */
|
||||
|
||||
struct t_l2c_ccb *p_next_ccb; /* Next CCB in the chain */
|
||||
struct t_l2c_ccb *p_prev_ccb; /* Previous CCB in the chain */
|
||||
@ -400,7 +424,8 @@ typedef struct t_l2c_linkcb {
|
||||
#if (BLE_INCLUDED == TRUE)
|
||||
tBLE_ADDR_TYPE ble_addr_type;
|
||||
UINT16 tx_data_len; /* tx data length used in data length extension */
|
||||
|
||||
fixed_queue_t *le_sec_pending_q; /* LE coc channels waiting for security check completion */
|
||||
UINT8 sec_act;
|
||||
#define L2C_BLE_CONN_UPDATE_DISABLE 0x1 /* disable update connection parameters */
|
||||
#define L2C_BLE_NEW_CONN_PARAM 0x2 /* new connection parameter to be set */
|
||||
#define L2C_BLE_UPDATE_PENDING 0x4 /* waiting for connection update finished */
|
||||
@ -488,6 +513,7 @@ typedef struct {
|
||||
UINT16 ble_round_robin_quota; /* Round-robin link quota */
|
||||
UINT16 ble_round_robin_unacked; /* Round-robin unacked */
|
||||
BOOLEAN ble_check_round_robin; /* Do a round robin check */
|
||||
tL2C_RCB ble_rcb_pool[BLE_MAX_L2CAP_CLIENTS]; /* Registration info pool */
|
||||
#endif
|
||||
|
||||
tL2CA_ECHO_DATA_CB *p_echo_data_cb; /* Echo data callback */
|
||||
@ -632,6 +658,12 @@ BOOLEAN l2c_ucd_process_event(tL2C_CCB *p_ccb, UINT16 event, void *p_data);
|
||||
#if (BLE_INCLUDED == TRUE)
|
||||
extern void l2cu_send_peer_ble_par_req (tL2C_LCB *p_lcb, UINT16 min_int, UINT16 max_int, UINT16 latency, UINT16 timeout);
|
||||
extern void l2cu_send_peer_ble_par_rsp (tL2C_LCB *p_lcb, UINT16 reason, UINT8 rem_id);
|
||||
extern void l2cu_reject_ble_connection (tL2C_LCB *p_lcb, UINT8 rem_id, UINT16 result);
|
||||
extern void l2cu_send_peer_ble_credit_based_conn_res (tL2C_CCB *p_ccb, UINT16 result);
|
||||
extern void l2cu_send_peer_ble_credit_based_conn_req (tL2C_CCB *p_ccb);
|
||||
extern void l2cu_send_peer_ble_flow_control_credit(tL2C_CCB *p_ccb, UINT16 credit_value);
|
||||
extern void l2cu_send_peer_ble_credit_based_disconn_req(tL2C_CCB *p_ccb);
|
||||
|
||||
#endif
|
||||
|
||||
extern BOOLEAN l2cu_initialize_fixed_ccb (tL2C_LCB *p_lcb, UINT16 fixed_cid, tL2CAP_FCR_OPTS *p_fcr);
|
||||
@ -649,6 +681,9 @@ extern void l2cu_send_feature_req (tL2C_CCB *p_ccb);
|
||||
extern tL2C_RCB *l2cu_allocate_rcb (UINT16 psm);
|
||||
extern tL2C_RCB *l2cu_find_rcb_by_psm (UINT16 psm);
|
||||
extern void l2cu_release_rcb (tL2C_RCB *p_rcb);
|
||||
extern tL2C_RCB *l2cu_allocate_ble_rcb (UINT16 psm);
|
||||
extern tL2C_RCB *l2cu_find_ble_rcb_by_psm (UINT16 psm);
|
||||
|
||||
|
||||
extern UINT8 l2cu_process_peer_cfg_req (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg);
|
||||
extern void l2cu_process_peer_cfg_rsp (tL2C_CCB *p_ccb, tL2CAP_CFG_INFO *p_cfg);
|
||||
@ -748,6 +783,13 @@ extern void l2cble_process_conn_update_evt (UINT16 handle, UINT8 status, UINT16
|
||||
UINT16 conn_latency, UINT16 conn_timeout);
|
||||
extern void l2cble_get_conn_param_format_err_from_contoller(UINT8 status, UINT16 handle);
|
||||
|
||||
extern void l2cble_credit_based_conn_req (tL2C_CCB *p_ccb);
|
||||
extern void l2cble_credit_based_conn_res (tL2C_CCB *p_ccb, UINT16 result);
|
||||
extern void l2cble_send_peer_disc_req(tL2C_CCB *p_ccb);
|
||||
extern void l2cble_send_flow_control_credit(tL2C_CCB *p_ccb, UINT16 credit_value);
|
||||
extern BOOLEAN l2ble_sec_access_req(BD_ADDR bd_addr, UINT16 psm, BOOLEAN is_originator, tL2CAP_SEC_CBACK *p_callback, void *p_ref_data);
|
||||
|
||||
|
||||
#if (defined BLE_LLT_INCLUDED) && (BLE_LLT_INCLUDED == TRUE)
|
||||
extern void l2cble_process_rc_param_request_evt(UINT16 handle, UINT16 int_min, UINT16 int_max,
|
||||
UINT16 latency, UINT16 timeout);
|
||||
|
@ -41,6 +41,10 @@
|
||||
|
||||
#define L2CAP_CMD_BLE_UPDATE_REQ 0x12
|
||||
#define L2CAP_CMD_BLE_UPDATE_RSP 0x13
|
||||
#define L2CAP_CMD_BLE_CREDIT_BASED_CONN_REQ 0x14
|
||||
#define L2CAP_CMD_BLE_CREDIT_BASED_CONN_RES 0x15
|
||||
#define L2CAP_CMD_BLE_FLOW_CTRL_CREDIT 0x16
|
||||
|
||||
|
||||
|
||||
/* Define some packet and header lengths
|
||||
@ -70,6 +74,11 @@
|
||||
#define L2CAP_CMD_BLE_UPD_REQ_LEN 8 /* Min and max interval, latency, tout */
|
||||
#define L2CAP_CMD_BLE_UPD_RSP_LEN 2 /* Result */
|
||||
|
||||
#define L2CAP_CMD_BLE_CREDIT_BASED_CONN_REQ_LEN 10 /* LE_PSM, SCID, MTU, MPS, Init Credit */
|
||||
#define L2CAP_CMD_BLE_CREDIT_BASED_CONN_RES_LEN 10 /* DCID, MTU, MPS, Init credit, Result */
|
||||
#define L2CAP_CMD_BLE_FLOW_CTRL_CREDIT_LEN 4 /* CID, Credit */
|
||||
|
||||
|
||||
|
||||
/* Define the packet boundary flags
|
||||
*/
|
||||
|
@ -78,6 +78,7 @@ typedef enum {
|
||||
ESP_BT_CONTROLLER_STATUS_IDLE = 0,
|
||||
ESP_BT_CONTROLLER_STATUS_INITED,
|
||||
ESP_BT_CONTROLLER_STATUS_ENABLED,
|
||||
ESP_BT_CONTROLLER_STATUS_SHUTDOWN,
|
||||
ESP_BT_CONTROLLER_STATUS_NUM,
|
||||
} esp_bt_controller_status_t;
|
||||
|
||||
@ -102,11 +103,10 @@ typedef enum {
|
||||
ESP_BLE_PWR_TYPE_CONN_HDL6 = 6, /*!< For connection handle 6 */
|
||||
ESP_BLE_PWR_TYPE_CONN_HDL7 = 7, /*!< For connection handle 7 */
|
||||
ESP_BLE_PWR_TYPE_CONN_HDL8 = 8, /*!< For connection handle 8 */
|
||||
ESP_BLE_PWR_TYPE_CONN_HDL9 = 9, /*!< For connection handle 9 */
|
||||
ESP_BLE_PWR_TYPE_ADV = 10, /*!< For advertising */
|
||||
ESP_BLE_PWR_TYPE_SCAN = 11, /*!< For scan */
|
||||
ESP_BLE_PWR_TYPE_DEFAULT = 12, /*!< For default, if not set other, it will use default value */
|
||||
ESP_BLE_PWR_TYPE_NUM = 13, /*!< TYPE numbers */
|
||||
ESP_BLE_PWR_TYPE_ADV = 9, /*!< For advertising */
|
||||
ESP_BLE_PWR_TYPE_SCAN = 10, /*!< For scan */
|
||||
ESP_BLE_PWR_TYPE_DEFAULT = 11, /*!< For default, if not set other, it will use default value */
|
||||
ESP_BLE_PWR_TYPE_NUM = 12, /*!< TYPE numbers */
|
||||
} esp_ble_power_type_t;
|
||||
|
||||
/**
|
||||
@ -159,20 +159,20 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg);
|
||||
esp_err_t esp_bt_controller_deinit(void);
|
||||
|
||||
/**
|
||||
* @brief Enable BT controller
|
||||
* @brief Enable BT controller.
|
||||
* Due to a known issue, you cannot call esp_bt_controller_enable() a second time
|
||||
* to change the controller mode dynamically. To change controller mode, call
|
||||
* esp_bt_controller_disable() and then call esp_bt_controller_enable() with the new mode.
|
||||
* @param mode : the mode(BLE/BT/BTDM) to enable.
|
||||
* Now only support BTDM.
|
||||
* @return ESP_OK - success, other - failed
|
||||
*/
|
||||
esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode);
|
||||
|
||||
/**
|
||||
* @brief Disable BT controller
|
||||
* @param mode : the mode(BLE/BT/BTDM) to disable.
|
||||
* Now only support BTDM.
|
||||
* @return ESP_OK - success, other - failed
|
||||
*/
|
||||
esp_err_t esp_bt_controller_disable(esp_bt_mode_t mode);
|
||||
esp_err_t esp_bt_controller_disable(void);
|
||||
|
||||
/**
|
||||
* @brief Get BT controller is initialised/de-initialised/enabled/disabled
|
||||
@ -208,6 +208,36 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len);
|
||||
*/
|
||||
void esp_vhci_host_register_callback(const esp_vhci_host_callback_t *callback);
|
||||
|
||||
/** @brief esp_bt_controller_mem_release
|
||||
* release the memory by mode, if never use the bluetooth mode
|
||||
* it can release the .bbs, .data and other section to heap.
|
||||
* The total size is about 70k bytes.
|
||||
*
|
||||
* If esp_bt_controller_enable(mode) has already been called, calling
|
||||
* esp_bt_controller_mem_release(ESP_BT_MODE_BTDM) will automatically
|
||||
* release all memory which is not needed for the currently enabled
|
||||
* Bluetooth controller mode.
|
||||
*
|
||||
* For example, calling esp_bt_controller_enable(ESP_BT_MODE_BLE) then
|
||||
* esp_bt_controller_mem_release(ESP_BT_MODE_BTDM) will enable BLE modes
|
||||
* and release memory only used by BT Classic. Also, call esp_bt_controller_mem_release(ESP_BT_MODE_CLASSIC_BT)
|
||||
* is the same.
|
||||
*
|
||||
* Note that once BT controller memory is released, the process cannot be reversed.
|
||||
* If your firmware will later upgrade the Bluetooth controller mode (BLE -> BT Classic or disabled -> enabled)
|
||||
* then do not call this function.
|
||||
*
|
||||
* If user never use bluetooth controller, could call esp_bt_controller_mem_release(ESP_BT_MODE_BTDM)
|
||||
* before esp_bt_controller_init or after esp_bt_controller_deinit.
|
||||
*
|
||||
* For example, user only use bluetooth to config SSID and PASSWORD of WIFI, after config, will never use bluetooth.
|
||||
* Then, could call esp_bt_controller_mem_release(ESP_BT_MODE_BTDM) after esp_bt_controller_deinit.
|
||||
*
|
||||
* @param mode : the mode want to release memory
|
||||
* @return ESP_OK - success, other - failed
|
||||
*/
|
||||
esp_err_t esp_bt_controller_mem_release(esp_bt_mode_t mode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -54,6 +54,7 @@
|
||||
#define CONFIG_ULP_COPROC_RESERVE_MEM 512
|
||||
#define CONFIG_ESPTOOLPY_BAUD 921600
|
||||
#define CONFIG_INT_WDT_CHECK_CPU1 1
|
||||
#define CONFIG_FLASHMODE_DIO 1
|
||||
#define CONFIG_ESPTOOLPY_AFTER_RESET 1
|
||||
#define CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED 1
|
||||
#define CONFIG_TOOLPREFIX "xtensa-esp32-elf-"
|
||||
@ -95,7 +96,6 @@
|
||||
#define CONFIG_LOG_DEFAULT_LEVEL 1
|
||||
#define CONFIG_TIMER_QUEUE_LENGTH 10
|
||||
#define CONFIG_MAKE_WARN_UNDEFINED_VARIABLES 1
|
||||
#define CONFIG_BOOTLOADER_SPI_WP_PIN 7
|
||||
#define CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM 0
|
||||
#define CONFIG_MBEDTLS_CCM_C 1
|
||||
#define CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER 20
|
||||
@ -121,7 +121,6 @@
|
||||
#define CONFIG_PARTITION_TABLE_SINGLE_APP 1
|
||||
#define CONFIG_ESP32_WIFI_RX_BA_WIN 6
|
||||
#define CONFIG_MBEDTLS_X509_CSR_PARSE_C 1
|
||||
#define CONFIG_FLASHMODE_QIO 1
|
||||
#define CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA 1
|
||||
#define CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE 2048
|
||||
#define CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY 2000
|
||||
|
@ -269,6 +269,20 @@ esp_err_t uart_set_line_inverse(uart_port_t uart_num, uint32_t inverse_mask);
|
||||
*/
|
||||
esp_err_t uart_set_hw_flow_ctrl(uart_port_t uart_num, uart_hw_flowcontrol_t flow_ctrl, uint8_t rx_thresh);
|
||||
|
||||
/**
|
||||
* @brief Set software flow control.
|
||||
*
|
||||
* @param uart_num UART_NUM_0, UART_NUM_1 or UART_NUM_2
|
||||
* @param enable switch on or off
|
||||
* @param rx_thresh_xon low water mark
|
||||
* @param rx_thresh_xoff high water mark
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK Success
|
||||
* - ESP_FAIL Parameter error
|
||||
*/
|
||||
esp_err_t uart_set_sw_flow_ctrl(uart_port_t uart_num, bool enable, uint8_t rx_thresh_xon, uint8_t rx_thresh_xoff);
|
||||
|
||||
/**
|
||||
* @brief Get hardware flow control mode
|
||||
*
|
||||
@ -587,7 +601,7 @@ int uart_write_bytes_with_break(uart_port_t uart_num, const char* src, size_t si
|
||||
int uart_read_bytes(uart_port_t uart_num, uint8_t* buf, uint32_t length, TickType_t ticks_to_wait);
|
||||
|
||||
/**
|
||||
* @brief UART ring buffer flush
|
||||
* @brief UART ring buffer flush. This will discard all data in the UART RX buffer.
|
||||
*
|
||||
* @param uart_num UART_NUM_0, UART_NUM_1 or UART_NUM_2
|
||||
*
|
||||
|
@ -27,6 +27,10 @@ void esp_dport_access_int_init(void);
|
||||
void esp_dport_access_int_pause(void);
|
||||
void esp_dport_access_int_resume(void);
|
||||
|
||||
//This routine does not stop the dport routines in any way that is recoverable. Please
|
||||
//only call in case of panic().
|
||||
void esp_dport_access_int_abort(void);
|
||||
|
||||
#if defined(BOOTLOADER_BUILD) || defined(CONFIG_FREERTOS_UNICORE) || !defined(ESP_PLATFORM)
|
||||
#define DPORT_STALL_OTHER_CPU_START()
|
||||
#define DPORT_STALL_OTHER_CPU_END()
|
||||
|
315
tools/sdk/include/esp32/esp_now.h
Normal file
315
tools/sdk/include/esp32/esp_now.h
Normal file
@ -0,0 +1,315 @@
|
||||
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef __ESP_NOW_H__
|
||||
#define __ESP_NOW_H__
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "esp_err.h"
|
||||
#include "esp_wifi_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** \defgroup WiFi_APIs WiFi Related APIs
|
||||
* @brief WiFi APIs
|
||||
*/
|
||||
|
||||
/** @addtogroup WiFi_APIs
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** \defgroup ESPNOW_APIs ESPNOW APIs
|
||||
* @brief ESP32 ESPNOW APIs
|
||||
*
|
||||
*/
|
||||
|
||||
/** @addtogroup ESPNOW_APIs
|
||||
* @{
|
||||
*/
|
||||
|
||||
#define ESP_ERR_ESPNOW_BASE (ESP_ERR_WIFI_BASE + 101) /*!< ESPNOW error number base. */
|
||||
#define ESP_ERR_ESPNOW_NOT_INIT (ESP_ERR_ESPNOW_BASE) /*!< ESPNOW is not initialized. */
|
||||
#define ESP_ERR_ESPNOW_ARG (ESP_ERR_ESPNOW_BASE + 1) /*!< Invalid argument */
|
||||
#define ESP_ERR_ESPNOW_NO_MEM (ESP_ERR_ESPNOW_BASE + 2) /*!< Out of memory */
|
||||
#define ESP_ERR_ESPNOW_FULL (ESP_ERR_ESPNOW_BASE + 3) /*!< ESPNOW peer list is full */
|
||||
#define ESP_ERR_ESPNOW_NOT_FOUND (ESP_ERR_ESPNOW_BASE + 4) /*!< ESPNOW peer is not found */
|
||||
#define ESP_ERR_ESPNOW_INTERNAL (ESP_ERR_ESPNOW_BASE + 5) /*!< Internal error */
|
||||
#define ESP_ERR_ESPNOW_EXIST (ESP_ERR_ESPNOW_BASE + 6) /*!< ESPNOW peer has existed */
|
||||
|
||||
#define ESP_NOW_ETH_ALEN 6 /*!< Length of ESPNOW peer MAC address */
|
||||
#define ESP_NOW_KEY_LEN 16 /*!< Length of ESPNOW peer local master key */
|
||||
|
||||
#define ESP_NOW_MAX_TOTAL_PEER_NUM 20 /*!< Maximum number of ESPNOW total peers */
|
||||
#define ESP_NOW_MAX_ENCRYPT_PEER_NUM 6 /*!< Maximum number of ESPNOW encrypted peers */
|
||||
|
||||
#define ESP_NOW_MAX_DATA_LEN 250 /*!< Maximum length of ESPNOW data which is sent very time */
|
||||
|
||||
/**
|
||||
* @brief Status of sending ESPNOW data .
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_NOW_SEND_SUCCESS = 0, /**< Send ESPNOW data successfully */
|
||||
ESP_NOW_SEND_FAIL, /**< Send ESPNOW data fail */
|
||||
} esp_now_send_status_t;
|
||||
|
||||
/**
|
||||
* @brief ESPNOW peer information parameters.
|
||||
*/
|
||||
typedef struct esp_now_peer_info {
|
||||
uint8_t peer_addr[ESP_NOW_ETH_ALEN]; /**< ESPNOW peer MAC address that is also the MAC address of station or softap */
|
||||
uint8_t lmk[ESP_NOW_KEY_LEN]; /**< ESPNOW peer local master key that is used to encrypt data */
|
||||
uint8_t channel; /**< Wi-Fi channel that peer uses to send/receive ESPNOW data. If the value is 0,
|
||||
use the current channel which station or softap is on. Otherwise, it must be
|
||||
set as the channel that station or softap is on. */
|
||||
wifi_interface_t ifidx; /**< Wi-Fi interface that peer uses to send/receive ESPNOW data */
|
||||
bool encrypt; /**< ESPNOW data that this peer sends/receives is encrypted or not */
|
||||
void *priv; /**< ESPNOW peer private data */
|
||||
} esp_now_peer_info_t;
|
||||
|
||||
/**
|
||||
* @brief Number of ESPNOW peers which exist currently.
|
||||
*/
|
||||
typedef struct esp_now_peer_num {
|
||||
int total_num; /**< Total number of ESPNOW peers, maximum value is ESP_NOW_MAX_TOTAL_PEER_NUM */
|
||||
int encrypt_num; /**< Number of encrypted ESPNOW peers, maximum value is ESP_NOW_MAX_ENCRYPT_PEER_NUM */
|
||||
} esp_now_peer_num_t;
|
||||
|
||||
/**
|
||||
* @brief Callback function of receiving ESPNOW data
|
||||
* @param mac_addr peer MAC address
|
||||
* @param data received data
|
||||
* @param data_len length of received data
|
||||
*/
|
||||
typedef void (*esp_now_recv_cb_t)(const uint8_t *mac_addr, const uint8_t *data, int data_len);
|
||||
|
||||
/**
|
||||
* @brief Callback function of sending ESPNOW data
|
||||
* @param mac_addr peer MAC address
|
||||
* @param status status of sending ESPNOW data (succeed or fail)
|
||||
*/
|
||||
typedef void (*esp_now_send_cb_t)(const uint8_t *mac_addr, esp_now_send_status_t status);
|
||||
|
||||
/**
|
||||
* @brief Initialize ESPNOW function
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_ERR_ESPNOW_INTERNAL : Internal error
|
||||
*/
|
||||
esp_err_t esp_now_init(void);
|
||||
|
||||
/**
|
||||
* @brief De-initialize ESPNOW function
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
*/
|
||||
esp_err_t esp_now_deinit(void);
|
||||
|
||||
/**
|
||||
* @brief Get the version of ESPNOW
|
||||
*
|
||||
* @param version ESPNOW version
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_ERR_ESPNOW_ARG : invalid argument
|
||||
*/
|
||||
esp_err_t esp_now_get_version(uint32_t *version);
|
||||
|
||||
/**
|
||||
* @brief Register callback function of receiving ESPNOW data
|
||||
*
|
||||
* @param cb callback function of receiving ESPNOW data
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
|
||||
* - ESP_ERR_ESPNOW_INTERNAL : internal error
|
||||
*/
|
||||
esp_err_t esp_now_register_recv_cb(esp_now_recv_cb_t cb);
|
||||
|
||||
/**
|
||||
* @brief Unregister callback function of receiving ESPNOW data
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
|
||||
*/
|
||||
esp_err_t esp_now_unregister_recv_cb(void);
|
||||
|
||||
/**
|
||||
* @brief Register callback function of sending ESPNOW data
|
||||
*
|
||||
* @param cb callback function of sending ESPNOW data
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
|
||||
* - ESP_ERR_ESPNOW_INTERNAL : internal error
|
||||
*/
|
||||
esp_err_t esp_now_register_send_cb(esp_now_send_cb_t cb);
|
||||
|
||||
/**
|
||||
* @brief Unregister callback function of sending ESPNOW data
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
|
||||
*/
|
||||
esp_err_t esp_now_unregister_send_cb(void);
|
||||
|
||||
/**
|
||||
* @brief Send ESPNOW data
|
||||
*
|
||||
* @attention 1. If peer_addr is not NULL, send data to the peer whose MAC address matches peer_addr
|
||||
* @attention 2. If peer_addr is NULL, send data to all of the peers that are added to the peer list
|
||||
* @attention 3. The maximum length of data must be less than ESP_NOW_MAX_DATA_LEN
|
||||
* @attention 4. The buffer pointed to by data argument does not need to be valid after esp_now_send returns
|
||||
*
|
||||
* @param peer_addr peer MAC address
|
||||
* @param data data to send
|
||||
* @param len length of data
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
|
||||
* - ESP_ERR_ESPNOW_ARG : invalid argument
|
||||
* - ESP_ERR_ESPNOW_INTERNAL : internal error
|
||||
* - ESP_ERR_ESPNOW_NO_MEM : out of memory
|
||||
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
|
||||
*/
|
||||
esp_err_t esp_now_send(const uint8_t *peer_addr, const uint8_t *data, size_t len);
|
||||
|
||||
/**
|
||||
* @brief Add a peer to peer list
|
||||
*
|
||||
* @param peer peer information
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
|
||||
* - ESP_ERR_ESPNOW_ARG : invalid argument
|
||||
* - ESP_ERR_ESPNOW_FULL : peer list is full
|
||||
* - ESP_ERR_ESPNOW_NO_MEM : out of memory
|
||||
* - ESP_ERR_ESPNOW_EXIST : peer has existed
|
||||
*/
|
||||
esp_err_t esp_now_add_peer(const esp_now_peer_info_t *peer);
|
||||
|
||||
/**
|
||||
* @brief Delete a peer from peer list
|
||||
*
|
||||
* @param peer_addr peer MAC address
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
|
||||
* - ESP_ERR_ESPNOW_ARG : invalid argument
|
||||
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
|
||||
*/
|
||||
esp_err_t esp_now_del_peer(const uint8_t *peer_addr);
|
||||
|
||||
/**
|
||||
* @brief Modify a peer
|
||||
*
|
||||
* @param peer peer information
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
|
||||
* - ESP_ERR_ESPNOW_ARG : invalid argument
|
||||
* - ESP_ERR_ESPNOW_FULL : peer list is full
|
||||
*/
|
||||
esp_err_t esp_now_mod_peer(const esp_now_peer_info_t *peer);
|
||||
|
||||
/**
|
||||
* @brief Get a peer whose MAC address matches peer_addr from peer list
|
||||
*
|
||||
* @param peer_addr peer MAC address
|
||||
* @param peer peer information
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
|
||||
* - ESP_ERR_ESPNOW_ARG : invalid argument
|
||||
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
|
||||
*/
|
||||
esp_err_t esp_now_get_peer(const uint8_t *peer_addr, esp_now_peer_info_t *peer);
|
||||
|
||||
/**
|
||||
* @brief Fetch a peer from peer list
|
||||
*
|
||||
* @param from_head fetch from head of list or not
|
||||
* @param peer peer information
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
|
||||
* - ESP_ERR_ESPNOW_ARG : invalid argument
|
||||
* - ESP_ERR_ESPNOW_NOT_FOUND : peer is not found
|
||||
*/
|
||||
esp_err_t esp_now_fetch_peer(bool from_head, esp_now_peer_info_t *peer);
|
||||
|
||||
/**
|
||||
* @brief Peer exists or not
|
||||
*
|
||||
* @param peer_addr peer MAC address
|
||||
*
|
||||
* @return
|
||||
* - true : peer exists
|
||||
* - false : peer not exists
|
||||
*/
|
||||
bool esp_now_is_peer_exist(const uint8_t *peer_addr);
|
||||
|
||||
/**
|
||||
* @brief Get the number of peers
|
||||
*
|
||||
* @param num number of peers
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
|
||||
* - ESP_ERR_ESPNOW_ARG : invalid argument
|
||||
*/
|
||||
esp_err_t esp_now_get_peer_num(esp_now_peer_num_t *num);
|
||||
|
||||
/**
|
||||
* @brief Set the primary master key
|
||||
*
|
||||
* @param pmk primary master key
|
||||
*
|
||||
* @attention 1. primary master key is used to encrypt local master key
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK : succeed
|
||||
* - ESP_ERR_ESPNOW_NOT_INIT : ESPNOW is not initialized
|
||||
* - ESP_ERR_ESPNOW_ARG : invalid argument
|
||||
*/
|
||||
esp_err_t esp_now_set_pmk(const uint8_t *pmk);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ESP_NOW_H__ */
|
@ -39,6 +39,12 @@ esp_err_t esp_spiram_init();
|
||||
bool esp_spiram_test();
|
||||
|
||||
|
||||
/**
|
||||
* @brief Add the initialized SPI RAM to the heap allocator.
|
||||
*/
|
||||
esp_err_t esp_spiram_add_to_heapalloc();
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get the size of the attached SPI RAM chip selected in menuconfig
|
||||
*
|
||||
|
@ -132,6 +132,16 @@ typedef struct {
|
||||
uint32_t reserved:31; /**< bit: 1..31 reserved */
|
||||
} wifi_ap_record_t;
|
||||
|
||||
typedef enum {
|
||||
WIFI_FAST_SCAN = 0, /**< Do fast scan, scan will end after find SSID match AP */
|
||||
WIFI_ALL_CHANNEL_SCAN, /**< All channel scan, scan will end after scan all the channel */
|
||||
}wifi_scan_method_t;
|
||||
|
||||
typedef enum {
|
||||
WIFI_CONNECT_AP_BY_SIGNAL = 0, /**< Sort match AP in scan list by RSSI */
|
||||
WIFI_CONNECT_AP_BY_SECURITY, /**< Sort match AP in scan list by security mode */
|
||||
}wifi_sort_method_t;
|
||||
|
||||
typedef enum {
|
||||
WIFI_PS_NONE, /**< No power save */
|
||||
WIFI_PS_MODEM, /**< Modem power save */
|
||||
@ -161,9 +171,11 @@ typedef struct {
|
||||
typedef struct {
|
||||
uint8_t ssid[32]; /**< SSID of target AP*/
|
||||
uint8_t password[64]; /**< password of target AP*/
|
||||
wifi_scan_method_t scan_method; /**< do all channel scan or fast scan */
|
||||
bool bssid_set; /**< whether set MAC address of target AP or not. Generally, station_config.bssid_set needs to be 0; and it needs to be 1 only when users need to check the MAC address of the AP.*/
|
||||
uint8_t bssid[6]; /**< MAC address of target AP*/
|
||||
uint8_t channel; /**< channel of target AP. Set to 1~13 to scan starting from the specified channel before connecting to AP. If the channel of AP is unknown, set it to 0.*/
|
||||
wifi_sort_method_t sort_method; /**< sort the connect AP in the list by rssi or security mode */
|
||||
} wifi_sta_config_t;
|
||||
|
||||
typedef union {
|
||||
|
@ -269,9 +269,7 @@ extern void vPortCleanUpTCB ( void *pxTCB );
|
||||
#define configXT_BOARD 1 /* Board mode */
|
||||
#define configXT_SIMULATOR 0
|
||||
|
||||
#if CONFIG_ESP32_ENABLE_COREDUMP
|
||||
#define configENABLE_TASK_SNAPSHOT 1
|
||||
#endif
|
||||
|
||||
#if CONFIG_SYSVIEW_ENABLE
|
||||
#ifndef __ASSEMBLER__
|
||||
|
@ -30,7 +30,8 @@
|
||||
#define MALLOC_CAP_PID5 (1<<7) ///< Memory must be mapped to PID5 memory space (PIDs are not currently used)
|
||||
#define MALLOC_CAP_PID6 (1<<8) ///< Memory must be mapped to PID6 memory space (PIDs are not currently used)
|
||||
#define MALLOC_CAP_PID7 (1<<9) ///< Memory must be mapped to PID7 memory space (PIDs are not currently used)
|
||||
#define MALLOC_CAP_SPISRAM (1<<10) ///< Memory must be in SPI SRAM
|
||||
#define MALLOC_CAP_SPIRAM (1<<10) ///< Memory must be in SPI RAM
|
||||
#define MALLOC_CAP_INTERNAL (1<<11) ///< Memory must be internal; specifically it should not disappear when flash/spiram cache is switched off
|
||||
#define MALLOC_CAP_INVALID (1<<31) ///< Memory can't be used / list end marker
|
||||
|
||||
/**
|
||||
@ -48,6 +49,7 @@
|
||||
*/
|
||||
void *heap_caps_malloc(size_t size, uint32_t caps);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Free memory previously allocated via heap_caps_malloc() or heap_caps_realloc().
|
||||
*
|
||||
|
@ -95,6 +95,62 @@ uint32_t esp_log_early_timestamp(void);
|
||||
*/
|
||||
void esp_log_write(esp_log_level_t level, const char* tag, const char* format, ...) __attribute__ ((format (printf, 3, 4)));
|
||||
|
||||
#include "esp_log_internal.h"
|
||||
|
||||
/**
|
||||
* @brief Log a buffer of hex bytes at specified level, seprated into 16 bytes each line.
|
||||
*
|
||||
* @param tag description tag
|
||||
*
|
||||
* @param buffer Pointer to the buffer array
|
||||
*
|
||||
* @param buff_len length of buffer in bytes
|
||||
*
|
||||
* @param level level of the log
|
||||
*
|
||||
*/
|
||||
#define ESP_LOG_BUFFER_HEX_LEVEL( tag, buffer, buff_len, level ) do {\
|
||||
if ( LOG_LOCAL_LEVEL >= level ) esp_log_buffer_hex_internal( tag, buffer, buff_len, level ); } while(0)
|
||||
|
||||
/**
|
||||
* @brief Log a buffer of characters at specified level, seprated into 16 bytes each line. Buffer should contain only printable characters.
|
||||
*
|
||||
* @param tag description tag
|
||||
*
|
||||
* @param buffer Pointer to the buffer array
|
||||
*
|
||||
* @param buff_len length of buffer in bytes
|
||||
*
|
||||
* @param level level of the log
|
||||
*
|
||||
*/
|
||||
#define ESP_LOG_BUFFER_CHAR_LEVEL( tag, buffer, buff_len, level ) do {\
|
||||
if ( LOG_LOCAL_LEVEL >= level ) esp_log_buffer_char_internal( tag, buffer, buff_len, level ); } while(0)
|
||||
|
||||
/**
|
||||
* @brief Dump a buffer to the log at specified level.
|
||||
*
|
||||
* The dump log shows just like the one below:
|
||||
*
|
||||
* W (195) log_example: 0x3ffb4280 45 53 50 33 32 20 69 73 20 67 72 65 61 74 2c 20 |ESP32 is great, |
|
||||
* W (195) log_example: 0x3ffb4290 77 6f 72 6b 69 6e 67 20 61 6c 6f 6e 67 20 77 69 |working along wi|
|
||||
* W (205) log_example: 0x3ffb42a0 74 68 20 74 68 65 20 49 44 46 2e 00 |th the IDF..|
|
||||
*
|
||||
* It is highly recommend to use terminals with over 102 text width.
|
||||
*
|
||||
* @param tag description tag
|
||||
*
|
||||
* @param buffer Pointer to the buffer array
|
||||
*
|
||||
* @param buff_len length of buffer in bytes
|
||||
*
|
||||
* @param level level of the log
|
||||
*/
|
||||
#define ESP_LOG_BUFFER_HEXDUMP( tag, buffer, buff_len, level ) do {\
|
||||
if ( LOG_LOCAL_LEVEL >= level ) esp_log_buffer_hexdump_internal( tag, buffer, buff_len, level); } while(0)
|
||||
|
||||
|
||||
#if (LOG_LOCAL_LEVEL >= ESP_LOG_INFO)
|
||||
/**
|
||||
* @brief Log a buffer of hex bytes at Info level
|
||||
*
|
||||
@ -104,8 +160,10 @@ void esp_log_write(esp_log_level_t level, const char* tag, const char* format, .
|
||||
*
|
||||
* @param buff_len length of buffer in bytes
|
||||
*
|
||||
* @see ``esp_log_buffer_hex_level``
|
||||
*
|
||||
*/
|
||||
void esp_log_buffer_hex(const char *tag, const void *buffer, uint16_t buff_len);
|
||||
#define ESP_LOG_BUFFER_HEX(tag, buffer, buff_len) ESP_LOG_BUFFER_HEX_LEVEL( tag, buffer, buff_len, ESP_LOG_INFO )
|
||||
|
||||
/**
|
||||
* @brief Log a buffer of characters at Info level. Buffer should contain only printable characters.
|
||||
@ -116,8 +174,20 @@ void esp_log_buffer_hex(const char *tag, const void *buffer, uint16_t buff_len);
|
||||
*
|
||||
* @param buff_len length of buffer in bytes
|
||||
*
|
||||
* @see ``esp_log_buffer_char_level``
|
||||
*
|
||||
*/
|
||||
void esp_log_buffer_char(const char *tag, const void *buffer, uint16_t buff_len);
|
||||
#define ESP_LOG_BUFFER_CHAR(tag, buffer, buff_len) ESP_LOG_BUFFER_CHAR_LEVEL( tag, buffer, buff_len, ESP_LOG_INFO )
|
||||
|
||||
#else
|
||||
#define ESP_LOG_BUFFER_HEX(tag, buffer, buff_len) {}
|
||||
#define ESP_LOG_BUFFER_CHAR(tag, buffer, buff_len) {}
|
||||
#endif
|
||||
|
||||
//to be back compatible
|
||||
#define esp_log_buffer_hex ESP_LOG_BUFFER_HEX
|
||||
#define esp_log_buffer_char ESP_LOG_BUFFER_CHAR
|
||||
|
||||
|
||||
#if CONFIG_LOG_COLORS
|
||||
#define LOG_COLOR_BLACK "30"
|
||||
@ -190,6 +260,32 @@ void esp_log_buffer_char(const char *tag, const void *buffer, uint16_t buff_len)
|
||||
#define ESP_LOGV( tag, format, ... ) ESP_EARLY_LOGV(tag, format, ##__VA_ARGS__)
|
||||
#endif // BOOTLOADER_BUILD
|
||||
|
||||
/** runtime macro to output logs at a speicfied level.
|
||||
*
|
||||
* @param tag tag of the log, which can be used to change the log level by ``esp_log_level_set`` at runtime.
|
||||
*
|
||||
* @param level level of the output log.
|
||||
*
|
||||
* @param format format of the output log. see ``printf``
|
||||
*
|
||||
* @param ... variables to be replaced into the log. see ``printf``
|
||||
*
|
||||
* @see ``printf``
|
||||
*/
|
||||
#define ESP_LOG_LEVEL(level, tag, format, ...) do {\
|
||||
if (level==ESP_LOG_ERROR ) { esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); }\
|
||||
else if (level==ESP_LOG_WARN ) { esp_log_write(ESP_LOG_WARN, tag, LOG_FORMAT(W, format), esp_log_timestamp(), tag, ##__VA_ARGS__); }\
|
||||
else if (level==ESP_LOG_DEBUG ) { esp_log_write(ESP_LOG_DEBUG, tag, LOG_FORMAT(D, format), esp_log_timestamp(), tag, ##__VA_ARGS__); }\
|
||||
else if (level==ESP_LOG_VERBOSE ) { esp_log_write(ESP_LOG_VERBOSE, tag, LOG_FORMAT(V, format), esp_log_timestamp(), tag, ##__VA_ARGS__); }\
|
||||
else { esp_log_write(ESP_LOG_INFO, tag, LOG_FORMAT(I, format), esp_log_timestamp(), tag, ##__VA_ARGS__); }}while(0)
|
||||
|
||||
/** runtime macro to output logs at a speicfied level. Also check the level with ``LOG_LOCAL_LEVEL``.
|
||||
*
|
||||
* @see ``printf``, ``ESP_LOG_LEVEL``
|
||||
*/
|
||||
#define ESP_LOG_LEVEL_LOCAL(level, tag, format, ...) do {\
|
||||
if ( LOG_LOCAL_LEVEL >= level ) ESP_LOG_LEVEL(level, tag, format, ##__VA_ARGS__); } while(0);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
24
tools/sdk/include/log/esp_log_internal.h
Normal file
24
tools/sdk/include/log/esp_log_internal.h
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef __ESP_LOG_INTERNAL_H__
|
||||
#define __ESP_LOG_INTERNAL_H__
|
||||
|
||||
//these two functions do not check level versus ESP_LOCAL_LEVEL, this should be done in esp_log.h
|
||||
void esp_log_buffer_hex_internal(const char *tag, const void *buffer, uint16_t buff_len, esp_log_level_t level);
|
||||
void esp_log_buffer_char_internal(const char *tag, const void *buffer, uint16_t buff_len, esp_log_level_t level);
|
||||
void esp_log_buffer_hexdump_internal( const char *tag, const void *buffer, uint16_t buff_len, esp_log_level_t log_level);
|
||||
|
||||
#endif
|
||||
|
@ -59,11 +59,6 @@ struct dhcps_pool{
|
||||
u32_t lease_timer;
|
||||
};
|
||||
|
||||
typedef struct _list_node{
|
||||
void *pnode;
|
||||
struct _list_node *pnext;
|
||||
}list_node;
|
||||
|
||||
typedef u32_t dhcps_time_t;
|
||||
typedef u8_t dhcps_offer_t;
|
||||
|
||||
|
@ -24,7 +24,7 @@ extern "C" {
|
||||
* @brief Initialize the default NVS partition.
|
||||
*
|
||||
* This API initialises the default NVS partition. The default NVS partition
|
||||
* is the one that is labelled "nvs" in the partition table.
|
||||
* is the one that is labeled "nvs" in the partition table.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK if storage was successfully initialized.
|
||||
@ -38,7 +38,7 @@ esp_err_t nvs_flash_init(void);
|
||||
/**
|
||||
* @brief Initialize NVS flash storage for the specified partition.
|
||||
*
|
||||
* @param[in] partition_name Name (label) of the partition. Note that internally a reference to
|
||||
* @param[in] partition_label Label of the partition. Note that internally a reference to
|
||||
* passed value is kept and it should be accessible for future operations
|
||||
*
|
||||
* @return
|
||||
@ -48,7 +48,30 @@ esp_err_t nvs_flash_init(void);
|
||||
* - ESP_ERR_NOT_FOUND if specified partition is not found in the partition table
|
||||
* - one of the error codes from the underlying flash storage driver
|
||||
*/
|
||||
esp_err_t nvs_flash_init_partition(const char *partition_name);
|
||||
esp_err_t nvs_flash_init_partition(const char *partition_label);
|
||||
|
||||
/**
|
||||
* @brief Deinitialize NVS storage for the default NVS partition
|
||||
*
|
||||
* Default NVS partition is the partition with "nvs" label in the partition table.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success (storage was deinitialized)
|
||||
* - ESP_ERR_NVS_NOT_INITIALIZED if the storage was not initialized prior to this call
|
||||
*/
|
||||
esp_err_t nvs_flash_deinit(void);
|
||||
|
||||
/**
|
||||
* @brief Deinitialize NVS storage for the given NVS partition
|
||||
*
|
||||
* @param[in] partition_label Label of the partition
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK on success
|
||||
* - ESP_ERR_NVS_NOT_INITIALIZED if the storage for given partition was not
|
||||
* initialized prior to this call
|
||||
*/
|
||||
esp_err_t nvs_flash_deinit_partition(const char* partition_label);
|
||||
|
||||
/**
|
||||
* @brief Erase the default NVS partition
|
||||
|
@ -274,12 +274,12 @@
|
||||
//}}
|
||||
|
||||
/* Overall memory map */
|
||||
#define SOC_DROM_LOW 0x3F400000
|
||||
#define SOC_DROM_HIGH 0x3F800000
|
||||
#define SOC_IROM_LOW 0x400D0000
|
||||
#define SOC_IROM_HIGH 0x40400000
|
||||
#define SOC_IRAM_LOW 0x40080000
|
||||
#define SOC_IRAM_HIGH 0x400A0000
|
||||
#define SOC_DROM_LOW 0x3F400000
|
||||
#define SOC_DROM_HIGH 0x3F800000
|
||||
#define SOC_RTC_IRAM_LOW 0x400C0000
|
||||
#define SOC_RTC_IRAM_HIGH 0x400C2000
|
||||
#define SOC_RTC_DATA_LOW 0x50000000
|
||||
@ -295,6 +295,10 @@
|
||||
#define SOC_DMA_LOW 0x3FFAE000
|
||||
#define SOC_DMA_HIGH 0x40000000
|
||||
|
||||
// Region of memory that is byte-accessible. See esp_ptr_byte_accesible().
|
||||
#define SOC_BYTE_ACCESSIBLE_LOW 0x3FFAE000
|
||||
#define SOC_BYTE_ACCESSIBLE_HIGH 0x40000000
|
||||
|
||||
//Interrupt hardware source table
|
||||
//This table is decided by hardware, don't touch this.
|
||||
#define ETS_WIFI_MAC_INTR_SOURCE 0/**< interrupt of WiFi MAC, level*/
|
||||
|
@ -18,6 +18,10 @@
|
||||
#include <stdbool.h>
|
||||
#include "esp_err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Configuration structure for esp_vfs_spiffs_register
|
||||
*/
|
||||
@ -91,4 +95,8 @@ esp_err_t esp_spiffs_format(const char* partition_label);
|
||||
*/
|
||||
esp_err_t esp_spiffs_info(const char* partition_label, size_t *total_bytes, size_t *used_bytes);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ESP_SPIFFS_H_ */
|
||||
|
@ -24,27 +24,27 @@
|
||||
#define SPIFFS_TAG "SPIFFS"
|
||||
|
||||
// Set generic spiffs debug output call.
|
||||
#if CONGIG_SPIFFS_DBG
|
||||
#if CONFIG_SPIFFS_DBG
|
||||
#define SPIFFS_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__)
|
||||
#else
|
||||
#define SPIFFS_DBG(...)
|
||||
#endif
|
||||
#if CONGIG_SPIFFS_API_DBG
|
||||
#if CONFIG_SPIFFS_API_DBG
|
||||
#define SPIFFS_API_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__)
|
||||
#else
|
||||
#define SPIFFS_API_DBG(...)
|
||||
#endif
|
||||
#if CONGIG_SPIFFS_DBG
|
||||
#if CONFIG_SPIFFS_DBG
|
||||
#define SPIFFS_GC_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__)
|
||||
#else
|
||||
#define SPIFFS_GC_DBG(...)
|
||||
#endif
|
||||
#if CONGIG_SPIFFS_CACHE_DBG
|
||||
#if CONFIG_SPIFFS_CACHE_DBG
|
||||
#define SPIFFS_CACHE_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__)
|
||||
#else
|
||||
#define SPIFFS_CACHE_DBG(...)
|
||||
#endif
|
||||
#if CONGIG_SPIFFS_CHECK_DBG
|
||||
#if CONFIG_SPIFFS_CHECK_DBG
|
||||
#define SPIFFS_CHECK_DBG(...) ESP_LOGD(SPIFFS_TAG, __VA_ARGS__)
|
||||
#else
|
||||
#define SPIFFS_CHECK_DBG(...)
|
||||
|
@ -89,13 +89,14 @@ SECTIONS
|
||||
*libesp32.a:core_dump.o(.literal .text .literal.* .text.*)
|
||||
*libapp_trace.a:(.literal .text .literal.* .text.*)
|
||||
*libxtensa-debug-module.a:eri.o(.literal .text .literal.* .text.*)
|
||||
*libesp32.a:app_trace.o(.literal .text .literal.* .text.*)
|
||||
*libphy.a:(.literal .text .literal.* .text.*)
|
||||
*librtc.a:(.literal .text .literal.* .text.*)
|
||||
*libsoc.a:(.literal .text .literal.* .text.*)
|
||||
*libhal.a:(.literal .text .literal.* .text.*)
|
||||
*libgcc.a:lib2funcs.o(.literal .text .literal.* .text.*)
|
||||
*libspi_flash.a:spi_flash_rom_patch.o(.literal .text .literal.* .text.*)
|
||||
*libgcov.a:(.literal .text .literal.* .text.*)
|
||||
INCLUDE esp32.spiram.rom-functions-iram.ld
|
||||
_iram_text_end = ABSOLUTE(.);
|
||||
} > iram0_0_seg
|
||||
|
||||
@ -117,8 +118,10 @@ SECTIONS
|
||||
*libesp32.a:panic.o(.rodata .rodata.*)
|
||||
*libphy.a:(.rodata .rodata.*)
|
||||
*libapp_trace.a:(.rodata .rodata.*)
|
||||
*libgcov.a:(.rodata .rodata.*)
|
||||
*libheap.a:multi_heap.o(.rodata .rodata.*)
|
||||
*libheap.a:multi_heap_poisoning.o(.rodata .rodata.*)
|
||||
INCLUDE esp32.spiram.rom-functions-dram.ld
|
||||
_data_end = ABSOLUTE(.);
|
||||
. = ALIGN(4);
|
||||
} >dram0_0_seg
|
||||
|
@ -215,9 +215,17 @@ PROVIDE ( llc_state = 0x3ffb96f8 );
|
||||
PROVIDE ( lldesc_build_chain = 0x4000a850 );
|
||||
PROVIDE ( lldesc_num2link = 0x4000a948 );
|
||||
PROVIDE ( lldesc_set_owner = 0x4000a974 );
|
||||
PROVIDE ( lld_evt_deferred_elt_push = 0x400466b4 );
|
||||
PROVIDE ( lld_evt_deferred_elt_pop = 0x400466dc );
|
||||
PROVIDE ( lld_evt_winsize_change = 0x40046730 );
|
||||
PROVIDE ( lld_evt_rxwin_compute = 0x400467c8 );
|
||||
PROVIDE ( lld_evt_slave_time_compute = 0x40046818 );
|
||||
PROVIDE ( lld_evt_env = 0x3ffb9704 );
|
||||
PROVIDE ( lld_evt_elt_wait_get = 0x400468e4 );
|
||||
PROVIDE ( lld_evt_get_next_free_slot = 0x4004692c );
|
||||
PROVIDE ( lld_pdu_adv_pk_desc_tab = 0x3ff98c70 );
|
||||
PROVIDE ( lld_pdu_llcp_pk_desc_tab = 0x3ff98b68 );
|
||||
PROVIDE ( lld_pdu_pack = 0x4004ab14 );
|
||||
PROVIDE ( LLM_AA_CT1 = 0x3ff98d8a );
|
||||
PROVIDE ( LLM_AA_CT2 = 0x3ff98d88 );
|
||||
PROVIDE ( llm_default_handler = 0x3ff98d80 );
|
||||
@ -1713,5 +1721,6 @@ PROVIDE ( LM_SniffSubRate = 0x3ffb8214 );
|
||||
PROVIDE ( prbs_64bytes = 0x3ff98992 );
|
||||
PROVIDE ( nvds_env = 0x3ffb8364 );
|
||||
PROVIDE ( nvds_magic_number = 0x3ff9912a );
|
||||
PROVIDE ( TASK_DESC_LLD = 0x3ff98b58 );
|
||||
/* Above are static data, but can be used, not generated by script >>>>> btdm data */
|
||||
|
||||
|
143
tools/sdk/ld/esp32.spiram.rom-functions-dram.ld
Normal file
143
tools/sdk/ld/esp32.spiram.rom-functions-dram.ld
Normal file
@ -0,0 +1,143 @@
|
||||
/*
|
||||
If the Newlib functions in ROM aren't used (eg because the external SPI RAM workaround is active), these functions will
|
||||
be linked into the application directly instead. Normally, they would end up in flash, which is undesirable because esp-idf
|
||||
and/or applications may assume that because these functions normally are in ROM, they are accessible even when flash is
|
||||
inaccessible. To work around this, this ld fragment places these functions in RAM instead. If the ROM functions are used,
|
||||
these defines do nothing, so they can still be included in that situation.
|
||||
|
||||
This file is responsible for placing the rodata segment in DRAM.
|
||||
*/
|
||||
|
||||
*lib_a-utoa.o(.rodata .rodata.*)
|
||||
*lib_a-longjmp.o(.rodata .rodata.*)
|
||||
*lib_a-setjmp.o(.rodata .rodata.*)
|
||||
*lib_a-abs.o(.rodata .rodata.*)
|
||||
*lib_a-div.o(.rodata .rodata.*)
|
||||
*lib_a-labs.o(.rodata .rodata.*)
|
||||
*lib_a-ldiv.o(.rodata .rodata.*)
|
||||
*lib_a-quorem.o(.rodata .rodata.*)
|
||||
*lib_a-qsort.o(.rodata .rodata.*)
|
||||
*lib_a-utoa.o(.rodata .rodata.*)
|
||||
*lib_a-itoa.o(.rodata .rodata.*)
|
||||
*lib_a-atoi.o(.rodata .rodata.*)
|
||||
*lib_a-atol.o(.rodata .rodata.*)
|
||||
*lib_a-strtol.o(.rodata .rodata.*)
|
||||
*lib_a-strtoul.o(.rodata .rodata.*)
|
||||
*lib_a-wcrtomb.o(.rodata .rodata.*)
|
||||
*lib_a-fvwrite.o(.rodata .rodata.*)
|
||||
*lib_a-wbuf.o(.rodata .rodata.*)
|
||||
*lib_a-wsetup.o(.rodata .rodata.*)
|
||||
*lib_a-fputwc.o(.rodata .rodata.*)
|
||||
*lib_a-wctomb_r.o(.rodata .rodata.*)
|
||||
*lib_a-ungetc.o(.rodata .rodata.*)
|
||||
*lib_a-makebuf.o(.rodata .rodata.*)
|
||||
*lib_a-fflush.o(.rodata .rodata.*)
|
||||
*lib_a-refill.o(.rodata .rodata.*)
|
||||
*lib_a-s_fpclassify.o(.rodata .rodata.*)
|
||||
*lib_a-locale.o(.rodata .rodata.*)
|
||||
*lib_a-asctime.o(.rodata .rodata.*)
|
||||
*lib_a-ctime.o(.rodata .rodata.*)
|
||||
*lib_a-ctime_r.o(.rodata .rodata.*)
|
||||
*lib_a-lcltime.o(.rodata .rodata.*)
|
||||
*lib_a-lcltime_r.o(.rodata .rodata.*)
|
||||
*lib_a-gmtime.o(.rodata .rodata.*)
|
||||
*lib_a-gmtime_r.o(.rodata .rodata.*)
|
||||
*lib_a-strftime.o(.rodata .rodata.*)
|
||||
*lib_a-mktime.o(.rodata .rodata.*)
|
||||
*lib_a-syswrite.o(.rodata .rodata.*)
|
||||
*lib_a-tzset_r.o(.rodata .rodata.*)
|
||||
*lib_a-tzset.o(.rodata .rodata.*)
|
||||
*lib_a-toupper.o(.rodata .rodata.*)
|
||||
*lib_a-tolower.o(.rodata .rodata.*)
|
||||
*lib_a-toascii.o(.rodata .rodata.*)
|
||||
*lib_a-systimes.o(.rodata .rodata.*)
|
||||
*lib_a-time.o(.rodata .rodata.*)
|
||||
*lib_a-bsd_qsort_r.o(.rodata .rodata.*)
|
||||
*lib_a-qsort_r.o(.rodata .rodata.*)
|
||||
*lib_a-gettzinfo.o(.rodata .rodata.*)
|
||||
*lib_a-strupr.o(.rodata .rodata.*)
|
||||
*lib_a-asctime_r.o(.rodata .rodata.*)
|
||||
*lib_a-bzero.o(.rodata .rodata.*)
|
||||
*lib_a-close.o(.rodata .rodata.*)
|
||||
*lib_a-creat.o(.rodata .rodata.*)
|
||||
*lib_a-environ.o(.rodata .rodata.*)
|
||||
*lib_a-fclose.o(.rodata .rodata.*)
|
||||
*lib_a-isalnum.o(.rodata .rodata.*)
|
||||
*lib_a-isalpha.o(.rodata .rodata.*)
|
||||
*lib_a-isascii.o(.rodata .rodata.*)
|
||||
*lib_a-isblank.o(.rodata .rodata.*)
|
||||
*lib_a-iscntrl.o(.rodata .rodata.*)
|
||||
*lib_a-isdigit.o(.rodata .rodata.*)
|
||||
*lib_a-isgraph.o(.rodata .rodata.*)
|
||||
*lib_a-islower.o(.rodata .rodata.*)
|
||||
*lib_a-isprint.o(.rodata .rodata.*)
|
||||
*lib_a-ispunct.o(.rodata .rodata.*)
|
||||
*lib_a-isspace.o(.rodata .rodata.*)
|
||||
*lib_a-isupper.o(.rodata .rodata.*)
|
||||
*lib_a-memccpy.o(.rodata .rodata.*)
|
||||
*lib_a-memchr.o(.rodata .rodata.*)
|
||||
*lib_a-memcmp.o(.rodata .rodata.*)
|
||||
*lib_a-memcpy.o(.rodata .rodata.*)
|
||||
*lib_a-memmove.o(.rodata .rodata.*)
|
||||
*lib_a-memrchr.o(.rodata .rodata.*)
|
||||
*lib_a-memset.o(.rodata .rodata.*)
|
||||
*lib_a-open.o(.rodata .rodata.*)
|
||||
*lib_a-rand.o(.rodata .rodata.*)
|
||||
*lib_a-rand_r.o(.rodata .rodata.*)
|
||||
*lib_a-read.o(.rodata .rodata.*)
|
||||
*lib_a-rshift.o(.rodata .rodata.*)
|
||||
*lib_a-sbrk.o(.rodata .rodata.*)
|
||||
*lib_a-srand.o(.rodata .rodata.*)
|
||||
*lib_a-strcasecmp.o(.rodata .rodata.*)
|
||||
*lib_a-strcasestr.o(.rodata .rodata.*)
|
||||
*lib_a-strcat.o(.rodata .rodata.*)
|
||||
*lib_a-strchr.o(.rodata .rodata.*)
|
||||
*lib_a-strcmp.o(.rodata .rodata.*)
|
||||
*lib_a-strcoll.o(.rodata .rodata.*)
|
||||
*lib_a-strcpy.o(.rodata .rodata.*)
|
||||
*lib_a-strcspn.o(.rodata .rodata.*)
|
||||
*lib_a-strdup.o(.rodata .rodata.*)
|
||||
*lib_a-strlcat.o(.rodata .rodata.*)
|
||||
*lib_a-strlcpy.o(.rodata .rodata.*)
|
||||
*lib_a-strlen.o(.rodata .rodata.*)
|
||||
*lib_a-strlwr.o(.rodata .rodata.*)
|
||||
*lib_a-strncasecmp.o(.rodata .rodata.*)
|
||||
*lib_a-strncat.o(.rodata .rodata.*)
|
||||
*lib_a-strncmp.o(.rodata .rodata.*)
|
||||
*lib_a-strncpy.o(.rodata .rodata.*)
|
||||
*lib_a-strndup.o(.rodata .rodata.*)
|
||||
*lib_a-strnlen.o(.rodata .rodata.*)
|
||||
*lib_a-strrchr.o(.rodata .rodata.*)
|
||||
*lib_a-strsep.o(.rodata .rodata.*)
|
||||
*lib_a-strspn.o(.rodata .rodata.*)
|
||||
*lib_a-strstr.o(.rodata .rodata.*)
|
||||
*lib_a-strtok_r.o(.rodata .rodata.*)
|
||||
*lib_a-strupr.o(.rodata .rodata.*)
|
||||
*lib_a-stdio.o(.rodata .rodata.*)
|
||||
*lib_a-syssbrk.o(.rodata .rodata.*)
|
||||
*lib_a-sysclose.o(.rodata .rodata.*)
|
||||
*lib_a-sysopen.o(.rodata .rodata.*)
|
||||
*creat.o(.rodata .rodata.*)
|
||||
*lib_a-sysread.o(.rodata .rodata.*)
|
||||
*lib_a-syswrite.o(.rodata .rodata.*)
|
||||
*lib_a-impure.o(.rodata .rodata.*)
|
||||
*lib_a-tzvars.o(.rodata .rodata.*)
|
||||
*lib_a-sf_nan.o(.rodata .rodata.*)
|
||||
*lib_a-tzcalc_limits.o(.rodata .rodata.*)
|
||||
*lib_a-month_lengths.o(.rodata .rodata.*)
|
||||
*lib_a-timelocal.o(.rodata .rodata.*)
|
||||
*lib_a-findfp.o(.rodata .rodata.*)
|
||||
*lock.o(.rodata .rodata.*)
|
||||
*lib_a-getenv_r.o(.rodata .rodata.*)
|
||||
*isatty.o(.rodata .rodata.*)
|
||||
*lib_a-fwalk.o(.rodata .rodata.*)
|
||||
*lib_a-getenv_r.o(.rodata .rodata.*)
|
||||
*lib_a-tzlock.o(.rodata .rodata.*)
|
||||
*lib_a-ctype_.o(.rodata .rodata.*)
|
||||
*lib_a-sccl.o(.rodata .rodata.*)
|
||||
*lib_a-strptime.o(.rodata .rodata.*)
|
||||
*lib_a-envlock.o(.rodata .rodata.*)
|
||||
*lib_a-raise.o(.rodata .rodata.*)
|
||||
*lib_a-strdup_r.o(.rodata .rodata.*)
|
||||
*lib_a-system.o(.rodata .rodata.*)
|
||||
*lib_a-strndup_r.o(.rodata .rodata.*)
|
144
tools/sdk/ld/esp32.spiram.rom-functions-iram.ld
Normal file
144
tools/sdk/ld/esp32.spiram.rom-functions-iram.ld
Normal file
@ -0,0 +1,144 @@
|
||||
/*
|
||||
If the Newlib functions in ROM aren't used (eg because the external SPI RAM workaround is active), these functions will
|
||||
be linked into the application directly instead. Normally, they would end up in flash, which is undesirable because esp-idf
|
||||
and/or applications may assume that because these functions normally are in ROM, they are accessible even when flash is
|
||||
inaccessible. To work around this, this ld fragment places these functions in RAM instead. If the ROM functions are used,
|
||||
these defines do nothing, so they can still be included in that situation.
|
||||
|
||||
This file is responsible for placing the literal and text segments in IRAM.
|
||||
*/
|
||||
|
||||
|
||||
*lib_a-utoa.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-longjmp.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-setjmp.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-abs.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-div.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-labs.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-ldiv.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-quorem.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-qsort.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-utoa.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-itoa.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-atoi.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-atol.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strtol.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strtoul.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-wcrtomb.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-fvwrite.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-wbuf.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-wsetup.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-fputwc.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-wctomb_r.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-ungetc.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-makebuf.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-fflush.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-refill.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-s_fpclassify.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-locale.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-asctime.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-ctime.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-ctime_r.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-lcltime.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-lcltime_r.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-gmtime.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-gmtime_r.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strftime.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-mktime.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-syswrite.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-tzset_r.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-tzset.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-toupper.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-tolower.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-toascii.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-systimes.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-time.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-bsd_qsort_r.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-qsort_r.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-gettzinfo.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strupr.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-asctime_r.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-bzero.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-close.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-creat.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-environ.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-fclose.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-isalnum.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-isalpha.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-isascii.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-isblank.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-iscntrl.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-isdigit.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-isgraph.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-islower.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-isprint.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-ispunct.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-isspace.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-isupper.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-memccpy.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-memchr.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-memcmp.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-memcpy.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-memmove.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-memrchr.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-memset.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-open.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-rand.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-rand_r.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-read.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-rshift.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-sbrk.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-srand.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strcasecmp.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strcasestr.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strcat.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strchr.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strcmp.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strcoll.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strcpy.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strcspn.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strdup.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strlcat.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strlcpy.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strlen.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strlwr.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strncasecmp.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strncat.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strncmp.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strncpy.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strndup.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strnlen.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strrchr.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strsep.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strspn.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strstr.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strtok_r.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strupr.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-stdio.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-syssbrk.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-sysclose.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-sysopen.o(.literal .text .literal.* .text.*)
|
||||
*creat.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-sysread.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-syswrite.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-impure.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-tzvars.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-sf_nan.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-tzcalc_limits.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-month_lengths.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-timelocal.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-findfp.o(.literal .text .literal.* .text.*)
|
||||
*lock.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-getenv_r.o(.literal .text .literal.* .text.*)
|
||||
*isatty.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-fwalk.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-getenv_r.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-tzlock.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-ctype_.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-sccl.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strptime.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-envlock.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-raise.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strdup_r.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-system.o(.literal .text .literal.* .text.*)
|
||||
*lib_a-strndup_r.o(.literal .text .literal.* .text.*)
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
tools/sdk/lib/libespnow.a
Normal file
BIN
tools/sdk/lib/libespnow.a
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -14,62 +14,61 @@ CONFIG_MAKE_WARN_UNDEFINED_VARIABLES=y
|
||||
# Bootloader config
|
||||
#
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL_NONE=y
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set
|
||||
# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL_ERROR=
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL_WARN=
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL_INFO=
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG=
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE=
|
||||
CONFIG_LOG_BOOTLOADER_LEVEL=0
|
||||
CONFIG_BOOTLOADER_SPI_WP_PIN=7
|
||||
|
||||
#
|
||||
# Security features
|
||||
#
|
||||
# CONFIG_SECURE_BOOT_ENABLED is not set
|
||||
# CONFIG_FLASH_ENCRYPTION_ENABLED is not set
|
||||
CONFIG_SECURE_BOOT_ENABLED=
|
||||
CONFIG_FLASH_ENCRYPTION_ENABLED=
|
||||
|
||||
#
|
||||
# Serial flasher config
|
||||
#
|
||||
CONFIG_ESPTOOLPY_PORT="/dev/cu.usbserial-DO00EAB0"
|
||||
# CONFIG_ESPTOOLPY_BAUD_115200B is not set
|
||||
# CONFIG_ESPTOOLPY_BAUD_230400B is not set
|
||||
CONFIG_ESPTOOLPY_BAUD_115200B=
|
||||
CONFIG_ESPTOOLPY_BAUD_230400B=
|
||||
CONFIG_ESPTOOLPY_BAUD_921600B=y
|
||||
# CONFIG_ESPTOOLPY_BAUD_2MB is not set
|
||||
# CONFIG_ESPTOOLPY_BAUD_OTHER is not set
|
||||
CONFIG_ESPTOOLPY_BAUD_2MB=
|
||||
CONFIG_ESPTOOLPY_BAUD_OTHER=
|
||||
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
|
||||
CONFIG_ESPTOOLPY_BAUD=921600
|
||||
CONFIG_ESPTOOLPY_COMPRESSED=y
|
||||
CONFIG_FLASHMODE_QIO=y
|
||||
# CONFIG_FLASHMODE_QOUT is not set
|
||||
# CONFIG_FLASHMODE_DIO is not set
|
||||
# CONFIG_FLASHMODE_DOUT is not set
|
||||
CONFIG_FLASHMODE_QIO=
|
||||
CONFIG_FLASHMODE_QOUT=
|
||||
CONFIG_FLASHMODE_DIO=y
|
||||
CONFIG_FLASHMODE_DOUT=
|
||||
CONFIG_ESPTOOLPY_FLASHMODE="dio"
|
||||
# CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_80M=
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_40M=y
|
||||
# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_26M=
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ_20M=
|
||||
CONFIG_ESPTOOLPY_FLASHFREQ="40m"
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_1MB=
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_2MB=
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
|
||||
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_8MB=
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
|
||||
CONFIG_ESPTOOLPY_BEFORE_RESET=y
|
||||
# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
|
||||
CONFIG_ESPTOOLPY_BEFORE_NORESET=
|
||||
CONFIG_ESPTOOLPY_BEFORE="default_reset"
|
||||
CONFIG_ESPTOOLPY_AFTER_RESET=y
|
||||
# CONFIG_ESPTOOLPY_AFTER_NORESET is not set
|
||||
CONFIG_ESPTOOLPY_AFTER_NORESET=
|
||||
CONFIG_ESPTOOLPY_AFTER="hard_reset"
|
||||
# CONFIG_MONITOR_BAUD_9600B is not set
|
||||
# CONFIG_MONITOR_BAUD_57600B is not set
|
||||
CONFIG_MONITOR_BAUD_9600B=
|
||||
CONFIG_MONITOR_BAUD_57600B=
|
||||
CONFIG_MONITOR_BAUD_115200B=y
|
||||
# CONFIG_MONITOR_BAUD_230400B is not set
|
||||
# CONFIG_MONITOR_BAUD_921600B is not set
|
||||
# CONFIG_MONITOR_BAUD_2MB is not set
|
||||
# CONFIG_MONITOR_BAUD_OTHER is not set
|
||||
CONFIG_MONITOR_BAUD_230400B=
|
||||
CONFIG_MONITOR_BAUD_921600B=
|
||||
CONFIG_MONITOR_BAUD_2MB=
|
||||
CONFIG_MONITOR_BAUD_OTHER=
|
||||
CONFIG_MONITOR_BAUD_OTHER_VAL=115200
|
||||
CONFIG_MONITOR_BAUD=115200
|
||||
|
||||
@ -77,8 +76,8 @@ CONFIG_MONITOR_BAUD=115200
|
||||
# Partition Table
|
||||
#
|
||||
CONFIG_PARTITION_TABLE_SINGLE_APP=y
|
||||
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
|
||||
# CONFIG_PARTITION_TABLE_CUSTOM is not set
|
||||
CONFIG_PARTITION_TABLE_TWO_OTA=
|
||||
CONFIG_PARTITION_TABLE_CUSTOM=
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_APP_BIN_OFFSET=0x10000
|
||||
CONFIG_PARTITION_TABLE_FILENAME="partitions_singleapp.csv"
|
||||
@ -88,10 +87,10 @@ CONFIG_APP_OFFSET=0x10000
|
||||
# Compiler options
|
||||
#
|
||||
CONFIG_OPTIMIZATION_LEVEL_DEBUG=y
|
||||
# CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set
|
||||
CONFIG_OPTIMIZATION_LEVEL_RELEASE=
|
||||
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
|
||||
# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set
|
||||
# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set
|
||||
CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=
|
||||
CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED=
|
||||
|
||||
#
|
||||
# Component config
|
||||
@ -100,9 +99,9 @@ CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
|
||||
#
|
||||
# Application Level Tracing
|
||||
#
|
||||
# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set
|
||||
CONFIG_ESP32_APPTRACE_DEST_TRAX=
|
||||
CONFIG_ESP32_APPTRACE_DEST_NONE=y
|
||||
# CONFIG_ESP32_APPTRACE_ENABLE is not set
|
||||
CONFIG_ESP32_APPTRACE_ENABLE=
|
||||
CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y
|
||||
|
||||
#
|
||||
@ -114,30 +113,30 @@ CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y
|
||||
#
|
||||
CONFIG_ENABLE_ARDUINO_DEPENDS=y
|
||||
CONFIG_AUTOSTART_ARDUINO=y
|
||||
# CONFIG_DISABLE_HAL_LOCKS is not set
|
||||
CONFIG_DISABLE_HAL_LOCKS=
|
||||
|
||||
#
|
||||
# Debug Log Configuration
|
||||
#
|
||||
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_NONE is not set
|
||||
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_NONE=
|
||||
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_ERROR=y
|
||||
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_WARN is not set
|
||||
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_INFO is not set
|
||||
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_DEBUG is not set
|
||||
# CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_VERBOSE is not set
|
||||
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_WARN=
|
||||
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_INFO=
|
||||
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_DEBUG=
|
||||
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL_VERBOSE=
|
||||
CONFIG_ARDUHAL_LOG_DEFAULT_LEVEL=1
|
||||
# CONFIG_ARDUHAL_LOG_COLORS is not set
|
||||
# CONFIG_AUTOCONNECT_WIFI is not set
|
||||
# CONFIG_AWS_IOT_SDK is not set
|
||||
CONFIG_ARDUHAL_LOG_COLORS=
|
||||
CONFIG_AUTOCONNECT_WIFI=
|
||||
CONFIG_AWS_IOT_SDK=
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BLUEDROID_ENABLED=y
|
||||
CONFIG_BTC_TASK_STACK_SIZE=8192
|
||||
# CONFIG_BLUEDROID_MEM_DEBUG is not set
|
||||
CONFIG_BLUEDROID_MEM_DEBUG=
|
||||
CONFIG_CLASSIC_BT_ENABLED=y
|
||||
CONFIG_GATTS_ENABLE=y
|
||||
CONFIG_GATTC_ENABLE=y
|
||||
CONFIG_BLE_SMP_ENABLE=y
|
||||
# CONFIG_BT_STACK_NO_LOG is not set
|
||||
CONFIG_BT_STACK_NO_LOG=
|
||||
CONFIG_BT_ACL_CONNECTIONS=4
|
||||
CONFIG_BTDM_CONTROLLER_RUN_CPU=0
|
||||
CONFIG_SMP_ENABLE=y
|
||||
@ -146,21 +145,21 @@ CONFIG_BT_RESERVE_DRAM=0x10000
|
||||
#
|
||||
# ESP32-specific
|
||||
#
|
||||
# CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set
|
||||
# CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_80=
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_160=
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
|
||||
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
|
||||
CONFIG_MEMMAP_SMP=y
|
||||
# CONFIG_SPIRAM_SUPPORT is not set
|
||||
# CONFIG_MEMMAP_TRACEMEM is not set
|
||||
# CONFIG_MEMMAP_TRACEMEM_TWOBANKS is not set
|
||||
# CONFIG_ESP32_TRAX is not set
|
||||
CONFIG_SPIRAM_SUPPORT=
|
||||
CONFIG_MEMMAP_TRACEMEM=
|
||||
CONFIG_MEMMAP_TRACEMEM_TWOBANKS=
|
||||
CONFIG_ESP32_TRAX=
|
||||
CONFIG_TRACEMEM_RESERVE_DRAM=0x0
|
||||
# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set
|
||||
# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set
|
||||
CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH=
|
||||
CONFIG_ESP32_ENABLE_COREDUMP_TO_UART=
|
||||
CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y
|
||||
# CONFIG_ESP32_ENABLE_COREDUMP is not set
|
||||
# CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set
|
||||
CONFIG_ESP32_ENABLE_COREDUMP=
|
||||
CONFIG_TWO_UNIVERSAL_MAC_ADDRESS=
|
||||
CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y
|
||||
CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4
|
||||
CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32
|
||||
@ -169,55 +168,55 @@ CONFIG_MAIN_TASK_STACK_SIZE=4096
|
||||
CONFIG_IPC_TASK_STACK_SIZE=1024
|
||||
CONFIG_TIMER_TASK_STACK_SIZE=4096
|
||||
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y
|
||||
# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set
|
||||
# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set
|
||||
# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set
|
||||
# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set
|
||||
CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF=
|
||||
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR=
|
||||
CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF=
|
||||
CONFIG_NEWLIB_STDIN_LINE_ENDING_LF=
|
||||
CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y
|
||||
# CONFIG_NEWLIB_NANO_FORMAT is not set
|
||||
CONFIG_NEWLIB_NANO_FORMAT=
|
||||
CONFIG_CONSOLE_UART_DEFAULT=y
|
||||
# CONFIG_CONSOLE_UART_CUSTOM is not set
|
||||
# CONFIG_CONSOLE_UART_NONE is not set
|
||||
CONFIG_CONSOLE_UART_CUSTOM=
|
||||
CONFIG_CONSOLE_UART_NONE=
|
||||
CONFIG_CONSOLE_UART_NUM=0
|
||||
CONFIG_CONSOLE_UART_BAUDRATE=115200
|
||||
CONFIG_ULP_COPROC_ENABLED=y
|
||||
CONFIG_ULP_COPROC_RESERVE_MEM=512
|
||||
# CONFIG_ESP32_PANIC_PRINT_HALT is not set
|
||||
CONFIG_ESP32_PANIC_PRINT_HALT=
|
||||
CONFIG_ESP32_PANIC_PRINT_REBOOT=y
|
||||
# CONFIG_ESP32_PANIC_SILENT_REBOOT is not set
|
||||
# CONFIG_ESP32_PANIC_GDBSTUB is not set
|
||||
# CONFIG_ESP32_DEBUG_OCDAWARE is not set
|
||||
CONFIG_ESP32_PANIC_SILENT_REBOOT=
|
||||
CONFIG_ESP32_PANIC_GDBSTUB=
|
||||
CONFIG_ESP32_DEBUG_OCDAWARE=
|
||||
CONFIG_INT_WDT=y
|
||||
CONFIG_INT_WDT_TIMEOUT_MS=300
|
||||
CONFIG_INT_WDT_CHECK_CPU1=y
|
||||
CONFIG_TASK_WDT=y
|
||||
# CONFIG_TASK_WDT_PANIC is not set
|
||||
CONFIG_TASK_WDT_PANIC=
|
||||
CONFIG_TASK_WDT_TIMEOUT_S=5
|
||||
CONFIG_TASK_WDT_CHECK_IDLE_TASK=y
|
||||
# CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1 is not set
|
||||
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=
|
||||
CONFIG_BROWNOUT_DET=y
|
||||
CONFIG_BROWNOUT_DET_LVL_SEL_0=y
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set
|
||||
# CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set
|
||||
CONFIG_BROWNOUT_DET_LVL_SEL_1=
|
||||
CONFIG_BROWNOUT_DET_LVL_SEL_2=
|
||||
CONFIG_BROWNOUT_DET_LVL_SEL_3=
|
||||
CONFIG_BROWNOUT_DET_LVL_SEL_4=
|
||||
CONFIG_BROWNOUT_DET_LVL_SEL_5=
|
||||
CONFIG_BROWNOUT_DET_LVL_SEL_6=
|
||||
CONFIG_BROWNOUT_DET_LVL_SEL_7=
|
||||
CONFIG_BROWNOUT_DET_LVL=0
|
||||
# CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set
|
||||
CONFIG_ESP32_TIME_SYSCALL_USE_RTC=
|
||||
CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y
|
||||
# CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set
|
||||
# CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set
|
||||
CONFIG_ESP32_TIME_SYSCALL_USE_FRC1=
|
||||
CONFIG_ESP32_TIME_SYSCALL_USE_NONE=
|
||||
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y
|
||||
# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set
|
||||
CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL=
|
||||
CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024
|
||||
CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000
|
||||
# CONFIG_ESP32_XTAL_FREQ_40 is not set
|
||||
# CONFIG_ESP32_XTAL_FREQ_26 is not set
|
||||
CONFIG_ESP32_XTAL_FREQ_40=
|
||||
CONFIG_ESP32_XTAL_FREQ_26=
|
||||
CONFIG_ESP32_XTAL_FREQ_AUTO=y
|
||||
CONFIG_ESP32_XTAL_FREQ=0
|
||||
# CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set
|
||||
CONFIG_DISABLE_BASIC_ROM_CONSOLE=
|
||||
|
||||
#
|
||||
# Wi-Fi
|
||||
@ -225,7 +224,7 @@ CONFIG_ESP32_XTAL_FREQ=0
|
||||
CONFIG_SW_COEXIST_ENABLE=y
|
||||
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10
|
||||
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=0
|
||||
# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set
|
||||
CONFIG_ESP32_WIFI_STATIC_TX_BUFFER=
|
||||
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y
|
||||
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1
|
||||
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32
|
||||
@ -238,7 +237,7 @@ CONFIG_ESP32_WIFI_NVS_ENABLED=y
|
||||
# PHY
|
||||
#
|
||||
CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y
|
||||
# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set
|
||||
CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION=
|
||||
CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20
|
||||
CONFIG_ESP32_PHY_MAX_TX_POWER=20
|
||||
|
||||
@ -253,93 +252,93 @@ CONFIG_EMAC_TASK_PRIORITY=20
|
||||
#
|
||||
# FAT Filesystem support
|
||||
#
|
||||
# CONFIG_FATFS_CODEPAGE_ASCII is not set
|
||||
# CONFIG_FATFS_CODEPAGE_437 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_720 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_737 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_771 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_775 is not set
|
||||
CONFIG_FATFS_CODEPAGE_ASCII=
|
||||
CONFIG_FATFS_CODEPAGE_437=
|
||||
CONFIG_FATFS_CODEPAGE_720=
|
||||
CONFIG_FATFS_CODEPAGE_737=
|
||||
CONFIG_FATFS_CODEPAGE_771=
|
||||
CONFIG_FATFS_CODEPAGE_775=
|
||||
CONFIG_FATFS_CODEPAGE_850=y
|
||||
# CONFIG_FATFS_CODEPAGE_852 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_855 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_857 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_860 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_861 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_862 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_863 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_864 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_865 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_866 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_869 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_932 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_936 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_949 is not set
|
||||
# CONFIG_FATFS_CODEPAGE_950 is not set
|
||||
CONFIG_FATFS_CODEPAGE_852=
|
||||
CONFIG_FATFS_CODEPAGE_855=
|
||||
CONFIG_FATFS_CODEPAGE_857=
|
||||
CONFIG_FATFS_CODEPAGE_860=
|
||||
CONFIG_FATFS_CODEPAGE_861=
|
||||
CONFIG_FATFS_CODEPAGE_862=
|
||||
CONFIG_FATFS_CODEPAGE_863=
|
||||
CONFIG_FATFS_CODEPAGE_864=
|
||||
CONFIG_FATFS_CODEPAGE_865=
|
||||
CONFIG_FATFS_CODEPAGE_866=
|
||||
CONFIG_FATFS_CODEPAGE_869=
|
||||
CONFIG_FATFS_CODEPAGE_932=
|
||||
CONFIG_FATFS_CODEPAGE_936=
|
||||
CONFIG_FATFS_CODEPAGE_949=
|
||||
CONFIG_FATFS_CODEPAGE_950=
|
||||
CONFIG_FATFS_CODEPAGE=850
|
||||
# CONFIG_FATFS_LFN_NONE is not set
|
||||
# CONFIG_FATFS_LFN_HEAP is not set
|
||||
CONFIG_FATFS_LFN_NONE=
|
||||
CONFIG_FATFS_LFN_HEAP=
|
||||
CONFIG_FATFS_LFN_STACK=y
|
||||
CONFIG_FATFS_MAX_LFN=255
|
||||
|
||||
#
|
||||
# FreeRTOS
|
||||
#
|
||||
# CONFIG_FREERTOS_UNICORE is not set
|
||||
CONFIG_FREERTOS_UNICORE=
|
||||
CONFIG_FREERTOS_CORETIMER_0=y
|
||||
# CONFIG_FREERTOS_CORETIMER_1 is not set
|
||||
CONFIG_FREERTOS_CORETIMER_1=
|
||||
CONFIG_FREERTOS_HZ=1000
|
||||
# CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION is not set
|
||||
# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set
|
||||
# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set
|
||||
CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=
|
||||
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE=
|
||||
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL=
|
||||
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y
|
||||
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y
|
||||
CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y
|
||||
CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1
|
||||
CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y
|
||||
# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set
|
||||
# CONFIG_FREERTOS_ASSERT_DISABLE is not set
|
||||
# CONFIG_ENABLE_MEMORY_DEBUG is not set
|
||||
CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE=
|
||||
CONFIG_FREERTOS_ASSERT_DISABLE=
|
||||
CONFIG_ENABLE_MEMORY_DEBUG=
|
||||
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1024
|
||||
CONFIG_FREERTOS_ISR_STACKSIZE=1536
|
||||
# CONFIG_FREERTOS_LEGACY_HOOKS is not set
|
||||
CONFIG_FREERTOS_LEGACY_HOOKS=
|
||||
CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16
|
||||
# CONFIG_SUPPORT_STATIC_ALLOCATION is not set
|
||||
CONFIG_SUPPORT_STATIC_ALLOCATION=
|
||||
CONFIG_TIMER_TASK_PRIORITY=1
|
||||
CONFIG_TIMER_TASK_STACK_DEPTH=2048
|
||||
CONFIG_TIMER_QUEUE_LENGTH=10
|
||||
# CONFIG_FREERTOS_DEBUG_INTERNALS is not set
|
||||
CONFIG_FREERTOS_DEBUG_INTERNALS=
|
||||
|
||||
#
|
||||
# Heap memory debugging
|
||||
#
|
||||
# CONFIG_HEAP_POISONING_DISABLED is not set
|
||||
CONFIG_HEAP_POISONING_DISABLED=
|
||||
CONFIG_HEAP_POISONING_LIGHT=y
|
||||
# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set
|
||||
# CONFIG_HEAP_TRACING is not set
|
||||
CONFIG_HEAP_POISONING_COMPREHENSIVE=
|
||||
CONFIG_HEAP_TRACING=
|
||||
|
||||
#
|
||||
# Log output
|
||||
#
|
||||
# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
|
||||
CONFIG_LOG_DEFAULT_LEVEL_NONE=
|
||||
CONFIG_LOG_DEFAULT_LEVEL_ERROR=y
|
||||
# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set
|
||||
# CONFIG_LOG_DEFAULT_LEVEL_INFO is not set
|
||||
# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set
|
||||
# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set
|
||||
CONFIG_LOG_DEFAULT_LEVEL_WARN=
|
||||
CONFIG_LOG_DEFAULT_LEVEL_INFO=
|
||||
CONFIG_LOG_DEFAULT_LEVEL_DEBUG=
|
||||
CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=
|
||||
CONFIG_LOG_DEFAULT_LEVEL=1
|
||||
# CONFIG_LOG_COLORS is not set
|
||||
CONFIG_LOG_COLORS=
|
||||
|
||||
#
|
||||
# LWIP
|
||||
#
|
||||
# CONFIG_L2_TO_L3_COPY is not set
|
||||
CONFIG_L2_TO_L3_COPY=
|
||||
CONFIG_LWIP_MAX_SOCKETS=10
|
||||
CONFIG_LWIP_THREAD_LOCAL_STORAGE_INDEX=0
|
||||
CONFIG_LWIP_SO_REUSE=y
|
||||
CONFIG_LWIP_SO_RCVBUF=y
|
||||
CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
|
||||
# CONFIG_LWIP_IP_FRAG is not set
|
||||
# CONFIG_LWIP_IP_REASSEMBLY is not set
|
||||
CONFIG_LWIP_IP_FRAG=
|
||||
CONFIG_LWIP_IP_REASSEMBLY=
|
||||
|
||||
#
|
||||
# TCP
|
||||
@ -353,37 +352,37 @@ CONFIG_TCP_WND_DEFAULT=5744
|
||||
CONFIG_TCP_RECVMBOX_SIZE=6
|
||||
CONFIG_TCP_QUEUE_OOSEQ=y
|
||||
CONFIG_TCP_OVERSIZE_MSS=y
|
||||
# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set
|
||||
# CONFIG_TCP_OVERSIZE_DISABLE is not set
|
||||
CONFIG_TCP_OVERSIZE_QUARTER_MSS=
|
||||
CONFIG_TCP_OVERSIZE_DISABLE=
|
||||
|
||||
#
|
||||
# UDP
|
||||
#
|
||||
CONFIG_UDP_RECVMBOX_SIZE=6
|
||||
# CONFIG_LWIP_DHCP_DOES_ARP_CHECK is not set
|
||||
CONFIG_LWIP_DHCP_DOES_ARP_CHECK=
|
||||
CONFIG_TCPIP_TASK_STACK_SIZE=2560
|
||||
# CONFIG_PPP_SUPPORT is not set
|
||||
CONFIG_PPP_SUPPORT=
|
||||
|
||||
#
|
||||
# ICMP
|
||||
#
|
||||
# CONFIG_LWIP_MULTICAST_PING is not set
|
||||
# CONFIG_LWIP_BROADCAST_PING is not set
|
||||
CONFIG_LWIP_MULTICAST_PING=
|
||||
CONFIG_LWIP_BROADCAST_PING=
|
||||
|
||||
#
|
||||
# mbedTLS
|
||||
#
|
||||
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384
|
||||
# CONFIG_MBEDTLS_DEBUG is not set
|
||||
CONFIG_MBEDTLS_DEBUG=
|
||||
CONFIG_MBEDTLS_HARDWARE_AES=y
|
||||
# CONFIG_MBEDTLS_HARDWARE_MPI is not set
|
||||
# CONFIG_MBEDTLS_HARDWARE_SHA is not set
|
||||
CONFIG_MBEDTLS_HARDWARE_MPI=
|
||||
CONFIG_MBEDTLS_HARDWARE_SHA=
|
||||
CONFIG_MBEDTLS_HAVE_TIME=y
|
||||
# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set
|
||||
CONFIG_MBEDTLS_HAVE_TIME_DATE=
|
||||
CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y
|
||||
# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set
|
||||
# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set
|
||||
# CONFIG_MBEDTLS_TLS_DISABLED is not set
|
||||
CONFIG_MBEDTLS_TLS_SERVER_ONLY=
|
||||
CONFIG_MBEDTLS_TLS_CLIENT_ONLY=
|
||||
CONFIG_MBEDTLS_TLS_DISABLED=
|
||||
CONFIG_MBEDTLS_TLS_SERVER=y
|
||||
CONFIG_MBEDTLS_TLS_CLIENT=y
|
||||
CONFIG_MBEDTLS_TLS_ENABLED=y
|
||||
@ -391,7 +390,7 @@ CONFIG_MBEDTLS_TLS_ENABLED=y
|
||||
#
|
||||
# TLS Key Exchange Methods
|
||||
#
|
||||
# CONFIG_MBEDTLS_PSK_MODES is not set
|
||||
CONFIG_MBEDTLS_PSK_MODES=
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y
|
||||
@ -400,11 +399,11 @@ CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y
|
||||
CONFIG_MBEDTLS_SSL_RENEGOTIATION=y
|
||||
# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set
|
||||
CONFIG_MBEDTLS_SSL_PROTO_SSL3=
|
||||
CONFIG_MBEDTLS_SSL_PROTO_TLS1=y
|
||||
CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y
|
||||
CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
|
||||
# CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set
|
||||
CONFIG_MBEDTLS_SSL_PROTO_DTLS=
|
||||
CONFIG_MBEDTLS_SSL_ALPN=y
|
||||
CONFIG_MBEDTLS_SSL_SESSION_TICKETS=y
|
||||
|
||||
@ -412,16 +411,16 @@ CONFIG_MBEDTLS_SSL_SESSION_TICKETS=y
|
||||
# Symmetric Ciphers
|
||||
#
|
||||
CONFIG_MBEDTLS_AES_C=y
|
||||
# CONFIG_MBEDTLS_CAMELLIA_C is not set
|
||||
# CONFIG_MBEDTLS_DES_C is not set
|
||||
CONFIG_MBEDTLS_CAMELLIA_C=
|
||||
CONFIG_MBEDTLS_DES_C=
|
||||
CONFIG_MBEDTLS_RC4_DISABLED=y
|
||||
# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set
|
||||
# CONFIG_MBEDTLS_RC4_ENABLED is not set
|
||||
# CONFIG_MBEDTLS_BLOWFISH_C is not set
|
||||
# CONFIG_MBEDTLS_XTEA_C is not set
|
||||
CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT=
|
||||
CONFIG_MBEDTLS_RC4_ENABLED=
|
||||
CONFIG_MBEDTLS_BLOWFISH_C=
|
||||
CONFIG_MBEDTLS_XTEA_C=
|
||||
CONFIG_MBEDTLS_CCM_C=y
|
||||
CONFIG_MBEDTLS_GCM_C=y
|
||||
# CONFIG_MBEDTLS_RIPEMD160_C is not set
|
||||
CONFIG_MBEDTLS_RIPEMD160_C=
|
||||
|
||||
#
|
||||
# Certificates
|
||||
@ -450,9 +449,9 @@ CONFIG_MBEDTLS_ECP_NIST_OPTIM=y
|
||||
#
|
||||
# OpenSSL
|
||||
#
|
||||
# CONFIG_OPENSSL_DEBUG is not set
|
||||
CONFIG_OPENSSL_DEBUG=
|
||||
CONFIG_OPENSSL_ASSERT_DO_NOTHING=y
|
||||
# CONFIG_OPENSSL_ASSERT_EXIT is not set
|
||||
CONFIG_OPENSSL_ASSERT_EXIT=
|
||||
|
||||
#
|
||||
# PThreads
|
||||
@ -463,7 +462,7 @@ CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=2048
|
||||
#
|
||||
# SPI Flash driver
|
||||
#
|
||||
# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set
|
||||
CONFIG_SPI_FLASH_ENABLE_COUNTERS=
|
||||
CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y
|
||||
|
||||
#
|
||||
@ -476,10 +475,10 @@ CONFIG_SPIFFS_MAX_PARTITIONS=3
|
||||
#
|
||||
CONFIG_SPIFFS_CACHE=y
|
||||
CONFIG_SPIFFS_CACHE_WR=y
|
||||
# CONFIG_SPIFFS_CACHE_STATS is not set
|
||||
CONFIG_SPIFFS_CACHE_STATS=
|
||||
CONFIG_SPIFFS_PAGE_CHECK=y
|
||||
CONFIG_SPIFFS_GC_MAX_RUNS=10
|
||||
# CONFIG_SPIFFS_GC_STATS is not set
|
||||
CONFIG_SPIFFS_GC_STATS=
|
||||
CONFIG_SPIFFS_OBJ_NAME_LEN=32
|
||||
CONFIG_SPIFFS_USE_MAGIC=y
|
||||
CONFIG_SPIFFS_USE_MAGIC_LENGTH=y
|
||||
@ -487,12 +486,12 @@ CONFIG_SPIFFS_USE_MAGIC_LENGTH=y
|
||||
#
|
||||
# Debug Configuration
|
||||
#
|
||||
# CONFIG_SPIFFS_DBG is not set
|
||||
# CONFIG_SPIFFS_API_DBG is not set
|
||||
# CONFIG_SPIFFS_GC_DBG is not set
|
||||
# CONFIG_SPIFFS_CACHE_DBG is not set
|
||||
# CONFIG_SPIFFS_CHECK_DBG is not set
|
||||
# CONFIG_SPIFFS_TEST_VISUALISATION is not set
|
||||
CONFIG_SPIFFS_DBG=
|
||||
CONFIG_SPIFFS_API_DBG=
|
||||
CONFIG_SPIFFS_GC_DBG=
|
||||
CONFIG_SPIFFS_CACHE_DBG=
|
||||
CONFIG_SPIFFS_CHECK_DBG=
|
||||
CONFIG_SPIFFS_TEST_VISUALISATION=
|
||||
|
||||
#
|
||||
# tcpip adapter
|
||||
@ -502,6 +501,6 @@ CONFIG_IP_LOST_TIMER_INTERVAL=120
|
||||
#
|
||||
# Wear Levelling
|
||||
#
|
||||
# CONFIG_WL_SECTOR_SIZE_512 is not set
|
||||
CONFIG_WL_SECTOR_SIZE_512=
|
||||
CONFIG_WL_SECTOR_SIZE_4096=y
|
||||
CONFIG_WL_SECTOR_SIZE=4096
|
||||
|
Loading…
Reference in New Issue
Block a user