parent
7a76aded54
commit
bcc1d758fc
830 changed files with 4883 additions and 7632 deletions
12
platform.txt
12
platform.txt
File diff suppressed because one or more lines are too long
5399
tools/esptool.py
5399
tools/esptool.py
File diff suppressed because it is too large
Load diff
|
|
@ -55,6 +55,7 @@ env.Append(
|
|||
],
|
||||
|
||||
CCFLAGS=[
|
||||
"-Os",
|
||||
"-mlongcalls",
|
||||
"-ffunction-sections",
|
||||
"-fdata-sections",
|
||||
|
|
@ -64,7 +65,6 @@ env.Append(
|
|||
"-Wno-unused-parameter",
|
||||
"-Wno-sign-compare",
|
||||
"-ggdb",
|
||||
"-Os",
|
||||
"-freorder-blocks",
|
||||
"-Wwrite-strings",
|
||||
"-fstack-protector",
|
||||
|
|
@ -323,7 +323,7 @@ env.Append(
|
|||
"UNITY_INCLUDE_CONFIG_H",
|
||||
"WITH_POSIX",
|
||||
"_GNU_SOURCE",
|
||||
("IDF_VER", '\\"v4.4.2\\"'),
|
||||
("IDF_VER", '\\"v4.4.3\\"'),
|
||||
"ESP_PLATFORM",
|
||||
"_POSIX_READER_WRITER_LOCKS",
|
||||
"ARDUINO_ARCH_ESP32",
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ env.Append(
|
|||
],
|
||||
|
||||
CCFLAGS=[
|
||||
"-Os",
|
||||
"-ffunction-sections",
|
||||
"-fdata-sections",
|
||||
"-Wno-error=unused-function",
|
||||
|
|
@ -66,7 +67,6 @@ env.Append(
|
|||
"-Wno-error=format=",
|
||||
"-nostartfiles",
|
||||
"-Wno-format",
|
||||
"-Os",
|
||||
"-freorder-blocks",
|
||||
"-Wwrite-strings",
|
||||
"-fstack-protector",
|
||||
|
|
@ -317,7 +317,7 @@ env.Append(
|
|||
"UNITY_INCLUDE_CONFIG_H",
|
||||
"WITH_POSIX",
|
||||
"_GNU_SOURCE",
|
||||
("IDF_VER", '\\"v4.4.2\\"'),
|
||||
("IDF_VER", '\\"v4.4.3\\"'),
|
||||
"ESP_PLATFORM",
|
||||
"_POSIX_READER_WRITER_LOCKS",
|
||||
"ARDUINO_ARCH_ESP32",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
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.
|
|
@ -161,6 +161,7 @@
|
|||
#define CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY 1
|
||||
#define CONFIG_BT_SMP_ENABLE 1
|
||||
#define CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT 30
|
||||
#define CONFIG_BT_MAX_DEVICE_NAME_LEN 32
|
||||
#define CONFIG_BLE_MESH 1
|
||||
#define CONFIG_BLE_MESH_HCI_5_0 1
|
||||
#define CONFIG_BLE_MESH_USE_DUPLICATE_SCAN 1
|
||||
|
|
@ -289,6 +290,8 @@
|
|||
#define CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR 1
|
||||
#define CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES 4
|
||||
#define CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND 1
|
||||
#define CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND 1
|
||||
#define CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND 1
|
||||
#define CONFIG_ESP_IPC_TASK_STACK_SIZE 1024
|
||||
#define CONFIG_ESP_IPC_USES_CALLERS_PRIORITY 1
|
||||
#define CONFIG_ESP_IPC_ISR_ENABLE 1
|
||||
|
|
@ -759,5 +762,5 @@
|
|||
#define CONFIG_ULP_COPROC_ENABLED CONFIG_ESP32_ULP_COPROC_ENABLED
|
||||
#define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM
|
||||
#define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS
|
||||
#define CONFIG_ARDUINO_IDF_COMMIT "1b16ef6cfc"
|
||||
#define CONFIG_ARDUINO_IDF_COMMIT ""
|
||||
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4"
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -161,6 +161,7 @@
|
|||
#define CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY 1
|
||||
#define CONFIG_BT_SMP_ENABLE 1
|
||||
#define CONFIG_BT_BLE_ESTAB_LINK_CONN_TOUT 30
|
||||
#define CONFIG_BT_MAX_DEVICE_NAME_LEN 32
|
||||
#define CONFIG_BLE_MESH 1
|
||||
#define CONFIG_BLE_MESH_HCI_5_0 1
|
||||
#define CONFIG_BLE_MESH_USE_DUPLICATE_SCAN 1
|
||||
|
|
@ -289,6 +290,8 @@
|
|||
#define CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR 1
|
||||
#define CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES 4
|
||||
#define CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND 1
|
||||
#define CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND 1
|
||||
#define CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND 1
|
||||
#define CONFIG_ESP_IPC_TASK_STACK_SIZE 1024
|
||||
#define CONFIG_ESP_IPC_USES_CALLERS_PRIORITY 1
|
||||
#define CONFIG_ESP_IPC_ISR_ENABLE 1
|
||||
|
|
@ -759,5 +762,5 @@
|
|||
#define CONFIG_ULP_COPROC_ENABLED CONFIG_ESP32_ULP_COPROC_ENABLED
|
||||
#define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM
|
||||
#define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS
|
||||
#define CONFIG_ARDUINO_IDF_COMMIT "1b16ef6cfc"
|
||||
#define CONFIG_ARDUINO_IDF_COMMIT ""
|
||||
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4"
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -26,7 +26,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/// Type of hold a GPIO in low state
|
||||
// Type of hold a GPIO in low state
|
||||
typedef enum {
|
||||
GPIO_LONG_HOLD = 1, /*!< The long hold GPIO */
|
||||
GPIO_SHORT_HOLD = -1, /*!< The short hold GPIO */
|
||||
|
|
|
|||
|
|
@ -114,9 +114,9 @@ typedef struct {
|
|||
} esp_blufi_ap_record_t;
|
||||
|
||||
/// Bluetooth address length
|
||||
#define ESP_BD_ADDR_LEN 6
|
||||
#define ESP_BLUFI_BD_ADDR_LEN 6
|
||||
/// Bluetooth device address
|
||||
typedef uint8_t esp_bd_addr_t[ESP_BD_ADDR_LEN];
|
||||
typedef uint8_t esp_blufi_bd_addr_t[ESP_BLUFI_BD_ADDR_LEN];
|
||||
|
||||
/**
|
||||
* @brief BLUFI callback parameters union
|
||||
|
|
@ -147,7 +147,7 @@ typedef union {
|
|||
* @brief ESP_BLUFI_EVENT_CONNECT
|
||||
*/
|
||||
struct blufi_connect_evt_param {
|
||||
esp_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
|
||||
esp_blufi_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
|
||||
uint8_t server_if; /*!< server interface */
|
||||
uint16_t conn_id; /*!< Connection id */
|
||||
} connect; /*!< Blufi callback param of ESP_BLUFI_EVENT_CONNECT */
|
||||
|
|
@ -156,7 +156,7 @@ typedef union {
|
|||
* @brief ESP_BLUFI_EVENT_DISCONNECT
|
||||
*/
|
||||
struct blufi_disconnect_evt_param {
|
||||
esp_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
|
||||
esp_blufi_bd_addr_t remote_bda; /*!< Blufi Remote bluetooth device address */
|
||||
} disconnect; /*!< Blufi callback param of ESP_BLUFI_EVENT_DISCONNECT */
|
||||
|
||||
/* ESP_BLUFI_EVENT_REQ_WIFI_CONNECT */ /* No callback param */
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef _FIXED_PKT_QUEUE_H_
|
||||
#define _FIXED_PKT_QUEUE_H_
|
||||
|
||||
|
||||
#include "osi/pkt_queue.h"
|
||||
#include "osi/semaphore.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef FIXED_PKT_QUEUE_SIZE_MAX
|
||||
#define FIXED_PKT_QUEUE_SIZE_MAX 254
|
||||
#endif
|
||||
|
||||
#define FIXED_PKT_QUEUE_MAX_TIMEOUT OSI_SEM_MAX_TIMEOUT
|
||||
|
||||
struct fixed_pkt_queue_t;
|
||||
|
||||
typedef struct fixed_pkt_queue_t fixed_pkt_queue_t;
|
||||
|
||||
typedef void (*fixed_pkt_queue_free_cb)(pkt_linked_item_t *data);
|
||||
typedef void (*fixed_pkt_queue_cb)(fixed_pkt_queue_t *queue);
|
||||
|
||||
// Creates a new fixed queue with the given |capacity|. If more elements than
|
||||
// |capacity| are added to the queue, the caller is blocked until space is
|
||||
// made available in the queue. Returns NULL on failure. The caller must free
|
||||
// the returned queue with |fixed_pkt_queue_free|.
|
||||
fixed_pkt_queue_t *fixed_pkt_queue_new(size_t capacity);
|
||||
|
||||
// Freeing a queue that is currently in use (i.e. has waiters
|
||||
// blocked on it) results in undefined behaviour.
|
||||
void fixed_pkt_queue_free(fixed_pkt_queue_t *queue, fixed_pkt_queue_free_cb free_cb);
|
||||
|
||||
// Returns a value indicating whether the given |queue| is empty. If |queue|
|
||||
// is NULL, the return value is true.
|
||||
bool fixed_pkt_queue_is_empty(fixed_pkt_queue_t *queue);
|
||||
|
||||
// Returns the length of the |queue|. If |queue| is NULL, the return value
|
||||
// is 0.
|
||||
size_t fixed_pkt_queue_length(fixed_pkt_queue_t *queue);
|
||||
|
||||
// Returns the maximum number of elements this queue may hold. |queue| may
|
||||
// not be NULL.
|
||||
size_t fixed_pkt_queue_capacity(fixed_pkt_queue_t *queue);
|
||||
|
||||
// Enqueues the given |data| into the |queue|. The caller will be blocked or immediately return or wait for timeout according to the parameter timeout.
|
||||
// If enqueue failed, it will return false, otherwise return true
|
||||
bool fixed_pkt_queue_enqueue(fixed_pkt_queue_t *queue, pkt_linked_item_t *linked_pkt, uint32_t timeout);
|
||||
|
||||
// Dequeues the next element from |queue|. If the queue is currently empty,
|
||||
// this function will block the caller until an item is enqueued or immediately return or wait for timeout according to the parameter timeout.
|
||||
// If dequeue failed, it will return NULL, otherwise return a point.
|
||||
pkt_linked_item_t *fixed_pkt_queue_dequeue(fixed_pkt_queue_t *queue, uint32_t timeout);
|
||||
|
||||
// Returns the first element from |queue|, if present, without dequeuing it.
|
||||
// This function will never block the caller. Returns NULL if there are no
|
||||
// elements in the queue or |queue| is NULL.
|
||||
pkt_linked_item_t *fixed_pkt_queue_try_peek_first(fixed_pkt_queue_t *queue);
|
||||
|
||||
// Registers |queue| with |reactor| for dequeue operations. When there is an element
|
||||
// in the queue, ready_cb will be called. The |context| parameter is passed, untouched,
|
||||
// to the callback routine. Neither |queue|, nor |reactor|, nor |read_cb| may be NULL.
|
||||
// |context| may be NULL.
|
||||
void fixed_pkt_queue_register_dequeue(fixed_pkt_queue_t *queue, fixed_pkt_queue_cb ready_cb);
|
||||
|
||||
// Unregisters the dequeue ready callback for |queue| from whichever reactor
|
||||
// it is registered with, if any. This function is idempotent.
|
||||
void fixed_pkt_queue_unregister_dequeue(fixed_pkt_queue_t *queue);
|
||||
|
||||
void fixed_pkt_queue_process(fixed_pkt_queue_t *queue);
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef _PKT_LIST_H_
|
||||
#define _PKT_LIST_H_
|
||||
|
||||
#include "sys/queue.h"
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct pkt_queue;
|
||||
|
||||
typedef struct pkt_linked_item {
|
||||
STAILQ_ENTRY(pkt_linked_item) next;
|
||||
uint8_t data[];
|
||||
} pkt_linked_item_t;
|
||||
|
||||
#define BT_PKT_LINKED_HDR_SIZE (sizeof (pkt_linked_item_t))
|
||||
|
||||
typedef void (*pkt_queue_free_cb)(pkt_linked_item_t *item);
|
||||
|
||||
/*
|
||||
* brief: create a pkt_queue instance. pkt_queue is a wrapper class of a FIFO implemented by single linked list.
|
||||
* The enqueue and dequeue operations of the FIFO are protected against race conditions of multiple tasks
|
||||
* return: NULL if not enough memory, otherwise a valid pointer
|
||||
*/
|
||||
struct pkt_queue *pkt_queue_create(void);
|
||||
|
||||
/*
|
||||
* brief: enqueue one item to the FIFO
|
||||
* param queue: pkt_queue instance created using pkt_queue_create
|
||||
* param item: the item to be enqueued to the FIFO
|
||||
* return: true if enqueued successfully, false when the arguments passed in are invalid
|
||||
*/
|
||||
bool pkt_queue_enqueue(struct pkt_queue *queue, pkt_linked_item_t *item);
|
||||
|
||||
/*
|
||||
* brief: dequeue one item for the FIFO
|
||||
* param queue: pkt_queue instance created using pkt_queue_create
|
||||
* return: pointer of type pkt_linked_item_t dequeued, NULL if the queue is empty or upon exception
|
||||
*/
|
||||
pkt_linked_item_t *pkt_queue_dequeue(struct pkt_queue *queue);
|
||||
|
||||
/*
|
||||
* brief: get the pointer of the first item from the FIFO but not get it dequeued
|
||||
* param queue: pkt_queue instance created using pkt_queue_create
|
||||
* return: pointer of the first item in the FIFO, NULL if the FIFO is empty
|
||||
*/
|
||||
pkt_linked_item_t *pkt_queue_try_peek_first(struct pkt_queue *queue);
|
||||
|
||||
/*
|
||||
* brief: retrieve the number of items existing in the FIFO
|
||||
* param queue: pkt_queue instance created using pkt_queue_create
|
||||
* return: total number of items in the FIFO
|
||||
*/
|
||||
size_t pkt_queue_length(const struct pkt_queue *queue);
|
||||
|
||||
/*
|
||||
* brief: retrieve the status whether the FIFO is empty
|
||||
* param queue: pkt_queue instance created using pkt_queue_create
|
||||
* return: false if the FIFO is not empty, otherwise true
|
||||
*/
|
||||
bool pkt_queue_is_empty(const struct pkt_queue *queue);
|
||||
|
||||
/*
|
||||
* brief: delete the item in the FIFO one by one
|
||||
* param free_cb: destructor function for each item in the FIFO, if set to NULL, will use osi_free_func by default
|
||||
*/
|
||||
void pkt_queue_flush(struct pkt_queue *queue, pkt_queue_free_cb free_cb);
|
||||
|
||||
/*
|
||||
* brief: delete the items in the FIFO and then destroy the pkt_queue instance.
|
||||
* param free_cb: destructor function for each item in the FIFO, if set to NULL, will use osi_free_func by default
|
||||
*/
|
||||
void pkt_queue_destroy(struct pkt_queue *queue, pkt_queue_free_cb free_cb);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -28,6 +28,7 @@
|
|||
#define OSI_THREAD_MAX_TIMEOUT OSI_SEM_MAX_TIMEOUT
|
||||
|
||||
struct osi_thread;
|
||||
struct osi_event;
|
||||
|
||||
typedef struct osi_thread osi_thread_t;
|
||||
|
||||
|
|
@ -48,7 +49,7 @@ typedef enum {
|
|||
* param work_queue_num: speicify queue number, the queue[0] has highest priority, and the priority is decrease by index
|
||||
* return : if create successfully, return thread handler; otherwise return NULL.
|
||||
*/
|
||||
osi_thread_t *osi_thread_create(const char *name, size_t stack_size, int priority, osi_thread_core_t core, uint8_t work_queue_num);
|
||||
osi_thread_t *osi_thread_create(const char *name, size_t stack_size, int priority, osi_thread_core_t core, uint8_t work_queue_num, const size_t work_queue_len[]);
|
||||
|
||||
/*
|
||||
* brief: Destroy a thread or task
|
||||
|
|
@ -88,4 +89,42 @@ const char *osi_thread_name(osi_thread_t *thread);
|
|||
*/
|
||||
int osi_thread_queue_wait_size(osi_thread_t *thread, int wq_idx);
|
||||
|
||||
/*
|
||||
* brief: Create an osi_event struct and register the handler function and its argument
|
||||
* An osi_event is a kind of work that can be posted to the workqueue of osi_thread to process,
|
||||
* but the work can have at most one instance the thread workqueue before it is processed. This
|
||||
* allows the "single post, multiple data processing" jobs.
|
||||
* param func: the handler to process the job
|
||||
* param context: the argument to be passed to the handler function when the job is being processed
|
||||
* return: NULL if no memory, otherwise a valid struct pointer
|
||||
*/
|
||||
struct osi_event *osi_event_create(osi_thread_func_t func, void *context);
|
||||
|
||||
/*
|
||||
* brief: Bind an osi_event to a specific work queue for an osi_thread.
|
||||
* After binding is completed, a function call of API osi_thread_post_event will send a work
|
||||
* to the workqueue of the thread, with specified queue index.
|
||||
* param func: event: the pointer to osi_event that is created using osi_event_create
|
||||
* param thread: the pointer to osi_thread that is created using osi_thread_create
|
||||
* param queue_idx: the index of the workqueue of the specified osi_thread, with range starting from 0 to work_queue_num - 1
|
||||
* return: true if osi_event binds to the thread's workqueue successfully, otherwise false
|
||||
*/
|
||||
bool osi_event_bind(struct osi_event* event, osi_thread_t *thread, int queue_idx);
|
||||
|
||||
/*
|
||||
* brief: Destroy the osi_event struct created by osi_event_create and free the allocated memory
|
||||
* param event: the pointer to osi_event
|
||||
*/
|
||||
void osi_event_delete(struct osi_event* event);
|
||||
|
||||
/*
|
||||
* brief: try sending a work to the binded thread's workqueue, so that it can be handled by the worker thread
|
||||
* param event: pointer to osi_event, created by osi_event_create
|
||||
* param timeout: post timeout, OSI_THREAD_MAX_TIMEOUT means blocking forever, 0 means never blocking, others means block millisecond
|
||||
* return: true if the message is enqueued to the thread workqueue, otherwise failed
|
||||
* note: if the return value of function is false, it is the case that the workqueue of the thread is full, and users
|
||||
* are expected to post the event sometime later to get the work handled.
|
||||
*/
|
||||
bool osi_thread_post_event(struct osi_event *event, uint32_t timeout);
|
||||
|
||||
#endif /* __THREAD_H__ */
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ extern "C" {
|
|||
#define BLE_MESH_KEY_ANY 0xffff
|
||||
|
||||
#define BLE_MESH_ADDR_IS_UNICAST(addr) ((addr) && (addr) < 0x8000)
|
||||
#define BLE_MESH_ADDR_IS_GROUP(addr) ((addr) >= 0xc000 && (addr) <= 0xff00)
|
||||
#define BLE_MESH_ADDR_IS_GROUP(addr) ((addr) >= 0xc000 && (addr) < 0xff00)
|
||||
#define BLE_MESH_ADDR_IS_VIRTUAL(addr) ((addr) >= 0x8000 && (addr) < 0xc000)
|
||||
#define BLE_MESH_ADDR_IS_RFU(addr) ((addr) >= 0xff00 && (addr) <= 0xfffb)
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,6 @@ struct bt_mesh_friend {
|
|||
uint8_t fsn:1,
|
||||
send_last:1,
|
||||
pending_req:1,
|
||||
sec_update:1,
|
||||
pending_buf:1,
|
||||
valid:1,
|
||||
established:1;
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**@{
|
||||
* BLE_ADV_DATA_FLAG data flag bit definition used for advertising data flag
|
||||
/**
|
||||
* @brief BLE_ADV_DATA_FLAG data flag bit definition used for advertising data flag
|
||||
*/
|
||||
#define ESP_BLE_ADV_FLAG_LIMIT_DISC (0x01 << 0)
|
||||
#define ESP_BLE_ADV_FLAG_GEN_DISC (0x01 << 1)
|
||||
|
|
@ -34,104 +34,102 @@ extern "C" {
|
|||
#define ESP_BLE_ADV_FLAG_DMT_CONTROLLER_SPT (0x01 << 3)
|
||||
#define ESP_BLE_ADV_FLAG_DMT_HOST_SPT (0x01 << 4)
|
||||
#define ESP_BLE_ADV_FLAG_NON_LIMIT_DISC (0x00 )
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/* relate to BTM_LE_KEY_xxx in stack/btm_api.h */
|
||||
#define ESP_LE_KEY_NONE 0 /* relate to BTM_LE_KEY_NONE in stack/btm_api.h */
|
||||
#define ESP_LE_KEY_PENC (1 << 0) /*!< encryption key, encryption information of peer device */ /* relate to BTM_LE_KEY_PENC in stack/btm_api.h */
|
||||
#define ESP_LE_KEY_PID (1 << 1) /*!< identity key of the peer device */ /* relate to BTM_LE_KEY_PID in stack/btm_api.h */
|
||||
#define ESP_LE_KEY_PCSRK (1 << 2) /*!< peer SRK */ /* relate to BTM_LE_KEY_PCSRK in stack/btm_api.h */
|
||||
#define ESP_LE_KEY_PLK (1 << 3) /*!< Link key*/ /* relate to BTM_LE_KEY_PLK in stack/btm_api.h */
|
||||
#define ESP_LE_KEY_LLK (ESP_LE_KEY_PLK << 4) /* relate to BTM_LE_KEY_LLK in stack/btm_api.h */
|
||||
#define ESP_LE_KEY_LENC (ESP_LE_KEY_PENC << 4) /*!< master role security information:div */ /* relate to BTM_LE_KEY_LENC in stack/btm_api.h */
|
||||
#define ESP_LE_KEY_LID (ESP_LE_KEY_PID << 4) /*!< master device ID key */ /* relate to BTM_LE_KEY_LID in stack/btm_api.h */
|
||||
#define ESP_LE_KEY_LCSRK (ESP_LE_KEY_PCSRK << 4) /*!< local CSRK has been deliver to peer */ /* relate to BTM_LE_KEY_LCSRK in stack/btm_api.h */
|
||||
|
||||
/// relate to BTM_LE_KEY_xxx in stack/btm_api.h
|
||||
#define ESP_LE_KEY_NONE 0 /*!< No encryption key */
|
||||
#define ESP_LE_KEY_PENC (1 << 0) /*!< encryption key, encryption information of peer device */
|
||||
#define ESP_LE_KEY_PID (1 << 1) /*!< identity key of the peer device */
|
||||
#define ESP_LE_KEY_PCSRK (1 << 2) /*!< peer SRK */
|
||||
#define ESP_LE_KEY_PLK (1 << 3) /*!< Link key*/
|
||||
#define ESP_LE_KEY_LLK (ESP_LE_KEY_PLK << 4) /*!< peer link key*/
|
||||
#define ESP_LE_KEY_LENC (ESP_LE_KEY_PENC << 4) /*!< master role security information:div */
|
||||
#define ESP_LE_KEY_LID (ESP_LE_KEY_PID << 4) /*!< master device ID key */
|
||||
#define ESP_LE_KEY_LCSRK (ESP_LE_KEY_PCSRK << 4) /*!< local CSRK has been deliver to peer */
|
||||
typedef uint8_t esp_ble_key_type_t;
|
||||
|
||||
/* relate to BTM_LE_AUTH_xxx in stack/btm_api.h */
|
||||
#define ESP_LE_AUTH_NO_BOND 0x00 /*!< 0*/ /* relate to BTM_LE_AUTH_NO_BOND in stack/btm_api.h */
|
||||
#define ESP_LE_AUTH_BOND 0x01 /*!< 1 << 0 */ /* relate to BTM_LE_AUTH_BOND in stack/btm_api.h */
|
||||
#define ESP_LE_AUTH_REQ_MITM (1 << 2) /*!< 1 << 2 */ /* relate to BTM_LE_AUTH_REQ_MITM in stack/btm_api.h */
|
||||
#define ESP_LE_AUTH_REQ_BOND_MITM (ESP_LE_AUTH_BOND | ESP_LE_AUTH_REQ_MITM)/*!< 0101*/
|
||||
#define ESP_LE_AUTH_REQ_SC_ONLY (1 << 3) /*!< 1 << 3 */ /* relate to BTM_LE_AUTH_REQ_SC_ONLY in stack/btm_api.h */
|
||||
#define ESP_LE_AUTH_REQ_SC_BOND (ESP_LE_AUTH_BOND | ESP_LE_AUTH_REQ_SC_ONLY) /*!< 1001 */ /* relate to BTM_LE_AUTH_REQ_SC_BOND in stack/btm_api.h */
|
||||
#define ESP_LE_AUTH_REQ_SC_MITM (ESP_LE_AUTH_REQ_MITM | ESP_LE_AUTH_REQ_SC_ONLY) /*!< 1100 */ /* relate to BTM_LE_AUTH_REQ_SC_MITM in stack/btm_api.h */
|
||||
#define ESP_LE_AUTH_REQ_SC_MITM_BOND (ESP_LE_AUTH_REQ_MITM | ESP_LE_AUTH_REQ_SC_ONLY | ESP_LE_AUTH_BOND) /*!< 1101 */ /* relate to BTM_LE_AUTH_REQ_SC_MITM_BOND in stack/btm_api.h */
|
||||
/// relate to BTM_LE_AUTH_xxx in stack/btm_api.h
|
||||
#define ESP_LE_AUTH_NO_BOND 0x00 /*!< 0 no bondingv*/
|
||||
#define ESP_LE_AUTH_BOND 0x01 /*!< 1 << 0 device in the bonding with peer */
|
||||
#define ESP_LE_AUTH_REQ_MITM (1 << 2) /*!< 1 << 2 man in the middle attack */
|
||||
#define ESP_LE_AUTH_REQ_BOND_MITM (ESP_LE_AUTH_BOND | ESP_LE_AUTH_REQ_MITM) /*!< 0101 banding with man in the middle attack */
|
||||
#define ESP_LE_AUTH_REQ_SC_ONLY (1 << 3) /*!< 1 << 3 secure connection */
|
||||
#define ESP_LE_AUTH_REQ_SC_BOND (ESP_LE_AUTH_BOND | ESP_LE_AUTH_REQ_SC_ONLY) /*!< 1001 secure connection with band*/
|
||||
#define ESP_LE_AUTH_REQ_SC_MITM (ESP_LE_AUTH_REQ_MITM | ESP_LE_AUTH_REQ_SC_ONLY) /*!< 1100 secure conn with MITM */
|
||||
#define ESP_LE_AUTH_REQ_SC_MITM_BOND (ESP_LE_AUTH_REQ_MITM | ESP_LE_AUTH_REQ_SC_ONLY | ESP_LE_AUTH_BOND) /*!< 1101 SC with MITM and Bonding*/
|
||||
typedef uint8_t esp_ble_auth_req_t; /*!< combination of the above bit pattern */
|
||||
|
||||
#define ESP_BLE_ONLY_ACCEPT_SPECIFIED_AUTH_DISABLE 0
|
||||
#define ESP_BLE_ONLY_ACCEPT_SPECIFIED_AUTH_ENABLE 1
|
||||
#define ESP_BLE_ONLY_ACCEPT_SPECIFIED_AUTH_DISABLE 0 /*!< authentication disable*/
|
||||
#define ESP_BLE_ONLY_ACCEPT_SPECIFIED_AUTH_ENABLE 1 /*!< authentication enable*/
|
||||
|
||||
#define ESP_BLE_OOB_DISABLE 0
|
||||
#define ESP_BLE_OOB_ENABLE 1
|
||||
#define ESP_BLE_OOB_DISABLE 0 /*!< disbale the out of bond*/
|
||||
#define ESP_BLE_OOB_ENABLE 1 /*!< enable the out of bond*/
|
||||
|
||||
/* relate to BTM_IO_CAP_xxx in stack/btm_api.h */
|
||||
#define ESP_IO_CAP_OUT 0 /*!< DisplayOnly */ /* relate to BTM_IO_CAP_OUT in stack/btm_api.h */
|
||||
#define ESP_IO_CAP_IO 1 /*!< DisplayYesNo */ /* relate to BTM_IO_CAP_IO in stack/btm_api.h */
|
||||
#define ESP_IO_CAP_IN 2 /*!< KeyboardOnly */ /* relate to BTM_IO_CAP_IN in stack/btm_api.h */
|
||||
#define ESP_IO_CAP_NONE 3 /*!< NoInputNoOutput */ /* relate to BTM_IO_CAP_NONE in stack/btm_api.h */
|
||||
#define ESP_IO_CAP_KBDISP 4 /*!< Keyboard display */ /* relate to BTM_IO_CAP_KBDISP in stack/btm_api.h */
|
||||
/// relate to BTM_IO_CAP_xxx in stack/btm_api.h
|
||||
#define ESP_IO_CAP_OUT 0 /*!< DisplayOnly */
|
||||
#define ESP_IO_CAP_IO 1 /*!< DisplayYesNo */
|
||||
#define ESP_IO_CAP_IN 2 /*!< KeyboardOnly */
|
||||
#define ESP_IO_CAP_NONE 3 /*!< NoInputNoOutput */
|
||||
#define ESP_IO_CAP_KBDISP 4 /*!< Keyboard display */
|
||||
|
||||
#define ESP_BLE_APPEARANCE_UNKNOWN 0x0000 /* relate to BTM_BLE_APPEARANCE_UNKNOWN in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_PHONE 0x0040 /* relate to BTM_BLE_APPEARANCE_GENERIC_PHONE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_COMPUTER 0x0080 /* relate to BTM_BLE_APPEARANCE_GENERIC_COMPUTER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_WATCH 0x00C0 /* relate to BTM_BLE_APPEARANCE_GENERIC_WATCH in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_SPORTS_WATCH 0x00C1 /* relate to BTM_BLE_APPEARANCE_SPORTS_WATCH in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_CLOCK 0x0100 /* relate to BTM_BLE_APPEARANCE_GENERIC_CLOCK in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_DISPLAY 0x0140 /* relate to BTM_BLE_APPEARANCE_GENERIC_DISPLAY in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_REMOTE 0x0180 /* relate to BTM_BLE_APPEARANCE_GENERIC_REMOTE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_EYEGLASSES 0x01C0 /* relate to BTM_BLE_APPEARANCE_GENERIC_EYEGLASSES in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_TAG 0x0200 /* relate to BTM_BLE_APPEARANCE_GENERIC_TAG in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_KEYRING 0x0240 /* relate to BTM_BLE_APPEARANCE_GENERIC_KEYRING in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_MEDIA_PLAYER 0x0280 /* relate to BTM_BLE_APPEARANCE_GENERIC_MEDIA_PLAYER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_BARCODE_SCANNER 0x02C0 /* relate to BTM_BLE_APPEARANCE_GENERIC_BARCODE_SCANNER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_THERMOMETER 0x0300 /* relate to BTM_BLE_APPEARANCE_GENERIC_THERMOMETER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_THERMOMETER_EAR 0x0301 /* relate to BTM_BLE_APPEARANCE_THERMOMETER_EAR in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_HEART_RATE 0x0340 /* relate to BTM_BLE_APPEARANCE_GENERIC_HEART_RATE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HEART_RATE_BELT 0x0341 /* relate to BTM_BLE_APPEARANCE_HEART_RATE_BELT in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE 0x0380 /* relate to BTM_BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_BLOOD_PRESSURE_ARM 0x0381 /* relate to BTM_BLE_APPEARANCE_BLOOD_PRESSURE_ARM in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_BLOOD_PRESSURE_WRIST 0x0382 /* relate to BTM_BLE_APPEARANCE_BLOOD_PRESSURE_WRIST in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_HID 0x03C0 /* relate to BTM_BLE_APPEARANCE_GENERIC_HID in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_KEYBOARD 0x03C1 /* relate to BTM_BLE_APPEARANCE_HID_KEYBOARD in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_MOUSE 0x03C2 /* relate to BTM_BLE_APPEARANCE_HID_MOUSE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_JOYSTICK 0x03C3 /* relate to BTM_BLE_APPEARANCE_HID_JOYSTICK in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_GAMEPAD 0x03C4 /* relate to BTM_BLE_APPEARANCE_HID_GAMEPAD in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_DIGITIZER_TABLET 0x03C5 /* relate to BTM_BLE_APPEARANCE_HID_DIGITIZER_TABLET in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_CARD_READER 0x03C6 /* relate to BTM_BLE_APPEARANCE_HID_CARD_READER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_DIGITAL_PEN 0x03C7 /* relate to BTM_BLE_APPEARANCE_HID_DIGITAL_PEN in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_BARCODE_SCANNER 0x03C8 /* relate to BTM_BLE_APPEARANCE_HID_BARCODE_SCANNER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_GLUCOSE 0x0400 /* relate to BTM_BLE_APPEARANCE_GENERIC_GLUCOSE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_WALKING 0x0440 /* relate to BTM_BLE_APPEARANCE_GENERIC_WALKING in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_WALKING_IN_SHOE 0x0441 /* relate to BTM_BLE_APPEARANCE_WALKING_IN_SHOE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_WALKING_ON_SHOE 0x0442 /* relate to BTM_BLE_APPEARANCE_WALKING_ON_SHOE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_WALKING_ON_HIP 0x0443 /* relate to BTM_BLE_APPEARANCE_WALKING_ON_HIP in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_CYCLING 0x0480 /* relate to BTM_BLE_APPEARANCE_GENERIC_CYCLING in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_CYCLING_COMPUTER 0x0481 /* relate to BTM_BLE_APPEARANCE_CYCLING_COMPUTER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_CYCLING_SPEED 0x0482 /* relate to BTM_BLE_APPEARANCE_CYCLING_SPEED in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_CYCLING_CADENCE 0x0483 /* relate to BTM_BLE_APPEARANCE_CYCLING_CADENCE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_CYCLING_POWER 0x0484 /* relate to BTM_BLE_APPEARANCE_CYCLING_POWER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_CYCLING_SPEED_CADENCE 0x0485 /* relate to BTM_BLE_APPEARANCE_CYCLING_SPEED_CADENCE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_PULSE_OXIMETER 0x0C40 /* relate to BTM_BLE_APPEARANCE_GENERIC_PULSE_OXIMETER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP 0x0C41 /* relate to BTM_BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_PULSE_OXIMETER_WRIST 0x0C42 /* relate to BTM_BLE_APPEARANCE_PULSE_OXIMETER_WRIST in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_WEIGHT 0x0C80 /* relate to BTM_BLE_APPEARANCE_GENERIC_WEIGHT in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_PERSONAL_MOBILITY_DEVICE 0x0CC0 /* relate to BTM_BLE_APPEARANCE_GENERIC_PERSONAL_MOBILITY_DEVICE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_POWERED_WHEELCHAIR 0x0CC1 /* relate to BTM_BLE_APPEARANCE_POWERED_WHEELCHAIR in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_MOBILITY_SCOOTER 0x0CC2 /* relate to BTM_BLE_APPEARANCE_MOBILITY_SCOOTER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_CONTINUOUS_GLUCOSE_MONITOR 0x0D00 /* relate to BTM_BLE_APPEARANCE_GENERIC_CONTINUOUS_GLUCOSE_MONITOR in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_INSULIN_PUMP 0x0D40 /* relate to BTM_BLE_APPEARANCE_GENERIC_INSULIN_PUMP in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_INSULIN_PUMP_DURABLE_PUMP 0x0D41 /* relate to BTM_BLE_APPEARANCE_INSULIN_PUMP_DURABLE_PUMP in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_INSULIN_PUMP_PATCH_PUMP 0x0D44 /* relate to BTM_BLE_APPEARANCE_INSULIN_PUMP_PATCH_PUMP in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_INSULIN_PEN 0x0D48 /* relate to BTM_BLE_APPEARANCE_INSULIN_PEN in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_MEDICATION_DELIVERY 0x0D80 /* relate to BTM_BLE_APPEARANCE_GENERIC_MEDICATION_DELIVERY in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS 0x1440 /* relate to BTM_BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION 0x1441 /* relate to BTM_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_AND_NAV 0x1442 /* relate to BTM_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_AND_NAV in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_POD 0x1443 /* relate to BTM_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_POD in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_POD_AND_NAV 0x1444 /* relate to BTM_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_POD_AND_NAV in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_UNKNOWN 0x0000 /*!< relate to BTM_BLE_APPEARANCE_UNKNOWN in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_PHONE 0x0040 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_PHONE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_COMPUTER 0x0080 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_COMPUTER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_WATCH 0x00C0 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_WATCH in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_SPORTS_WATCH 0x00C1 /*!< relate to BTM_BLE_APPEARANCE_SPORTS_WATCH in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_CLOCK 0x0100 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_CLOCK in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_DISPLAY 0x0140 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_DISPLAY in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_REMOTE 0x0180 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_REMOTE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_EYEGLASSES 0x01C0 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_EYEGLASSES in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_TAG 0x0200 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_TAG in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_KEYRING 0x0240 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_KEYRING in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_MEDIA_PLAYER 0x0280 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_MEDIA_PLAYER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_BARCODE_SCANNER 0x02C0 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_BARCODE_SCANNER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_THERMOMETER 0x0300 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_THERMOMETER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_THERMOMETER_EAR 0x0301 /*!< relate to BTM_BLE_APPEARANCE_THERMOMETER_EAR in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_HEART_RATE 0x0340 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_HEART_RATE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HEART_RATE_BELT 0x0341 /*!< relate to BTM_BLE_APPEARANCE_HEART_RATE_BELT in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE 0x0380 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_BLOOD_PRESSURE_ARM 0x0381 /*!< relate to BTM_BLE_APPEARANCE_BLOOD_PRESSURE_ARM in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_BLOOD_PRESSURE_WRIST 0x0382 /*!< relate to BTM_BLE_APPEARANCE_BLOOD_PRESSURE_WRIST in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_HID 0x03C0 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_HID in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_KEYBOARD 0x03C1 /*!< relate to BTM_BLE_APPEARANCE_HID_KEYBOARD in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_MOUSE 0x03C2 /*!< relate to BTM_BLE_APPEARANCE_HID_MOUSE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_JOYSTICK 0x03C3 /*!< relate to BTM_BLE_APPEARANCE_HID_JOYSTICK in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_GAMEPAD 0x03C4 /*!< relate to BTM_BLE_APPEARANCE_HID_GAMEPAD in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_DIGITIZER_TABLET 0x03C5 /*!< relate to BTM_BLE_APPEARANCE_HID_DIGITIZER_TABLET in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_CARD_READER 0x03C6 /*!< relate to BTM_BLE_APPEARANCE_HID_CARD_READER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_DIGITAL_PEN 0x03C7 /*!< relate to BTM_BLE_APPEARANCE_HID_DIGITAL_PEN in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_HID_BARCODE_SCANNER 0x03C8 /*!< relate to BTM_BLE_APPEARANCE_HID_BARCODE_SCANNER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_GLUCOSE 0x0400 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_GLUCOSE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_WALKING 0x0440 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_WALKING in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_WALKING_IN_SHOE 0x0441 /*!< relate to BTM_BLE_APPEARANCE_WALKING_IN_SHOE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_WALKING_ON_SHOE 0x0442 /*!< relate to BTM_BLE_APPEARANCE_WALKING_ON_SHOE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_WALKING_ON_HIP 0x0443 /*!< relate to BTM_BLE_APPEARANCE_WALKING_ON_HIP in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_CYCLING 0x0480 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_CYCLING in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_CYCLING_COMPUTER 0x0481 /*!< relate to BTM_BLE_APPEARANCE_CYCLING_COMPUTER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_CYCLING_SPEED 0x0482 /*!< relate to BTM_BLE_APPEARANCE_CYCLING_SPEED in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_CYCLING_CADENCE 0x0483 /*!< relate to BTM_BLE_APPEARANCE_CYCLING_CADENCE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_CYCLING_POWER 0x0484 /*!< relate to BTM_BLE_APPEARANCE_CYCLING_POWER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_CYCLING_SPEED_CADENCE 0x0485 /*!< relate to BTM_BLE_APPEARANCE_CYCLING_SPEED_CADENCE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_PULSE_OXIMETER 0x0C40 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_PULSE_OXIMETER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP 0x0C41 /*!< relate to BTM_BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_PULSE_OXIMETER_WRIST 0x0C42 /*!< relate to BTM_BLE_APPEARANCE_PULSE_OXIMETER_WRIST in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_WEIGHT 0x0C80 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_WEIGHT in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_PERSONAL_MOBILITY_DEVICE 0x0CC0 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_PERSONAL_MOBILITY_DEVICE in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_POWERED_WHEELCHAIR 0x0CC1 /*!< relate to BTM_BLE_APPEARANCE_POWERED_WHEELCHAIR in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_MOBILITY_SCOOTER 0x0CC2 /*!< relate to BTM_BLE_APPEARANCE_MOBILITY_SCOOTER in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_CONTINUOUS_GLUCOSE_MONITOR 0x0D00 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_CONTINUOUS_GLUCOSE_MONITOR in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_INSULIN_PUMP 0x0D40 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_INSULIN_PUMP in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_INSULIN_PUMP_DURABLE_PUMP 0x0D41 /*!< relate to BTM_BLE_APPEARANCE_INSULIN_PUMP_DURABLE_PUMP in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_INSULIN_PUMP_PATCH_PUMP 0x0D44 /*!< relate to BTM_BLE_APPEARANCE_INSULIN_PUMP_PATCH_PUMP in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_INSULIN_PEN 0x0D48 /*!< relate to BTM_BLE_APPEARANCE_INSULIN_PEN in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_MEDICATION_DELIVERY 0x0D80 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_MEDICATION_DELIVERY in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS 0x1440 /*!< relate to BTM_BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION 0x1441 /*!< relate to BTM_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_AND_NAV 0x1442 /*!< relate to BTM_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_AND_NAV in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_POD 0x1443 /*!< relate to BTM_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_POD in stack/btm_ble_api.h */
|
||||
#define ESP_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_POD_AND_NAV 0x1444 /*!< relate to BTM_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_POD_AND_NAV in stack/btm_ble_api.h */
|
||||
|
||||
typedef uint8_t esp_ble_io_cap_t; /*!< combination of the io capability */
|
||||
|
||||
|
|
@ -147,15 +145,15 @@ typedef enum {
|
|||
ESP_GAP_BLE_ADV_START_COMPLETE_EVT, /*!< When start advertising complete, the event comes */
|
||||
ESP_GAP_BLE_SCAN_START_COMPLETE_EVT, /*!< When start scan complete, the event comes */
|
||||
#endif // #if (BLE_42_FEATURE_SUPPORT == TRUE)
|
||||
ESP_GAP_BLE_AUTH_CMPL_EVT = 8, /* Authentication complete indication. */
|
||||
ESP_GAP_BLE_KEY_EVT, /* BLE key event for peer device keys */
|
||||
ESP_GAP_BLE_SEC_REQ_EVT, /* BLE security request */
|
||||
ESP_GAP_BLE_PASSKEY_NOTIF_EVT, /* passkey notification event */
|
||||
ESP_GAP_BLE_PASSKEY_REQ_EVT, /* passkey request event */
|
||||
ESP_GAP_BLE_OOB_REQ_EVT, /* OOB request event */
|
||||
ESP_GAP_BLE_LOCAL_IR_EVT, /* BLE local IR event */
|
||||
ESP_GAP_BLE_LOCAL_ER_EVT, /* BLE local ER event */
|
||||
ESP_GAP_BLE_NC_REQ_EVT, /* Numeric Comparison request event */
|
||||
ESP_GAP_BLE_AUTH_CMPL_EVT = 8, /*!< Authentication complete indication. */
|
||||
ESP_GAP_BLE_KEY_EVT, /*!< BLE key event for peer device keys */
|
||||
ESP_GAP_BLE_SEC_REQ_EVT, /*!< BLE security request */
|
||||
ESP_GAP_BLE_PASSKEY_NOTIF_EVT, /*!< passkey notification event */
|
||||
ESP_GAP_BLE_PASSKEY_REQ_EVT, /*!< passkey request event */
|
||||
ESP_GAP_BLE_OOB_REQ_EVT, /*!< OOB request event */
|
||||
ESP_GAP_BLE_LOCAL_IR_EVT, /*!< BLE local IR (identity Root 128-bit random static value used to generate Long Term Key) event */
|
||||
ESP_GAP_BLE_LOCAL_ER_EVT, /*!< BLE local ER (Encryption Root vakue used to genrate identity resolving key) event */
|
||||
ESP_GAP_BLE_NC_REQ_EVT, /*!< Numeric Comparison request event */
|
||||
#if (BLE_42_FEATURE_SUPPORT == TRUE)
|
||||
ESP_GAP_BLE_ADV_STOP_COMPLETE_EVT, /*!< When stop adv complete, the event comes */
|
||||
ESP_GAP_BLE_SCAN_STOP_COMPLETE_EVT, /*!< When stop scan complete, the event comes */
|
||||
|
|
@ -174,45 +172,45 @@ typedef enum {
|
|||
#endif //#if (BLE_42_FEATURE_SUPPORT == TRUE)
|
||||
ESP_GAP_BLE_SET_CHANNELS_EVT = 29, /*!< When setting BLE channels complete, the event comes */
|
||||
#if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
ESP_GAP_BLE_READ_PHY_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_SET_PREFERED_DEFAULT_PHY_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_SET_PREFERED_PHY_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_EXT_ADV_SET_REMOVE_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_EXT_ADV_SET_CLEAR_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_PERIODIC_ADV_STOP_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_PERIODIC_ADV_CREATE_SYNC_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_PERIODIC_ADV_SYNC_CANCEL_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_PERIODIC_ADV_SYNC_TERMINATE_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_PERIODIC_ADV_ADD_DEV_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_PERIODIC_ADV_REMOVE_DEV_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_PERIODIC_ADV_CLEAR_DEV_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_SET_EXT_SCAN_PARAMS_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_EXT_SCAN_START_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_EXT_SCAN_STOP_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_PREFER_EXT_CONN_PARAMS_SET_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_PHY_UPDATE_COMPLETE_EVT,
|
||||
ESP_GAP_BLE_EXT_ADV_REPORT_EVT,
|
||||
ESP_GAP_BLE_SCAN_TIMEOUT_EVT,
|
||||
ESP_GAP_BLE_ADV_TERMINATED_EVT,
|
||||
ESP_GAP_BLE_SCAN_REQ_RECEIVED_EVT,
|
||||
ESP_GAP_BLE_CHANNEL_SELETE_ALGORITHM_EVT,
|
||||
ESP_GAP_BLE_PERIODIC_ADV_REPORT_EVT,
|
||||
ESP_GAP_BLE_PERIODIC_ADV_SYNC_LOST_EVT,
|
||||
ESP_GAP_BLE_PERIODIC_ADV_SYNC_ESTAB_EVT,
|
||||
ESP_GAP_BLE_READ_PHY_COMPLETE_EVT, /*!< when reading phy complete, this event comes */
|
||||
ESP_GAP_BLE_SET_PREFERED_DEFAULT_PHY_COMPLETE_EVT, /*!< when preferred default phy complete, this event comes */
|
||||
ESP_GAP_BLE_SET_PREFERED_PHY_COMPLETE_EVT, /*!< when preferred phy complete , this event comes */
|
||||
ESP_GAP_BLE_EXT_ADV_SET_RAND_ADDR_COMPLETE_EVT, /*!< when extended set random address complete, the event comes */
|
||||
ESP_GAP_BLE_EXT_ADV_SET_PARAMS_COMPLETE_EVT, /*!< when extended advertising parameter complete, the event comes */
|
||||
ESP_GAP_BLE_EXT_ADV_DATA_SET_COMPLETE_EVT, /*!< when extended advertising data complete, the event comes */
|
||||
ESP_GAP_BLE_EXT_SCAN_RSP_DATA_SET_COMPLETE_EVT, /*!< when extended scan response data complete, the event comes */
|
||||
ESP_GAP_BLE_EXT_ADV_START_COMPLETE_EVT, /*!< when extended advertising start complete, the event comes */
|
||||
ESP_GAP_BLE_EXT_ADV_STOP_COMPLETE_EVT, /*!< when extended advertising stop complete, the event comes */
|
||||
ESP_GAP_BLE_EXT_ADV_SET_REMOVE_COMPLETE_EVT, /*!< when extended advertising set remove complete, the event comes */
|
||||
ESP_GAP_BLE_EXT_ADV_SET_CLEAR_COMPLETE_EVT, /*!< when extended advertising set clear complete, the event comes */
|
||||
ESP_GAP_BLE_PERIODIC_ADV_SET_PARAMS_COMPLETE_EVT, /*!< when periodic advertising parameter complete, the event comes */
|
||||
ESP_GAP_BLE_PERIODIC_ADV_DATA_SET_COMPLETE_EVT, /*!< when periodic advertising data complete, the event comes */
|
||||
ESP_GAP_BLE_PERIODIC_ADV_START_COMPLETE_EVT, /*!< when periodic advertising start complete, the event comes */
|
||||
ESP_GAP_BLE_PERIODIC_ADV_STOP_COMPLETE_EVT, /*!< when periodic advertising stop complete, the event comes */
|
||||
ESP_GAP_BLE_PERIODIC_ADV_CREATE_SYNC_COMPLETE_EVT, /*!< when periodic advertising create sync complete, the event comes */
|
||||
ESP_GAP_BLE_PERIODIC_ADV_SYNC_CANCEL_COMPLETE_EVT, /*!< when extended advertising sync cancel complete, the event comes */
|
||||
ESP_GAP_BLE_PERIODIC_ADV_SYNC_TERMINATE_COMPLETE_EVT, /*!< when extended advertising sync terminate complete, the event comes */
|
||||
ESP_GAP_BLE_PERIODIC_ADV_ADD_DEV_COMPLETE_EVT, /*!< when extended advertising add device complete , the event comes */
|
||||
ESP_GAP_BLE_PERIODIC_ADV_REMOVE_DEV_COMPLETE_EVT, /*!< when extended advertising remove device complete, the event comes */
|
||||
ESP_GAP_BLE_PERIODIC_ADV_CLEAR_DEV_COMPLETE_EVT, /*!< when extended advertising clear device, the event comes */
|
||||
ESP_GAP_BLE_SET_EXT_SCAN_PARAMS_COMPLETE_EVT, /*!< when extended scan parameter complete, the event comes */
|
||||
ESP_GAP_BLE_EXT_SCAN_START_COMPLETE_EVT, /*!< when extended scan start complete, the event comes */
|
||||
ESP_GAP_BLE_EXT_SCAN_STOP_COMPLETE_EVT, /*!< when extended scan stop complete, the event comes */
|
||||
ESP_GAP_BLE_PREFER_EXT_CONN_PARAMS_SET_COMPLETE_EVT, /*!< when extended prefer connection parameter set complete, the event comes */
|
||||
ESP_GAP_BLE_PHY_UPDATE_COMPLETE_EVT, /*!< when ble phy update complete, the event comes */
|
||||
ESP_GAP_BLE_EXT_ADV_REPORT_EVT, /*!< when extended advertising report complete, the event comes */
|
||||
ESP_GAP_BLE_SCAN_TIMEOUT_EVT, /*!< when scan timeout complete, the event comes */
|
||||
ESP_GAP_BLE_ADV_TERMINATED_EVT, /*!< when advertising terminate data complete, the event comes */
|
||||
ESP_GAP_BLE_SCAN_REQ_RECEIVED_EVT, /*!< when scan req received complete, the event comes */
|
||||
ESP_GAP_BLE_CHANNEL_SELETE_ALGORITHM_EVT, /*!< when channel select algorithm complete, the event comes */
|
||||
ESP_GAP_BLE_PERIODIC_ADV_REPORT_EVT, /*!< when periodic report advertising complete, the event comes */
|
||||
ESP_GAP_BLE_PERIODIC_ADV_SYNC_LOST_EVT, /*!< when periodic advertising sync lost complete, the event comes */
|
||||
ESP_GAP_BLE_PERIODIC_ADV_SYNC_ESTAB_EVT, /*!< when periodic advertising sync establish complete, the event comes */
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
ESP_GAP_BLE_EVT_MAX,
|
||||
ESP_GAP_BLE_EVT_MAX, /*!< when maximum advertising event complete, the event comes */
|
||||
} esp_gap_ble_cb_event_t;
|
||||
|
||||
#define ESP_GAP_BLE_CHANNELS_LEN 5
|
||||
#define ESP_GAP_BLE_CHANNELS_LEN 5 /*!< channel length*/
|
||||
typedef uint8_t esp_gap_ble_channels[ESP_GAP_BLE_CHANNELS_LEN];
|
||||
|
||||
/// This is the old name, just for backwards compatibility
|
||||
|
|
@ -296,46 +294,47 @@ typedef enum {
|
|||
|
||||
/* relate to BTA_DM_BLE_SEC_xxx in bta/bta_api.h */
|
||||
typedef enum {
|
||||
ESP_BLE_SEC_ENCRYPT = 1, /* relate to BTA_DM_BLE_SEC_ENCRYPT in bta/bta_api.h. If the device has already
|
||||
bonded, the stack will used LTK to encrypt with the remote device directly.
|
||||
ESP_BLE_SEC_ENCRYPT = 1, /*!< relate to BTA_DM_BLE_SEC_ENCRYPT in bta/bta_api.h. If the device has already
|
||||
bonded, the stack will used Long Term Key (LTK) to encrypt with the remote device directly.
|
||||
Else if the device hasn't bonded, the stack will used the default authentication request
|
||||
used the esp_ble_gap_set_security_param function set by the user. */
|
||||
ESP_BLE_SEC_ENCRYPT_NO_MITM, /* relate to BTA_DM_BLE_SEC_ENCRYPT_NO_MITM in bta/bta_api.h. If the device has already
|
||||
bonded, the stack will check the LTK Whether the authentication request has been met, if met, used the LTK
|
||||
to encrypt with the remote device directly, else Re-pair with the remote device.
|
||||
Else if the device hasn't bonded, the stack will used NO MITM authentication request in the current link instead of
|
||||
used the authreq in the esp_ble_gap_set_security_param function set by the user. */
|
||||
ESP_BLE_SEC_ENCRYPT_MITM, /* relate to BTA_DM_BLE_SEC_ENCRYPT_MITM in bta/bta_api.h. If the device has already
|
||||
bonded, the stack will check the LTK Whether the authentication request has been met, if met, used the LTK
|
||||
to encrypt with the remote device directly, else Re-pair with the remote device.
|
||||
Else if the device hasn't bonded, the stack will used MITM authentication request in the current link instead of
|
||||
used the authreq in the esp_ble_gap_set_security_param function set by the user. */
|
||||
ESP_BLE_SEC_ENCRYPT_NO_MITM, /*!< relate to BTA_DM_BLE_SEC_ENCRYPT_NO_MITM in bta/bta_api.h. If the device has been already
|
||||
bonded, the stack will check the LTK (Long Term Key) Whether the authentication request has been met, and if met, use the LTK
|
||||
to encrypt with the remote device directly, else re-pair with the remote device.
|
||||
Else if the device hasn't been bonded, the stack will use NO MITM authentication request in the current link instead of
|
||||
using the authreq in the esp_ble_gap_set_security_param function set by the user. */
|
||||
ESP_BLE_SEC_ENCRYPT_MITM, /*!< relate to BTA_DM_BLE_SEC_ENCRYPT_MITM in bta/bta_api.h. If the device has been already
|
||||
bonded, the stack will check the LTK (Long Term Key) whether the authentication request has been met, and if met, use the LTK
|
||||
to encrypt with the remote device directly, else re-pair with the remote device.
|
||||
Else if the device hasn't been bonded, the stack will use MITM authentication request in the current link instead of
|
||||
using the authreq in the esp_ble_gap_set_security_param function set by the user. */
|
||||
}esp_ble_sec_act_t;
|
||||
|
||||
typedef enum {
|
||||
ESP_BLE_SM_PASSKEY = 0,
|
||||
/* Authentication requirements of local device */
|
||||
/*!< Authentication requirements of local device */
|
||||
ESP_BLE_SM_AUTHEN_REQ_MODE,
|
||||
/* The IO capability of local device */
|
||||
/*!< The IO capability of local device */
|
||||
ESP_BLE_SM_IOCAP_MODE,
|
||||
/* Initiator Key Distribution/Generation */
|
||||
/*!< Initiator Key Distribution/Generation */
|
||||
ESP_BLE_SM_SET_INIT_KEY,
|
||||
/* Responder Key Distribution/Generation */
|
||||
/*!< Responder Key Distribution/Generation */
|
||||
ESP_BLE_SM_SET_RSP_KEY,
|
||||
/* Maximum Encryption key size to support */
|
||||
/*!< Maximum Encryption key size to support */
|
||||
ESP_BLE_SM_MAX_KEY_SIZE,
|
||||
/* Minimum Encryption key size requirement from Peer */
|
||||
/*!< Minimum Encryption key size requirement from Peer */
|
||||
ESP_BLE_SM_MIN_KEY_SIZE,
|
||||
/* Set static Passkey */
|
||||
/*!< Set static Passkey */
|
||||
ESP_BLE_SM_SET_STATIC_PASSKEY,
|
||||
/* Reset static Passkey */
|
||||
/*!< Reset static Passkey */
|
||||
ESP_BLE_SM_CLEAR_STATIC_PASSKEY,
|
||||
/* Accept only specified SMP Authentication requirement */
|
||||
/*!< Accept only specified SMP Authentication requirement */
|
||||
ESP_BLE_SM_ONLY_ACCEPT_SPECIFIED_SEC_AUTH,
|
||||
/* Enable/Disable OOB support */
|
||||
/*!< Enable/Disable OOB support */
|
||||
ESP_BLE_SM_OOB_SUPPORT,
|
||||
/* Appl encryption key size */
|
||||
/*!< Appl encryption key size */
|
||||
ESP_BLE_APP_ENC_KEY_SIZE,
|
||||
/*!< authentication max param */
|
||||
ESP_BLE_SM_MAX_PARAM,
|
||||
} esp_ble_sm_param_t;
|
||||
|
||||
|
|
@ -681,90 +680,97 @@ typedef uint8_t esp_duplicate_info_t[ESP_BD_ADDR_LEN];
|
|||
#endif //#if (BLE_42_FEATURE_SUPPORT == TRUE)
|
||||
|
||||
#if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_NONCONN_NONSCANNABLE_UNDIRECTED (0 << 0) // Non-Connectable and Non-Scannable Undirected advertising
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_CONNECTABLE (1 << 0) // Connectable advertising
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_SCANNABLE (1 << 1) // Scannable advertising
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_DIRECTED (1 << 2) // Directed advertising
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_HD_DIRECTED (1 << 3) // High Duty Cycle Directed Connectable advertising (<= 3.75 ms Advertis- ing Interval)
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY (1 << 4) // Use legacy advertising PDUs
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_ANON_ADV (1 << 5) // Omit advertiser's address from all PDUs ("anonymous advertising")
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_INCLUDE_TX_PWR (1 << 6) // Include TxPower in the extended header of the advertising PDU
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_MASK (0x7F) // Reserved for future use
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_NONCONN_NONSCANNABLE_UNDIRECTED (0 << 0) /*!< Non-Connectable and Non-Scannable Undirected advertising */
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_CONNECTABLE (1 << 0) /*!< Connectable advertising */
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_SCANNABLE (1 << 1) /*!< Scannable advertising */
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_DIRECTED (1 << 2) /*!< Directed advertising */
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_HD_DIRECTED (1 << 3) /*!< High Duty Cycle Directed Connectable advertising (<= 3.75 ms Advertising Interval) */
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY (1 << 4) /*!< Use legacy advertising PDUs */
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_ANON_ADV (1 << 5) /*!< Omit advertiser's address from all PDUs ("anonymous advertising") */
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_INCLUDE_TX_PWR (1 << 6) /*!< Include TxPower in the extended header of the advertising PDU */
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_MASK (0x7F) /*!< Reserved for future use */
|
||||
|
||||
/* If extended advertising PDU types are being used (bit 4 = 0) then:
|
||||
/*!< If extended advertising PDU types are being used (bit 4 = 0) then:
|
||||
The advertisement shall not be both connectable and scannable.
|
||||
High duty cycle directed connectable advertising (<= 3.75 ms advertising interval) shall not be used (bit 3 = 0)
|
||||
*/
|
||||
// ADV_IND
|
||||
/*!< ADV_IND */
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY_IND (ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY |\
|
||||
ESP_BLE_GAP_SET_EXT_ADV_PROP_CONNECTABLE |\
|
||||
ESP_BLE_GAP_SET_EXT_ADV_PROP_SCANNABLE)
|
||||
// ADV_DIRECT_IND (low duty cycle)
|
||||
/*!< ADV_DIRECT_IND (low duty cycle) */
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY_LD_DIR (ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY |\
|
||||
ESP_BLE_GAP_SET_EXT_ADV_PROP_CONNECTABLE |\
|
||||
ESP_BLE_GAP_SET_EXT_ADV_PROP_DIRECTED)
|
||||
// ADV_DIRECT_IND (high duty cycle)
|
||||
/*!< ADV_DIRECT_IND (high duty cycle) */
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY_HD_DIR (ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY |\
|
||||
ESP_BLE_GAP_SET_EXT_ADV_PROP_CONNECTABLE |\
|
||||
ESP_BLE_GAP_SET_EXT_ADV_PROP_HD_DIRECTED)
|
||||
// ADV_SCAN_IND
|
||||
/*!< ADV_SCAN_IND */
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY_SCAN (ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY |\
|
||||
ESP_BLE_GAP_SET_EXT_ADV_PROP_SCANNABLE)
|
||||
// ADV_NONCONN_IND
|
||||
/*!< ADV_NONCONN_IND */
|
||||
#define ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY_NONCONN (ESP_BLE_GAP_SET_EXT_ADV_PROP_LEGACY)
|
||||
typedef uint16_t esp_ble_ext_adv_type_mask_t;
|
||||
|
||||
#define ESP_BLE_GAP_PHY_1M 1
|
||||
#define ESP_BLE_GAP_PHY_2M 2
|
||||
#define ESP_BLE_GAP_PHY_CODED 3
|
||||
#define ESP_BLE_GAP_PHY_1M 1 /*!< Secondery Advertisement PHY is LE1M */
|
||||
#define ESP_BLE_GAP_PHY_2M 2 /*!< Secondery Advertisement PHY is LE2M */
|
||||
#define ESP_BLE_GAP_PHY_CODED 3 /*!< Secondery Advertisement PHY is LE Coded */
|
||||
typedef uint8_t esp_ble_gap_phy_t;
|
||||
|
||||
#define ESP_BLE_GAP_NO_PREFER_TRANSMIT_PHY (1<<0)
|
||||
#define ESP_BLE_GAP_NO_PREFER_RECEIVE_PHY (1<<1)
|
||||
#define ESP_BLE_GAP_NO_PREFER_TRANSMIT_PHY (1<<0) /*!< No Prefer TX PHY supported by controller */
|
||||
#define ESP_BLE_GAP_NO_PREFER_RECEIVE_PHY (1<<1) /*!< No Prefer RX PHY supported by controller */
|
||||
typedef uint8_t esp_ble_gap_all_phys_t;
|
||||
|
||||
// Primary phy only support 1M and LE coded phy
|
||||
#define ESP_BLE_GAP_PRI_PHY_1M ESP_BLE_GAP_PHY_1M
|
||||
#define ESP_BLE_GAP_PRI_PHY_CODED ESP_BLE_GAP_PHY_CODED
|
||||
/// Primary phy only support 1M and LE coded phy
|
||||
#define ESP_BLE_GAP_PRI_PHY_1M ESP_BLE_GAP_PHY_1M /*!< Primary Phy is LE1M */
|
||||
#define ESP_BLE_GAP_PRI_PHY_CODED ESP_BLE_GAP_PHY_CODED /*!< Primary Phy is LE CODED */
|
||||
typedef uint8_t esp_ble_gap_pri_phy_t; // primary phy
|
||||
|
||||
#define ESP_BLE_GAP_PHY_1M_PREF_MASK (1 << 0)
|
||||
#define ESP_BLE_GAP_PHY_2M_PREF_MASK (1 << 1)
|
||||
#define ESP_BLE_GAP_PHY_CODED_PREF_MASK (1 << 2)
|
||||
#define ESP_BLE_GAP_PHY_1M_PREF_MASK (1 << 0) /*!< The Host prefers use the LE1M transmitter or reciever PHY */
|
||||
#define ESP_BLE_GAP_PHY_2M_PREF_MASK (1 << 1) /*!< The Host prefers use the LE2M transmitter or reciever PHY */
|
||||
#define ESP_BLE_GAP_PHY_CODED_PREF_MASK (1 << 2) /*!< The Host prefers use the LE CODED transmitter or reciever PHY */
|
||||
typedef uint8_t esp_ble_gap_phy_mask_t;
|
||||
|
||||
#define ESP_BLE_GAP_PHY_OPTIONS_NO_PREF 0 // The Host has no preferred coding when transmitting on the LE Coded PHY
|
||||
#define ESP_BLE_GAP_PHY_OPTIONS_PREF_S2_CODING 1 // The Host prefers that S=2 coding be used when transmitting on the LE Coded PHY
|
||||
#define ESP_BLE_GAP_PHY_OPTIONS_PREF_S8_CODING 2 // The Host prefers that S=8 coding be used when transmitting on the LE Coded PHY
|
||||
#define ESP_BLE_GAP_PHY_OPTIONS_NO_PREF 0 /*!< The Host has no preferred coding when transmitting on the LE Coded PHY */
|
||||
#define ESP_BLE_GAP_PHY_OPTIONS_PREF_S2_CODING 1 /*!< The Host prefers that S=2 coding be used when transmitting on the LE Coded PHY */
|
||||
#define ESP_BLE_GAP_PHY_OPTIONS_PREF_S8_CODING 2 /*!< The Host prefers that S=8 coding be used when transmitting on the LE Coded PHY */
|
||||
typedef uint16_t esp_ble_gap_prefer_phy_options_t;
|
||||
|
||||
#define ESP_BLE_GAP_EXT_SCAN_CFG_UNCODE_MASK 0x01
|
||||
#define ESP_BLE_GAP_EXT_SCAN_CFG_CODE_MASK 0x02
|
||||
#define ESP_BLE_GAP_EXT_SCAN_CFG_UNCODE_MASK 0x01 /*!< Scan Advertisements on the LE1M PHY */
|
||||
#define ESP_BLE_GAP_EXT_SCAN_CFG_CODE_MASK 0x02 /*!< Scan advertisements on the LE coded PHY */
|
||||
typedef uint8_t esp_ble_ext_scan_cfg_mask_t;
|
||||
|
||||
#define ESP_BLE_GAP_EXT_ADV_DATA_COMPLETE 0x00
|
||||
#define ESP_BLE_GAP_EXT_ADV_DATA_INCOMPLETE 0x01
|
||||
#define ESP_BLE_GAP_EXT_ADV_DATA_TRUNCATED 0x02
|
||||
/// Advertising data
|
||||
#define ESP_BLE_GAP_EXT_ADV_DATA_COMPLETE 0x00 /*!< extended advertising data compete */
|
||||
#define ESP_BLE_GAP_EXT_ADV_DATA_INCOMPLETE 0x01 /*!< extended advertising data incomplete */
|
||||
#define ESP_BLE_GAP_EXT_ADV_DATA_TRUNCATED 0x02 /*!< extended advertising data truncated mode */
|
||||
typedef uint8_t esp_ble_gap_ext_adv_data_status_t;
|
||||
|
||||
#define ESP_BLE_GAP_SYNC_POLICY_BY_ADV_INFO 0
|
||||
#define ESP_BLE_GAP_SYNC_POLICY_BY_PERIODIC_LIST 1
|
||||
/// Advertising SYNC policy
|
||||
#define ESP_BLE_GAP_SYNC_POLICY_BY_ADV_INFO 0 /*!< sync policy by advertising info */
|
||||
#define ESP_BLE_GAP_SYNC_POLICY_BY_PERIODIC_LIST 1 /*!< periodic advertising sync policy */
|
||||
typedef uint8_t esp_ble_gap_sync_t;
|
||||
|
||||
/* Advertising report */
|
||||
#define ESP_BLE_ADV_REPORT_EXT_ADV_IND (1<<0)
|
||||
#define ESP_BLE_ADV_REPORT_EXT_SCAN_IND (1<<1)
|
||||
#define ESP_BLE_ADV_REPORT_EXT_DIRECT_ADV (1<<2)
|
||||
#define ESP_BLE_ADV_REPORT_EXT_SCAN_RSP (1<<3)
|
||||
/* Bluetooth 5.0, Vol 2, Part E, 7.7.65.13 */
|
||||
#define ESP_BLE_LEGACY_ADV_TYPE_IND (0x13)
|
||||
#define ESP_BLE_LEGACY_ADV_TYPE_DIRECT_IND (0x15)
|
||||
#define ESP_BLE_LEGACY_ADV_TYPE_SCAN_IND (0x12)
|
||||
#define ESP_BLE_LEGACY_ADV_TYPE_NONCON_IND (0x10)
|
||||
#define ESP_BLE_LEGACY_ADV_TYPE_SCAN_RSP_TO_ADV_IND (0x1b)
|
||||
#define ESP_BLE_LEGACY_ADV_TYPE_SCAN_RSP_TO_ADV_SCAN_IND (0x1a)
|
||||
/// Advertising report
|
||||
#define ESP_BLE_ADV_REPORT_EXT_ADV_IND (1<<0) /*!< advertising report with extended advertising indication type */
|
||||
#define ESP_BLE_ADV_REPORT_EXT_SCAN_IND (1<<1) /*!< advertising report with extended scan indication type */
|
||||
#define ESP_BLE_ADV_REPORT_EXT_DIRECT_ADV (1<<2) /*!< advertising report with extended direct advertising indication type */
|
||||
#define ESP_BLE_ADV_REPORT_EXT_SCAN_RSP (1<<3) /*!< advertising report with extended scan response indication type */
|
||||
|
||||
/*!< Bluetooth 5.0, Vol 2, Part E, 7.7.65.13 */
|
||||
#define ESP_BLE_LEGACY_ADV_TYPE_IND (0x13) /*!< advertising report with legacy advertising indication type */
|
||||
#define ESP_BLE_LEGACY_ADV_TYPE_DIRECT_IND (0x15) /*!< advertising report with legacy direct indication type */
|
||||
#define ESP_BLE_LEGACY_ADV_TYPE_SCAN_IND (0x12) /*!< advertising report with legacy scan indication type */
|
||||
#define ESP_BLE_LEGACY_ADV_TYPE_NONCON_IND (0x10) /*!< advertising report with legacy non connectable indication type */
|
||||
#define ESP_BLE_LEGACY_ADV_TYPE_SCAN_RSP_TO_ADV_IND (0x1b) /*!< advertising report with legacy scan response indication type */
|
||||
#define ESP_BLE_LEGACY_ADV_TYPE_SCAN_RSP_TO_ADV_SCAN_IND (0x1a) /*!< advertising report with legacy advertising with scan response indication type */
|
||||
|
||||
typedef uint8_t esp_ble_gap_adv_type_t;
|
||||
|
||||
/// Extend advertising tx power, range: [-127, +126] dBm
|
||||
#define EXT_ADV_TX_PWR_NO_PREFERENCE (127) /*!< host has no preference for tx power */
|
||||
|
||||
/**
|
||||
* @brief ext adv parameters
|
||||
*/
|
||||
|
|
@ -1762,8 +1768,8 @@ esp_err_t esp_ble_get_bond_device_list(int *dev_num, esp_ble_bond_dev_t *dev_lis
|
|||
* SMP in response to ESP_GAP_BLE_OOB_REQ_EVT
|
||||
*
|
||||
* @param[in] bd_addr: BD address of the peer device.
|
||||
* @param[in] TK: TK value, the TK value shall be a 128-bit random number
|
||||
* @param[in] len: length of tk, should always be 128-bit
|
||||
* @param[in] TK: Temporary Key value, the TK value shall be a 128-bit random number
|
||||
* @param[in] len: length of temporary key, should always be 128-bit
|
||||
*
|
||||
* @return - ESP_OK : success
|
||||
* - other : failed
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ typedef union {
|
|||
* @param event: Event type
|
||||
* @param param: Point to callback parameter, currently is union type
|
||||
*/
|
||||
typedef void (esp_hd_cb_t)(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param);
|
||||
typedef void (*esp_hd_cb_t)(esp_hidd_cb_event_t event, esp_hidd_cb_param_t *param);
|
||||
|
||||
/**
|
||||
* @brief This function is called to init callbacks with HID device module.
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ typedef union {
|
|||
* @param event: Event type
|
||||
* @param param: Point to callback parameter, currently is union type
|
||||
*/
|
||||
typedef void (esp_hh_cb_t)(esp_hidh_cb_event_t event, esp_hidh_cb_param_t *param);
|
||||
typedef void (*esp_hh_cb_t)(esp_hidh_cb_event_t event, esp_hidh_cb_param_t *param);
|
||||
|
||||
/**
|
||||
* @brief This function is called to init callbacks with HID host module.
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ typedef union {
|
|||
* @param event: Event type
|
||||
* @param param: Point to callback parameter, currently is union type
|
||||
*/
|
||||
typedef void (esp_spp_cb_t)(esp_spp_cb_event_t event, esp_spp_cb_param_t *param);
|
||||
typedef void (*esp_spp_cb_t)(esp_spp_cb_event_t event, esp_spp_cb_param_t *param);
|
||||
|
||||
/**
|
||||
* @brief This function is called to init callbacks with SPP module.
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ the adv packet will be discarded until the memory is restored. */
|
|||
.pcm_polar = CONFIG_BTDM_CTRL_PCM_POLAR_EFF, \
|
||||
.hli = BTDM_CTRL_HLI, \
|
||||
.magic = ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL, \
|
||||
};
|
||||
}
|
||||
|
||||
#else
|
||||
#define BT_CONTROLLER_INIT_CONFIG_DEFAULT() {0}; _Static_assert(0, "please enable bluetooth in menuconfig to use bt.h");
|
||||
|
|
|
|||
|
|
@ -121,8 +121,11 @@ esp_err_t touch_pad_isr_register(intr_handler_t fn, void *arg);
|
|||
* @brief Set touch sensor measurement and sleep time.
|
||||
* Excessive total time will slow down the touch response.
|
||||
* Too small measurement time will not be sampled enough, resulting in inaccurate measurements.
|
||||
*
|
||||
* @note The touch sensor on ESP32 will fix measuring cycles (specified by the second parameter)
|
||||
* and then record the count of charge and discharge cycles during the sensing period as the raw value.
|
||||
* That means the raw value will decrease as the capacity of the touch pad increasing.
|
||||
* @note The greater the duty cycle of the measurement time, the more system power is consumed.
|
||||
*
|
||||
* @param sleep_cycle The touch sensor will sleep after each measurement.
|
||||
* sleep_cycle decide the interval between each measurement.
|
||||
* t_sleep = sleep_cycle / (RTC_SLOW_CLK frequency).
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ typedef struct {
|
|||
* We assume that the current 'dma_buf_len' is 100, then the real length of the DMA buffer is 8 * 100 = 800 bytes.
|
||||
* Note that the length of an internal real DMA buffer shouldn't be greater than 4092.
|
||||
*/
|
||||
|
||||
bool use_apll; /*!< I2S using APLL as main I2S clock, enable it to get accurate clock */
|
||||
bool tx_desc_auto_clear; /*!< I2S auto clear tx descriptor if there is underflow condition (helps in avoiding noise in case of data unavailability) */
|
||||
int fixed_mclk; /*!< I2S using fixed MCLK output. If use_apll = true and fixed_mclk > 0, then the clock output for i2s is fixed and equal to the fixed_mclk value. If fixed_mclk set, mclk_multiple won't take effect */
|
||||
|
|
|
|||
|
|
@ -145,7 +145,6 @@ typedef struct {
|
|||
esp_mn_iface_op_get_samp_chunksize_t get_samp_chunksize;
|
||||
esp_mn_iface_op_get_samp_chunknum_t get_samp_chunknum;
|
||||
esp_mn_iface_op_set_det_threshold_t set_det_threshold;
|
||||
esp_mn_iface_op_get_language_t get_language;
|
||||
esp_mn_iface_op_detect_t detect;
|
||||
esp_mn_iface_op_destroy_t destroy;
|
||||
esp_mn_iface_op_get_results_t get_results;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ typedef enum {
|
|||
BF20A6_PID = 0x20a6,
|
||||
SC101IOT_PID = 0xda4a,
|
||||
SC030IOT_PID = 0x9a46,
|
||||
SC031GS_PID = 0x0031,
|
||||
} camera_pid_t;
|
||||
|
||||
typedef enum {
|
||||
|
|
@ -46,6 +47,7 @@ typedef enum {
|
|||
CAMERA_BF20A6,
|
||||
CAMERA_SC101IOT,
|
||||
CAMERA_SC030IOT,
|
||||
CAMERA_SC031GS,
|
||||
CAMERA_MODEL_MAX,
|
||||
CAMERA_NONE,
|
||||
} camera_model_t;
|
||||
|
|
@ -64,6 +66,7 @@ typedef enum {
|
|||
BF20A6_SCCB_ADDR = 0x6E,
|
||||
SC101IOT_SCCB_ADDR = 0x68,// 0xd0 >> 1
|
||||
SC030IOT_SCCB_ADDR = 0x68,// 0xd0 >> 1
|
||||
SC031GS_SCCB_ADDR = 0x30,
|
||||
} camera_sccb_addr_t;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ extern "C" {
|
|||
/** Minor version number (x.X.x) */
|
||||
#define ESP_IDF_VERSION_MINOR 4
|
||||
/** Patch version number (x.x.X) */
|
||||
#define ESP_IDF_VERSION_PATCH 2
|
||||
#define ESP_IDF_VERSION_PATCH 3
|
||||
|
||||
/**
|
||||
* Macro to convert IDF version number into an integer
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ initializer that should be kept in sync
|
|||
.global_user_ctx_free_fn = NULL, \
|
||||
.global_transport_ctx = NULL, \
|
||||
.global_transport_ctx_free_fn = NULL, \
|
||||
.enable_so_linger = false, \
|
||||
.linger_timeout = 0, \
|
||||
.open_fn = NULL, \
|
||||
.close_fn = NULL, \
|
||||
.uri_match_fn = NULL \
|
||||
|
|
@ -185,6 +187,9 @@ typedef struct httpd_config {
|
|||
*/
|
||||
httpd_free_ctx_fn_t global_transport_ctx_free_fn;
|
||||
|
||||
bool enable_so_linger; /*!< bool to enable/disable linger */
|
||||
int linger_timeout; /*!< linger timeout (in seconds) */
|
||||
|
||||
/**
|
||||
* Custom session opening callback.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -82,6 +82,19 @@ int esp_clk_xtal_freq(void);
|
|||
*/
|
||||
uint64_t esp_clk_rtc_time(void);
|
||||
|
||||
/**
|
||||
* @brief obtain internal critical section used esp_clk implementation.
|
||||
*
|
||||
* This is used by the esp_light_sleep_start() to avoid deadlocking when it
|
||||
* calls esp_clk related API after stalling the other CPU.
|
||||
*/
|
||||
void esp_clk_private_lock(void);
|
||||
|
||||
/**
|
||||
* @brief counterpart of esp_clk_private_lock
|
||||
*/
|
||||
void esp_clk_private_unlock(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @brief Enables the use of ADC and temperature sensor in monitor (ULP) mode
|
||||
*
|
||||
* @note This state is kept in RTC memory and will keep its value after a deep sleep wakeup
|
||||
*
|
||||
*/
|
||||
void esp_sleep_enable_adc_tsens_monitor(bool enable);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -69,7 +69,7 @@ typedef enum {
|
|||
ESP_SLEEP_WAKEUP_TIMER, //!< Wakeup caused by timer
|
||||
ESP_SLEEP_WAKEUP_TOUCHPAD, //!< Wakeup caused by touchpad
|
||||
ESP_SLEEP_WAKEUP_ULP, //!< Wakeup caused by ULP program
|
||||
ESP_SLEEP_WAKEUP_GPIO, //!< Wakeup caused by GPIO (light sleep only)
|
||||
ESP_SLEEP_WAKEUP_GPIO, //!< Wakeup caused by GPIO (light sleep only on ESP32, S2 and S3)
|
||||
ESP_SLEEP_WAKEUP_UART, //!< Wakeup caused by UART (light sleep only)
|
||||
ESP_SLEEP_WAKEUP_WIFI, //!< Wakeup caused by WIFI (light sleep only)
|
||||
ESP_SLEEP_WAKEUP_COCPU, //!< Wakeup caused by COCPU int
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ void esp_ipc_isr_asm_call_blocking(esp_ipc_isr_func_t func, void* arg);
|
|||
* - If the stall feature is paused using esp_ipc_isr_stall_pause(), this function will have no effect
|
||||
*
|
||||
* @note This function is not available in single-core mode.
|
||||
* @note It is the caller's responsibility to avoid deadlocking on spinlocks
|
||||
*/
|
||||
void esp_ipc_isr_stall_other_cpu(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ esp_err_t esp_lcd_panel_io_rx_param(esp_lcd_panel_io_handle_t io, int lcd_cmd, v
|
|||
* this function will wait until they are finished and the queue is empty before sending the command(s).
|
||||
*
|
||||
* @param[in] io LCD panel IO handle, which is created by other factory API like `esp_lcd_new_panel_io_spi()`
|
||||
* @param[in] lcd_cmd The specific LCD command
|
||||
* @param[in] lcd_cmd The specific LCD command (set to -1 if no command needed - only in SPI and I2C)
|
||||
* @param[in] param Buffer that holds the command specific parameters, set to NULL if no parameter is needed for the command
|
||||
* @param[in] param_size Size of `param` in memory, in bytes, set to zero if no parameter is needed for the command
|
||||
* @return
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ typedef enum {
|
|||
RMAKER_OTA_EVENT_REJECTED,
|
||||
/** RainMaker OTA Delayed */
|
||||
RMAKER_OTA_EVENT_DELAYED,
|
||||
/** OTA Image has been flashed and active partition changed. Reboot is requested. Applicable only if Auto reboot is disabled **/
|
||||
RMAKER_OTA_EVENT_REQ_FOR_REBOOT,
|
||||
} esp_rmaker_ota_event_t;
|
||||
|
||||
/** Default ESP RainMaker OTA Server Certificate */
|
||||
|
|
@ -79,6 +81,10 @@ typedef struct {
|
|||
/** Size of the OTA File. Can be 0 if the file size isn't received from
|
||||
* the ESP RainMaker Cloud */
|
||||
int filesize;
|
||||
/** The firmware version of the OTA image **/
|
||||
char *fw_version;
|
||||
/** The OTA Job ID received from cloud **/
|
||||
char *ota_job_id;
|
||||
/** The server certificate passed in esp_rmaker_enable_ota() */
|
||||
const char *server_cert;
|
||||
/** The private data passed in esp_rmaker_enable_ota() */
|
||||
|
|
@ -195,6 +201,18 @@ esp_err_t esp_rmaker_ota_default_cb(esp_rmaker_ota_handle_t handle, esp_rmaker_o
|
|||
* @return error on failure
|
||||
*/
|
||||
esp_err_t esp_rmaker_ota_fetch(void);
|
||||
|
||||
/** Fetch OTA Info with a delay
|
||||
*
|
||||
* For OTA using Topics, this API can be used to explicitly ask the backend if an OTA is available
|
||||
* after a delay (in seconds) passed as an argument.
|
||||
*
|
||||
* @param[in] time Delay (in seconds)
|
||||
*
|
||||
* @return ESP_OK if the OTA fetch timer was created.
|
||||
* @return error on failure
|
||||
*/
|
||||
esp_err_t esp_rmaker_ota_fetch_with_delay(int time);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,16 +1,8 @@
|
|||
// Copyright 2020 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.
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
@ -18,3 +10,4 @@
|
|||
#define ESP_ROM_HAS_CRC_BE (1) // ROM CRC library supports Big Endian
|
||||
#define ESP_ROM_HAS_JPEG_DECODE (1) // ROM has JPEG decode library
|
||||
#define ESP_ROM_SUPPORT_MULTIPLE_UART (1) // ROM has multiple UARTs available for logging
|
||||
#define ESP_ROM_NEEDS_SWSETUP_WORKAROUND (1) // ROM uses 32-bit time_t. A workaround is required to prevent printf functions from crashing
|
||||
|
|
|
|||
|
|
@ -760,7 +760,7 @@ typedef struct
|
|||
|
||||
// Initializes the compressor.
|
||||
// There is no corresponding deinit() function because the tdefl API's do not dynamically allocate memory.
|
||||
// pBut_buf_func: If NULL, output data will be supplied to the specified callback. In this case, the user should call the tdefl_compress_buffer() API for compression.
|
||||
// pBut_buf_func: If **not** NULL, output data will be supplied to the specified callback. In this case, the user should call the tdefl_compress_buffer() API for compression.
|
||||
// If pBut_buf_func is NULL the user should always call the tdefl_compress() API.
|
||||
// flags: See the above enums (TDEFL_HUFFMAN_ONLY, TDEFL_WRITE_ZLIB_HEADER, etc.)
|
||||
tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
|
||||
|
|
|
|||
|
|
@ -729,7 +729,7 @@ typedef struct {
|
|||
|
||||
// Initializes the compressor.
|
||||
// There is no corresponding deinit() function because the tdefl API's do not dynamically allocate memory.
|
||||
// pBut_buf_func: If NULL, output data will be supplied to the specified callback. In this case, the user should call the tdefl_compress_buffer() API for compression.
|
||||
// pBut_buf_func: If **not** NULL, output data will be supplied to the specified callback. In this case, the user should call the tdefl_compress_buffer() API for compression.
|
||||
// If pBut_buf_func is NULL the user should always call the tdefl_compress() API.
|
||||
// flags: See the above enums (TDEFL_HUFFMAN_ONLY, TDEFL_WRITE_ZLIB_HEADER, etc.)
|
||||
tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
|
||||
|
|
|
|||
|
|
@ -729,7 +729,7 @@ typedef struct {
|
|||
|
||||
// Initializes the compressor.
|
||||
// There is no corresponding deinit() function because the tdefl API's do not dynamically allocate memory.
|
||||
// pBut_buf_func: If NULL, output data will be supplied to the specified callback. In this case, the user should call the tdefl_compress_buffer() API for compression.
|
||||
// pBut_buf_func: If **not** NULL, output data will be supplied to the specified callback. In this case, the user should call the tdefl_compress_buffer() API for compression.
|
||||
// If pBut_buf_func is NULL the user should always call the tdefl_compress() API.
|
||||
// flags: See the above enums (TDEFL_HUFFMAN_ONLY, TDEFL_WRITE_ZLIB_HEADER, etc.)
|
||||
tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
|
||||
|
|
|
|||
|
|
@ -745,7 +745,7 @@ typedef struct
|
|||
|
||||
// Initializes the compressor.
|
||||
// There is no corresponding deinit() function because the tdefl API's do not dynamically allocate memory.
|
||||
// pBut_buf_func: If NULL, output data will be supplied to the specified callback. In this case, the user should call the tdefl_compress_buffer() API for compression.
|
||||
// pBut_buf_func: If **not** NULL, output data will be supplied to the specified callback. In this case, the user should call the tdefl_compress_buffer() API for compression.
|
||||
// If pBut_buf_func is NULL the user should always call the tdefl_compress() API.
|
||||
// flags: See the above enums (TDEFL_HUFFMAN_ONLY, TDEFL_WRITE_ZLIB_HEADER, etc.)
|
||||
tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
|
||||
|
|
|
|||
|
|
@ -728,7 +728,7 @@ typedef struct {
|
|||
|
||||
// Initializes the compressor.
|
||||
// There is no corresponding deinit() function because the tdefl API's do not dynamically allocate memory.
|
||||
// pBut_buf_func: If NULL, output data will be supplied to the specified callback. In this case, the user should call the tdefl_compress_buffer() API for compression.
|
||||
// pBut_buf_func: If **not** NULL, output data will be supplied to the specified callback. In this case, the user should call the tdefl_compress_buffer() API for compression.
|
||||
// If pBut_buf_func is NULL the user should always call the tdefl_compress() API.
|
||||
// flags: See the above enums (TDEFL_HUFFMAN_ONLY, TDEFL_WRITE_ZLIB_HEADER, etc.)
|
||||
tdefl_status tdefl_init(tdefl_compressor *d, tdefl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
|
||||
|
|
|
|||
|
|
@ -1,16 +1,8 @@
|
|||
// Copyright 2010-2020 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.
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2010-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
|
@ -20,6 +12,7 @@ extern "C" {
|
|||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "soc/soc_caps.h"
|
||||
|
||||
#define ESP_ROM_EFUSE_FLASH_DEFAULT_SPI (0)
|
||||
#define ESP_ROM_EFUSE_FLASH_DEFAULT_HSPI (1)
|
||||
|
|
@ -56,6 +49,18 @@ uint32_t esp_rom_efuse_get_flash_gpio_info(void);
|
|||
*/
|
||||
uint32_t esp_rom_efuse_get_flash_wp_gpio(void);
|
||||
|
||||
#if SOC_SPI_MEM_SUPPORT_OPI_MODE
|
||||
/**
|
||||
* @brief Read opi flash pads configuration from Efuse
|
||||
*
|
||||
* @return
|
||||
* - 0 for default SPI pins.
|
||||
* - Other values define a custom pin configuration mask. From the LSB, every 6 bits represent a GPIO number which stand for:
|
||||
* DQS, D4, D5, D6, D7 accordingly.
|
||||
*/
|
||||
uint32_t esp_rom_efuse_get_opiconfig(void);
|
||||
#endif // SOC_SPI_MEM_SUPPORT_OPI_MODE
|
||||
|
||||
/**
|
||||
* @brief Read eFuse to check whether secure boot has been enabled or not
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
// Copyright 2010-2020 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.
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
// NOTE: From the view of master
|
||||
#define CMD_HD_WRBUF_REG 0x01
|
||||
#define CMD_HD_RDBUF_REG 0x02
|
||||
#define CMD_HD_WRDMA_REG 0x03
|
||||
#define CMD_HD_RDDMA_REG 0x04
|
||||
|
||||
#define CMD_HD_ONEBIT_MODE 0x00
|
||||
#define CMD_HD_DOUT_MODE 0x10
|
||||
#define CMD_HD_QOUT_MODE 0x20
|
||||
#define CMD_HD_DIO_MODE 0x50
|
||||
#define CMD_HD_QIO_MODE 0xA0
|
||||
|
||||
#define CMD_HD_SEG_END_REG 0x05
|
||||
#define CMD_HD_EN_QPI_REG 0x06
|
||||
#define CMD_HD_WR_END_REG 0x07
|
||||
#define CMD_HD_INT0_REG 0x08
|
||||
#define CMD_HD_INT1_REG 0x09
|
||||
#define CMD_HD_INT2_REG 0x0A
|
||||
#define CMD_HD_EX_QPI_REG 0xDD
|
||||
|
||||
#define SPI_SLAVE_HD_BUFFER_SIZE 64
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
// Copyright 2010-2020 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.
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
// NOTE: From the view of master
|
||||
#define CMD_HD_WRBUF_REG 0x01
|
||||
#define CMD_HD_RDBUF_REG 0x02
|
||||
#define CMD_HD_WRDMA_REG 0x03
|
||||
#define CMD_HD_RDDMA_REG 0x04
|
||||
|
||||
#define CMD_HD_ONEBIT_MODE 0x00
|
||||
#define CMD_HD_DOUT_MODE 0x10
|
||||
#define CMD_HD_QOUT_MODE 0x20
|
||||
#define CMD_HD_DIO_MODE 0x50
|
||||
#define CMD_HD_QIO_MODE 0xA0
|
||||
|
||||
#define CMD_HD_SEG_END_REG 0x05
|
||||
#define CMD_HD_EN_QPI_REG 0x06
|
||||
#define CMD_HD_WR_END_REG 0x07
|
||||
#define CMD_HD_INT0_REG 0x08
|
||||
#define CMD_HD_INT1_REG 0x09
|
||||
#define CMD_HD_INT2_REG 0x0A
|
||||
#define CMD_HD_EX_QPI_REG 0xDD
|
||||
|
||||
#define SPI_SLAVE_HD_BUFFER_SIZE 72
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
// Copyright 2010-2020 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.
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
// NOTE: From the view of master
|
||||
#define CMD_HD_WRBUF_REG 0x01
|
||||
#define CMD_HD_RDBUF_REG 0x02
|
||||
#define CMD_HD_WRDMA_REG 0x03
|
||||
#define CMD_HD_RDDMA_REG 0x04
|
||||
|
||||
#define CMD_HD_ONEBIT_MODE 0x00
|
||||
#define CMD_HD_DOUT_MODE 0x10
|
||||
#define CMD_HD_QOUT_MODE 0x20
|
||||
#define CMD_HD_DIO_MODE 0x50
|
||||
#define CMD_HD_QIO_MODE 0xA0
|
||||
|
||||
#define CMD_HD_SEG_END_REG 0x05
|
||||
#define CMD_HD_EN_QPI_REG 0x06
|
||||
#define CMD_HD_WR_END_REG 0x07
|
||||
#define CMD_HD_INT0_REG 0x08
|
||||
#define CMD_HD_INT1_REG 0x09
|
||||
#define CMD_HD_INT2_REG 0x0A
|
||||
#define CMD_HD_EX_QPI_REG 0xDD
|
||||
|
||||
#define SPI_SLAVE_HD_BUFFER_SIZE 64
|
||||
|
|
@ -52,11 +52,11 @@ void esp_timer_private_update_apb_freq(uint32_t apb_ticks_per_us);
|
|||
void esp_timer_private_advance(int64_t time_us);
|
||||
|
||||
/**
|
||||
* @brief obtain internal critical section used esp_timer implementation
|
||||
* @brief obtain internal critical section used in the esp_timer implementation
|
||||
* This can be used when a sequence of calls to esp_timer has to be made,
|
||||
* and it is necessary that the state of the timer is consistent between
|
||||
* the calls. Should be treated in the same way as a spinlock.
|
||||
* Call esp_timer_unlock to release the lock
|
||||
* Call esp_timer_private_unlock to release the lock
|
||||
*/
|
||||
void esp_timer_private_lock(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2018-2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2018-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
|
@ -23,6 +23,7 @@ typedef enum {
|
|||
} coex_prefer_t;
|
||||
|
||||
typedef void (* coex_func_cb_t)(uint32_t event, int sched_cnt);
|
||||
typedef esp_err_t (* coex_set_lpclk_source_callback_t)(void);
|
||||
|
||||
/**
|
||||
* @brief Pre-Init software coexist
|
||||
|
|
@ -115,6 +116,18 @@ int coex_wifi_release(uint32_t event);
|
|||
*/
|
||||
int coex_wifi_channel_set(uint8_t primary, uint8_t secondary);
|
||||
|
||||
/**
|
||||
* @brief Register application callback function to Wi-Fi update low power clock module.
|
||||
*
|
||||
* @param callback : Wi-Fi update low power clock callback function
|
||||
*/
|
||||
void coex_wifi_register_update_lpclk_callback(coex_set_lpclk_source_callback_t callback);
|
||||
|
||||
/**
|
||||
* @brief Update low power clock interval
|
||||
*/
|
||||
void coex_update_lpclk_interval(void);
|
||||
|
||||
/**
|
||||
* @brief Get coexistence event duration.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
|
@ -496,6 +496,15 @@ bool esp_wifi_internal_is_tsf_active(void);
|
|||
*
|
||||
*/
|
||||
void esp_wifi_internal_update_light_sleep_wake_ahead_time(uint32_t);
|
||||
|
||||
/**
|
||||
* @brief Update WiFi TSF tick interval
|
||||
*
|
||||
* @return
|
||||
* - true: Active
|
||||
* - false: Not active
|
||||
*/
|
||||
esp_err_t esp_wifi_update_tsf_tick_interval(void);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
@ -590,6 +599,15 @@ void esp_wifi_set_sleep_delay_time(uint32_t return_to_sleep_delay);
|
|||
*/
|
||||
void esp_wifi_set_keep_alive_time(uint32_t keep_alive_time);
|
||||
|
||||
/**
|
||||
* @brief Configure wifi beacon montior default parameters
|
||||
*
|
||||
* @param enable: enable or disable beacon monitor
|
||||
* @param timeout: timeout time for close rf phy when beacon loss occurs, Unit: 1024 microsecond
|
||||
* @param threshold: maximum number of consecutive lost beacons allowed
|
||||
*/
|
||||
void esp_wifi_beacon_monitor_configure(bool enable, int timeout, int threshold, int delta_intr_early, int delta_timeout);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ typedef struct {
|
|||
void (* _wifi_apb80m_release)(void);
|
||||
void (* _phy_disable)(void);
|
||||
void (* _phy_enable)(void);
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2
|
||||
void (* _phy_common_clock_enable)(void);
|
||||
void (* _phy_common_clock_disable)(void);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ esp_err_t esp_wifi_restore(void);
|
|||
*
|
||||
* @attention 1. This API only impact WIFI_MODE_STA or WIFI_MODE_APSTA mode
|
||||
* @attention 2. If the ESP32 is connected to an AP, call esp_wifi_disconnect to disconnect.
|
||||
* @attention 3. The scanning triggered by esp_wifi_start_scan() will not be effective until connection between ESP32 and the AP is established.
|
||||
* @attention 3. The scanning triggered by esp_wifi_scan_start() will not be effective until connection between ESP32 and the AP is established.
|
||||
* If ESP32 is scanning and connecting at the same time, ESP32 will abort scanning and return a warning message and error
|
||||
* number ESP_ERR_WIFI_STATE.
|
||||
* If you want to do reconnection after ESP32 received disconnect event, remember to add the maximum retry time, otherwise the called
|
||||
|
|
@ -600,18 +600,19 @@ esp_err_t esp_wifi_get_channel(uint8_t *primary, wifi_second_chan_t *second);
|
|||
* @attention 1. It is discouraged to call this API since this doesn't validate the per-country rules,
|
||||
* it's up to the user to fill in all fields according to local regulations.
|
||||
* Please use esp_wifi_set_country_code instead.
|
||||
* @attention 2. The default country is CHINA {.cc="CN", .schan=1, .nchan=13, policy=WIFI_COUNTRY_POLICY_AUTO}
|
||||
* @attention 3. When the country policy is WIFI_COUNTRY_POLICY_AUTO, the country info of the AP to which
|
||||
* the station is connected is used. E.g. if the configured country info is {.cc="USA", .schan=1, .nchan=11}
|
||||
* @attention 2. The default country is CHINA {.cc="CN", .schan=1, .nchan=13, .policy=WIFI_COUNTRY_POLICY_AUTO}.
|
||||
* @attention 3. The third octect of country code string is one of the following: ' ', 'O', 'I', 'X', otherwise it is considered as ' '.
|
||||
* @attention 4. When the country policy is WIFI_COUNTRY_POLICY_AUTO, the country info of the AP to which
|
||||
* the station is connected is used. E.g. if the configured country info is {.cc="US", .schan=1, .nchan=11}
|
||||
* and the country info of the AP to which the station is connected is {.cc="JP", .schan=1, .nchan=14}
|
||||
* then the country info that will be used is {.cc="JP", .schan=1, .nchan=14}. If the station disconnected
|
||||
* from the AP the country info is set back to the country info of the station automatically,
|
||||
* {.cc="US", .schan=1, .nchan=11} in the example.
|
||||
* @attention 4. When the country policy is WIFI_COUNTRY_POLICY_MANUAL, then the configured country info is used always.
|
||||
* @attention 5. When the country info is changed because of configuration or because the station connects to a different
|
||||
* @attention 5. When the country policy is WIFI_COUNTRY_POLICY_MANUAL, then the configured country info is used always.
|
||||
* @attention 6. When the country info is changed because of configuration or because the station connects to a different
|
||||
* external AP, the country IE in probe response/beacon of the soft-AP is also changed.
|
||||
* @attention 6. The country configuration is stored into flash.
|
||||
* @attention 7. When this API is called, the PHY init data will switch to the PHY init data type corresponding to the
|
||||
* @attention 7. The country configuration is stored into flash.
|
||||
* @attention 8. When this API is called, the PHY init data will switch to the PHY init data type corresponding to the
|
||||
* country info.
|
||||
*
|
||||
* @param country the configured country info
|
||||
|
|
@ -909,7 +910,7 @@ esp_err_t esp_wifi_set_vendor_ie_cb(esp_vendor_ie_cb_t cb, void *ctx);
|
|||
* @return
|
||||
* - ESP_OK: succeed
|
||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
||||
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
|
||||
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
|
||||
* - ESP_ERR_WIFI_ARG: invalid argument, e.g. parameter is out of range
|
||||
*/
|
||||
esp_err_t esp_wifi_set_max_tx_power(int8_t power);
|
||||
|
|
@ -922,7 +923,7 @@ esp_err_t esp_wifi_set_max_tx_power(int8_t power);
|
|||
* @return
|
||||
* - ESP_OK: succeed
|
||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
||||
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start
|
||||
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start
|
||||
* - ESP_ERR_WIFI_ARG: invalid argument
|
||||
*/
|
||||
esp_err_t esp_wifi_get_max_tx_power(int8_t *power);
|
||||
|
|
@ -1018,7 +1019,7 @@ esp_err_t esp_wifi_set_csi_rx_cb(wifi_csi_cb_t cb, void *ctx);
|
|||
* return
|
||||
* - ESP_OK: succeed
|
||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
||||
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start or promiscuous mode is not enabled
|
||||
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start or promiscuous mode is not enabled
|
||||
* - ESP_ERR_INVALID_ARG: invalid argument
|
||||
*/
|
||||
esp_err_t esp_wifi_set_csi_config(const wifi_csi_config_t *config);
|
||||
|
|
@ -1031,7 +1032,7 @@ esp_err_t esp_wifi_set_csi_config(const wifi_csi_config_t *config);
|
|||
* return
|
||||
* - ESP_OK: succeed
|
||||
* - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init
|
||||
* - ESP_ERR_WIFI_NOT_START: WiFi is not started by esp_wifi_start or promiscuous mode is not enabled
|
||||
* - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start or promiscuous mode is not enabled
|
||||
* - ESP_ERR_INVALID_ARG: invalid argument
|
||||
*/
|
||||
esp_err_t esp_wifi_set_csi(bool en);
|
||||
|
|
@ -1244,6 +1245,7 @@ esp_err_t esp_wifi_set_connectionless_wake_interval(uint16_t interval);
|
|||
*
|
||||
* @attention 7. When country code "01" (world safe mode) is set, SoftAP mode won't contain country IE.
|
||||
* @attention 8. The default country is "CN" and ieee80211d_enabled is TRUE.
|
||||
* @attention 9. The third octect of country code string is one of the following: ' ', 'O', 'I', 'X', otherwise it is considered as ' '.
|
||||
*
|
||||
* @param country the configured country ISO code
|
||||
* @param ieee80211d_enabled 802.11d is enabled or not
|
||||
|
|
|
|||
|
|
@ -219,6 +219,14 @@ typedef struct {
|
|||
bool required; /**< Advertizes that Protected Management Frame is required. Device will not associate to non-PMF capable devices. */
|
||||
} wifi_pmf_config_t;
|
||||
|
||||
/** Configuration for SAE PWE derivation */
|
||||
typedef enum {
|
||||
WPA3_SAE_PWE_UNSPECIFIED,
|
||||
WPA3_SAE_PWE_HUNT_AND_PECK,
|
||||
WPA3_SAE_PWE_HASH_TO_ELEMENT,
|
||||
WPA3_SAE_PWE_BOTH,
|
||||
} wifi_sae_pwe_method_t;
|
||||
|
||||
/** @brief Soft-AP configuration settings for the ESP32 */
|
||||
typedef struct {
|
||||
uint8_t ssid[32]; /**< SSID of ESP32 soft-AP. If ssid_len field is 0, this must be a Null terminated string. Otherwise, length is set according to ssid_len. */
|
||||
|
|
@ -249,6 +257,7 @@ typedef struct {
|
|||
uint32_t btm_enabled:1; /**< Whether BSS Transition Management is enabled for the connection */
|
||||
uint32_t mbo_enabled:1; /**< Whether MBO is enabled for the connection */
|
||||
uint32_t reserved:29; /**< Reserved for future feature set */
|
||||
wifi_sae_pwe_method_t sae_pwe_h2e; /**< Whether SAE hash to element is enabled */
|
||||
} wifi_sta_config_t;
|
||||
|
||||
/** @brief Configuration data for ESP32 AP or STA.
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
Copyright (c) 2016 Cristian Rodríguez <crrodriguez@opensuse.org>
|
||||
Copyright (c) 2016 Thomas Beutlich <tc@tbeu.de>
|
||||
Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk>
|
||||
Copyright (c) 2022 Thijs Schreijer <thijs@thijsschreijer.nl>
|
||||
Licensed under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
|
|
@ -174,8 +175,10 @@ struct XML_cp {
|
|||
};
|
||||
|
||||
/* This is called for an element declaration. See above for
|
||||
description of the model argument. It's the caller's responsibility
|
||||
to free model when finished with it.
|
||||
description of the model argument. It's the user code's responsibility
|
||||
to free model when finished with it. See XML_FreeContentModel.
|
||||
There is no need to free the model from the handler, it can be kept
|
||||
around and freed at a later stage.
|
||||
*/
|
||||
typedef void(XMLCALL *XML_ElementDeclHandler)(void *userData,
|
||||
const XML_Char *name,
|
||||
|
|
@ -237,6 +240,17 @@ XML_ParserCreate(const XML_Char *encoding);
|
|||
and the local part will be concatenated without any separator.
|
||||
It is a programming error to use the separator '\0' with namespace
|
||||
triplets (see XML_SetReturnNSTriplet).
|
||||
If a namespace separator is chosen that can be part of a URI or
|
||||
part of an XML name, splitting an expanded name back into its
|
||||
1, 2 or 3 original parts on application level in the element handler
|
||||
may end up vulnerable, so these are advised against; sane choices for
|
||||
a namespace separator are e.g. '\n' (line feed) and '|' (pipe).
|
||||
|
||||
Note that Expat does not validate namespace URIs (beyond encoding)
|
||||
against RFC 3986 today (and is not required to do so with regard to
|
||||
the XML 1.0 namespaces specification) but it may start doing that
|
||||
in future releases. Before that, an application using Expat must
|
||||
be ready to receive namespace URIs containing non-URI characters.
|
||||
*/
|
||||
XMLPARSEAPI(XML_Parser)
|
||||
XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);
|
||||
|
|
@ -317,7 +331,7 @@ typedef void(XMLCALL *XML_StartDoctypeDeclHandler)(void *userData,
|
|||
const XML_Char *pubid,
|
||||
int has_internal_subset);
|
||||
|
||||
/* This is called for the start of the DOCTYPE declaration when the
|
||||
/* This is called for the end of the DOCTYPE declaration when the
|
||||
closing > is encountered, but after processing any external
|
||||
subset.
|
||||
*/
|
||||
|
|
@ -1041,7 +1055,7 @@ XML_SetBillionLaughsAttackProtectionActivationThreshold(
|
|||
*/
|
||||
#define XML_MAJOR_VERSION 2
|
||||
#define XML_MINOR_VERSION 4
|
||||
#define XML_MICRO_VERSION 3
|
||||
#define XML_MICRO_VERSION 8
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
#define PACKAGE_NAME "expat"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "expat 2.4.3"
|
||||
#define PACKAGE_STRING "expat 2.4.8"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "expat"
|
||||
|
|
@ -72,13 +72,13 @@
|
|||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "2.4.3"
|
||||
#define PACKAGE_VERSION "2.4.8"
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "2.4.3"
|
||||
#define VERSION "2.4.8"
|
||||
|
||||
/* whether byteorder is bigendian */
|
||||
/* #undef WORDS_BIGENDIAN */
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "idf_additions_inc.h"
|
||||
|
||||
#if ( INCLUDE_vTaskPrioritySet == 1 )
|
||||
|
||||
/**
|
||||
* INCLUDE_vTaskPrioritySet must be defined as 1 for this function to be available.
|
||||
* See the configuration section for more information.
|
||||
*
|
||||
* Saves the current priority and current base priority of a task, then raises the tasks
|
||||
* current and base priority to uxNewPriority if uxNewPriority is of a higher priority.
|
||||
* Once a task's priority has been raised with this function, the priority can be restored
|
||||
* by calling prvTaskPriorityRestore()
|
||||
* - Note that this function differs from vTaskPrioritySet() as the task's current priority
|
||||
* will be modified even if the task has already inherited a priority.
|
||||
* - This function is intended for special circumstance where a task must be forced immediately
|
||||
* to a higher priority.
|
||||
*
|
||||
* For configUSE_MUTEXES == 0: A context switch will occur before the function returns if the priority
|
||||
* being set is higher than the currently executing task.
|
||||
*
|
||||
* @note This functions is private is only be called internally within various IDF components.
|
||||
* Users should never call this function from their application.
|
||||
*
|
||||
* @note vTaskPrioritySet() should not be called while a task's priority is already raised via this function
|
||||
*
|
||||
* @param pxSavedPriority returns base and current priorities
|
||||
*
|
||||
* @param uxNewPriority The priority to which the task will be set.
|
||||
*/
|
||||
void prvTaskPriorityRaise( prvTaskSavedPriority_t * pxSavedPriority, UBaseType_t uxNewPriority );
|
||||
|
||||
/**
|
||||
* INCLUDE_vTaskPrioritySet must be defined as 1 for this function to be available.
|
||||
* See the configuration section for more information.
|
||||
*
|
||||
* Restore a task's priority that was previously raised by prvTaskPriorityRaise().
|
||||
*
|
||||
* For configUSE_MUTEXES == 0: A context switch will occur before the function returns if the priority
|
||||
* being set is higher than the currently executing task.
|
||||
*
|
||||
* @note This functions is private is only be called internally within various IDF components.
|
||||
* Users should never call this function from their application.
|
||||
*
|
||||
* @param pxSavedPriority previously saved base and current priorities that need to be restored
|
||||
*/
|
||||
void prvTaskPriorityRestore( prvTaskSavedPriority_t * pxSavedPriority );
|
||||
|
||||
#endif // ( INCLUDE_vTaskPrioritySet == 1)
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
|
||||
#ifndef FREERTOS_ADDITITIONS_INC_H_
|
||||
#define FREERTOS_ADDITITIONS_INC_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
|
||||
#if ( INCLUDE_vTaskPrioritySet == 1 )
|
||||
|
||||
typedef struct {
|
||||
UBaseType_t uxPriority;
|
||||
#if ( configUSE_MUTEXES == 1 )
|
||||
UBaseType_t uxBasePriority;
|
||||
#endif
|
||||
} prvTaskSavedPriority_t;
|
||||
|
||||
#endif // ( INCLUDE_vTaskPrioritySet == 1)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif //FREERTOS_ADDITITIONS_INC_H_
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
// Copyright 2015-2021 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.
|
||||
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* This file will be included in `tasks.c` file, thus, it must NOT be included
|
||||
* by any (other) file.
|
||||
* The functions below only consist in getters for the static variables in
|
||||
* `tasks.c` file.
|
||||
* The only source files that should call these functions are the ones in
|
||||
* `/additions` directory.
|
||||
*/
|
||||
|
||||
#if ( configENABLE_TASK_SNAPSHOT == 1 )
|
||||
|
||||
UBaseType_t pxTCBGetSize ( void )
|
||||
{
|
||||
return sizeof(TCB_t);
|
||||
}
|
||||
|
||||
ListItem_t* pxTCBGetStateListItem ( void *pxTCB )
|
||||
{
|
||||
return &(((TCB_t*)pxTCB)->xStateListItem);
|
||||
}
|
||||
|
||||
StackType_t* pxTCBGetStartOfStack ( void *pxTCB )
|
||||
{
|
||||
return (StackType_t*) ((TCB_t*)pxTCB)->pxStack;
|
||||
}
|
||||
|
||||
StackType_t* pxTCBGetTopOfStack ( void *pxTCB )
|
||||
{
|
||||
return (StackType_t*) ((TCB_t*)pxTCB)->pxTopOfStack;
|
||||
}
|
||||
|
||||
StackType_t* pxTCBGetEndOfStack ( void *pxTCB )
|
||||
{
|
||||
return (StackType_t*) ((TCB_t*)pxTCB)->pxEndOfStack;
|
||||
}
|
||||
|
||||
|
||||
List_t* pxListGetReadyTask ( UBaseType_t idx )
|
||||
{
|
||||
return &( pxReadyTasksLists[idx] );
|
||||
}
|
||||
|
||||
List_t* pxListGetReadyPendingTask ( UBaseType_t idx )
|
||||
{
|
||||
return &( xPendingReadyList[idx] );
|
||||
}
|
||||
|
||||
List_t* pxGetDelayedTaskList ( void ) {
|
||||
return pxDelayedTaskList;
|
||||
}
|
||||
|
||||
List_t* pxGetOverflowDelayedTaskList ( void ) {
|
||||
return pxOverflowDelayedTaskList;
|
||||
}
|
||||
|
||||
List_t* pxGetTasksWaitingTermination ( void ) {
|
||||
return &xTasksWaitingTermination;
|
||||
}
|
||||
|
||||
List_t* pxGetSuspendedTaskList ( void ) {
|
||||
return &xSuspendedTaskList;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -2655,12 +2655,13 @@ BaseType_t xTaskGenericNotifyFromISR( TaskHandle_t xTaskToNotify,
|
|||
* not have this parameter and always waits for notifications on index 0.
|
||||
*
|
||||
* @param ulBitsToClearOnEntry Bits that are set in ulBitsToClearOnEntry value
|
||||
* will be cleared in the calling task's notification value before the task
|
||||
* checks to see if any notifications are pending, and optionally blocks if no
|
||||
* notifications are pending. Setting ulBitsToClearOnEntry to ULONG_MAX (if
|
||||
* limits.h is included) or 0xffffffffUL (if limits.h is not included) will have
|
||||
* the effect of resetting the task's notification value to 0. Setting
|
||||
* ulBitsToClearOnEntry to 0 will leave the task's notification value unchanged.
|
||||
* will be cleared in the calling task's notification value before the task is
|
||||
* marked as waiting for a new notification (provided a notification is not
|
||||
* already pending). Optionally blocks if no notifications are pending. Setting
|
||||
* ulBitsToClearOnEntry to ULONG_MAX (if limits.h is included) or 0xffffffffUL
|
||||
* (if limits.h is not included) will have the effect of resetting the task's
|
||||
* notification value to 0. Setting ulBitsToClearOnEntry to 0 will leave the
|
||||
* task's notification value unchanged.
|
||||
*
|
||||
* @param ulBitsToClearOnExit If a notification is pending or received before
|
||||
* the calling task exits the xTaskNotifyWait() function then the task's
|
||||
|
|
@ -3367,6 +3368,25 @@ void vTaskPlaceOnEventListRestricted( List_t * const pxEventList,
|
|||
TickType_t xTicksToWait,
|
||||
const BaseType_t xWaitIndefinitely ) PRIVILEGED_FUNCTION;
|
||||
|
||||
#ifdef ESP_PLATFORM
|
||||
/*
|
||||
* THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS AN
|
||||
* INTERFACE WHICH IS FOR THE EXCLUSIVE USE OF THE SCHEDULER.
|
||||
*
|
||||
* This function is a wrapper to take the "xTaskQueueMutex" spinlock of tasks.c.
|
||||
* This lock is taken whenver any of the task lists or event lists are
|
||||
* accessed/modified, such as when adding/removing tasks to/from the delayed
|
||||
* task list or various event lists.
|
||||
*
|
||||
* This functions is meant to be called by xEventGroupSetBits() and
|
||||
* vEventGroupDelete() as both those functions will access event lists (instead
|
||||
* of delegating the entire responsibility to one of vTask...EventList()
|
||||
* functions).
|
||||
*/
|
||||
void vTaskTakeEventListLock( void );
|
||||
void vTaskReleaseEventListLock( void );
|
||||
#endif // ESP_PLATFORM
|
||||
|
||||
/*
|
||||
* THIS FUNCTION MUST NOT BE USED FROM APPLICATION CODE. IT IS AN
|
||||
* INTERFACE WHICH IS FOR THE EXCLUSIVE USE OF THE SCHEDULER.
|
||||
|
|
|
|||
|
|
@ -890,6 +890,39 @@ static inline void i2c_ll_update(i2c_dev_t *hw)
|
|||
;// ESP32 do not support
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Configure I2C SCL timing
|
||||
*
|
||||
* @param hw Beginning address of the peripheral registers
|
||||
* @param high_period The I2C SCL hight period (in core clock cycle, hight_period > 2)
|
||||
* @param low_period The I2C SCL low period (in core clock cycle, low_period > 1)
|
||||
* @param wait_high_period The I2C SCL wait rising edge period.
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
static inline void i2c_ll_set_scl_clk_timing(i2c_dev_t *hw, int high_period, int low_period, int wait_high_period)
|
||||
{
|
||||
(void)wait_high_period;
|
||||
hw->scl_low_period.period = low_period;
|
||||
hw->scl_high_period.period = high_period;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get I2C SCL timing configuration
|
||||
*
|
||||
* @param hw Beginning address of the peripheral registers
|
||||
* @param high_period Pointer to accept the SCL high period
|
||||
* @param low_period Pointer to accept the SCL low period
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
static inline void i2c_ll_get_scl_clk_timing(i2c_dev_t *hw, int *high_period, int *low_period, int *wait_high_period)
|
||||
{
|
||||
*wait_high_period = 0; // Useless
|
||||
*high_period = hw->scl_high_period.period;
|
||||
*low_period = hw->scl_low_period.period;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,16 +1,8 @@
|
|||
// Copyright 2015-2019 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.
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
* NOTICE
|
||||
|
|
@ -229,6 +221,7 @@ static inline void rtcio_ll_pulldown_disable(int rtcio_num)
|
|||
static inline void rtcio_ll_force_hold_enable(int rtcio_num)
|
||||
{
|
||||
REG_SET_BIT(RTC_CNTL_HOLD_FORCE_REG, rtc_io_desc[rtcio_num].hold_force);
|
||||
REG_SET_BIT(rtc_io_desc[rtcio_num].reg, rtc_io_desc[rtcio_num].hold);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1081,6 +1081,29 @@ static inline void spi_dma_ll_enable_out_auto_wrback(spi_dma_dev_t *dma_out, uin
|
|||
//does not configure it in ESP32
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the spi communication command
|
||||
*
|
||||
* @param cmd_t Base command value
|
||||
* @param line_mode Line mode of SPI transaction phases: CMD, ADDR, DOUT/DIN.
|
||||
*/
|
||||
static inline uint16_t spi_ll_get_slave_hd_command(spi_command_t cmd_t, spi_line_mode_t line_mode)
|
||||
{
|
||||
//This is not supported in esp32
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the dummy bits
|
||||
*
|
||||
* @param line_mode Line mode of SPI transaction phases: CMD, ADDR, DOUT/DIN.
|
||||
*/
|
||||
static inline int spi_ll_get_slave_hd_dummy_bits(spi_line_mode_t line_mode)
|
||||
{
|
||||
//This is not supported in esp32
|
||||
return 0;
|
||||
}
|
||||
|
||||
#undef SPI_LL_RST_MASK
|
||||
#undef SPI_LL_UNUSED_INT_MASK
|
||||
|
||||
|
|
|
|||
|
|
@ -36,9 +36,6 @@
|
|||
#define ADC_HAL_DMA_INTR_MASK BIT(9)
|
||||
#endif
|
||||
|
||||
//For ADC module, each conversion contains 4 bytes
|
||||
#define ADC_HAL_DATA_LEN_PER_CONV 4
|
||||
|
||||
typedef enum adc_hal_work_mode_t {
|
||||
ADC_HAL_ULP_MODE,
|
||||
ADC_HAL_SINGLE_READ_MODE,
|
||||
|
|
|
|||
|
|
@ -161,7 +161,8 @@ typedef struct {
|
|||
typedef struct {
|
||||
union {
|
||||
struct {
|
||||
uint32_t data: 13; /*!<ADC real output data info. Resolution: 13 bit. */
|
||||
uint32_t data: 12; /*!<ADC real output data info. Resolution: 12 bit. */
|
||||
uint32_t reserved12: 1; /*!<Reserved12. */
|
||||
uint32_t channel: 4; /*!<ADC channel index info.
|
||||
If (channel < ADC_CHANNEL_MAX), The data is valid.
|
||||
If (channel > ADC_CHANNEL_MAX), The data is invalid. */
|
||||
|
|
|
|||
|
|
@ -120,6 +120,29 @@ typedef struct {
|
|||
*/
|
||||
#define i2c_hal_set_source_clk(hal, src_clk) i2c_ll_set_source_clk((hal)->dev, src_clk)
|
||||
|
||||
/**
|
||||
* @brief Configure I2C SCL timing
|
||||
*
|
||||
* @param hw Beginning address of the peripheral registers
|
||||
* @param high_period The I2C SCL hight period (in core clock cycle, hight_period > 2)
|
||||
* @param low_period The I2C SCL low period (in core clock cycle, low_period > 1)
|
||||
* @param wait_high_period The I2C SCL wait rising edge period.
|
||||
*
|
||||
* @return None.
|
||||
*/
|
||||
#define i2c_hal_set_scl_clk_timing(hal, high_period, low_period, wait_high_period) i2c_ll_set_scl_clk_timing((hal)->dev, high_period, low_period, wait_high_period)
|
||||
|
||||
/**
|
||||
* @brief Get I2C SCL timing configuration
|
||||
*
|
||||
* @param hw Beginning address of the peripheral registers
|
||||
* @param high_period Pointer to accept the SCL high period
|
||||
* @param low_period Pointer to accept the SCL low period
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
#define i2c_hal_get_scl_clk_timing(hal, high_period, low_period, wait_high_period) i2c_ll_get_scl_clk_timing((hal)->dev, high_period, low_period, wait_high_period)
|
||||
|
||||
/**
|
||||
* @brief Init the I2C master.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -125,6 +125,16 @@ void i2s_hal_init(i2s_hal_context_t *hal, int i2s_num);
|
|||
*/
|
||||
void i2s_hal_set_clock_src(i2s_hal_context_t *hal, i2s_clock_src_t sel);
|
||||
|
||||
/**
|
||||
* @brief Calculate the closest sample rate clock configuration.
|
||||
* clock relationship:
|
||||
* Fmclk = bck_div*fbck = fsclk/(mclk_div+b/a)
|
||||
*
|
||||
* @param clk_cfg I2S clock configuration(input)
|
||||
* @param cal Point to `i2s_ll_mclk_div_t` structure(output).
|
||||
*/
|
||||
void i2s_hal_mclk_div_decimal_cal(i2s_hal_clock_cfg_t *clk_cfg, i2s_ll_mclk_div_t *cal);
|
||||
|
||||
/**
|
||||
* @brief Set Tx channel style
|
||||
*
|
||||
|
|
@ -342,8 +352,9 @@ void i2s_hal_rx_set_common_mode(i2s_hal_context_t *hal, const i2s_hal_config_t *
|
|||
*
|
||||
* @param hal Context of the HAL layer
|
||||
* @param sample_rate PDM sample rate
|
||||
* @param is_mono whether is mono
|
||||
*/
|
||||
void i2s_hal_tx_set_pdm_mode_default(i2s_hal_context_t *hal, uint32_t sample_rate);
|
||||
void i2s_hal_tx_set_pdm_mode_default(i2s_hal_context_t *hal, uint32_t sample_rate, bool is_mono);
|
||||
#endif
|
||||
|
||||
#if SOC_I2S_SUPPORTS_PDM_RX
|
||||
|
|
|
|||
|
|
@ -1,23 +1,52 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief LCD peripheral SOC layer handle
|
||||
*/
|
||||
typedef struct lcd_cam_dev_t *lcd_soc_handle_t;
|
||||
|
||||
/**
|
||||
* @brief LCD HAL layer context
|
||||
*/
|
||||
typedef struct {
|
||||
lcd_soc_handle_t dev;
|
||||
lcd_soc_handle_t dev; // SOC layer handle
|
||||
} lcd_hal_context_t;
|
||||
|
||||
/**
|
||||
* @brief LCD HAL layer initialization
|
||||
*
|
||||
* @param hal LCD HAL layer context
|
||||
* @param id LCD peripheral ID
|
||||
*/
|
||||
void lcd_hal_init(lcd_hal_context_t *hal, int id);
|
||||
|
||||
#define LCD_HAL_PCLK_FLAG_ALLOW_EQUAL_SYSCLK (1 << 0)
|
||||
|
||||
/**
|
||||
* @brief LCD PCLK clock calculation
|
||||
* @note Currently this function is only used by RGB LCD driver, I80 driver still uses a fixed clock division
|
||||
*
|
||||
* @param hal LCD HAL layer context
|
||||
* @param src_freq_hz LCD source clock frequency in Hz
|
||||
* @param expect_pclk_freq_hz Expected LCD PCLK frequency in Hz
|
||||
* @param lcd_clk_flags Extra flags to control LCD PCLK clock calculation, supported flags are prefixed with LCD_HAL_PCLK_FLAG_
|
||||
* @return Actual LCD PCLK frequency in Hz
|
||||
*/
|
||||
uint32_t lcd_hal_cal_pclk_freq(lcd_hal_context_t *hal, uint32_t src_freq_hz, uint32_t expect_pclk_freq_hz, int lcd_clk_flags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -34,6 +34,39 @@ typedef enum {
|
|||
LCD_CLK_SRC_XTAL, /*!< Select XTAL as the source clock */
|
||||
} lcd_clock_source_t;
|
||||
|
||||
/**
|
||||
* @brief LCD color space
|
||||
*/
|
||||
typedef enum {
|
||||
LCD_COLOR_SPACE_RGB, /*!< Color space: RGB */
|
||||
LCD_COLOR_SPACE_YUV, /*!< Color space: YUV */
|
||||
} lcd_color_space_t;
|
||||
|
||||
/**
|
||||
* @brief LCD color range
|
||||
*/
|
||||
typedef enum {
|
||||
LCD_COLOR_RANGE_LIMIT, /*!< Limited color range */
|
||||
LCD_COLOR_RANGE_FULL, /*!< Full color range */
|
||||
} lcd_color_range_t;
|
||||
|
||||
/**
|
||||
* @brief YUV sampling method
|
||||
*/
|
||||
typedef enum {
|
||||
LCD_YUV_SAMPLE_422, /*!< YUV 4:2:2 sampling */
|
||||
LCD_YUV_SAMPLE_420, /*!< YUV 4:2:0 sampling */
|
||||
LCD_YUV_SAMPLE_411, /*!< YUV 4:1:1 sampling */
|
||||
} lcd_yuv_sample_t;
|
||||
|
||||
/**
|
||||
* @brief The standard used for conversion between RGB and YUV
|
||||
*/
|
||||
typedef enum {
|
||||
LCD_YUV_CONV_STD_BT601, /*!< YUV<->RGB conversion standard: BT.601 */
|
||||
LCD_YUV_CONV_STD_BT709, /*!< YUV<->RGB conversion standard: BT.709 */
|
||||
} lcd_yuv_conv_std_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -55,6 +55,22 @@ typedef struct {
|
|||
uint8_t data_lines; ///< The line width of data phase, e.g. 4-line-data-phase.
|
||||
} spi_line_mode_t;
|
||||
|
||||
/**
|
||||
* @brief SPI command.
|
||||
*/
|
||||
typedef enum {
|
||||
/* Slave HD Only */
|
||||
SPI_CMD_HD_WRBUF = BIT(0),
|
||||
SPI_CMD_HD_RDBUF = BIT(1),
|
||||
SPI_CMD_HD_WRDMA = BIT(2),
|
||||
SPI_CMD_HD_RDDMA = BIT(3),
|
||||
SPI_CMD_HD_SEG_END = BIT(4),
|
||||
SPI_CMD_HD_EN_QPI = BIT(5),
|
||||
SPI_CMD_HD_WR_END = BIT(6),
|
||||
SPI_CMD_HD_INT0 = BIT(7),
|
||||
SPI_CMD_HD_INT1 = BIT(8),
|
||||
SPI_CMD_HD_INT2 = BIT(9),
|
||||
} spi_command_t;
|
||||
|
||||
/** @cond */ //Doxy command to hide preprocessor definitions from docs */
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,9 @@ extern void abort(void);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if CONFIG_HAL_DEFAULT_ASSERTION_LEVEL == 1 // silent
|
||||
#if IS_ULP_COCPU
|
||||
#define HAL_ASSERT(__e) ((void)(__e))
|
||||
#elif CONFIG_HAL_DEFAULT_ASSERTION_LEVEL == 1 // silent
|
||||
#define HAL_ASSERT(__e) (__builtin_expect(!!(__e), 1) ? (void)0 : abort())
|
||||
#elif CONFIG_HAL_DEFAULT_ASSERTION_LEVEL == 2 // full assertion
|
||||
#define HAL_ASSERT(__e) (__builtin_expect(!!(__e), 1) ? (void)0 : __assert_func(__FILE__, __LINE__, __ASSERT_FUNC, #__e))
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ extern "C" {
|
|||
#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_DEFAULT (1<<12) ///< Memory can be returned in a non-capability-specific memory allocation (e.g. malloc(), calloc()) call
|
||||
#define MALLOC_CAP_IRAM_8BIT (1<<13) ///< Memory must be in IRAM and allow unaligned access
|
||||
#define MALLOC_CAP_RETENTION (1<<14)
|
||||
#define MALLOC_CAP_RETENTION (1<<14) ///< Memory must be able to accessed by retention DMA
|
||||
#define MALLOC_CAP_RTCRAM (1<<15) ///< Memory must be in RTC fast memory
|
||||
|
||||
#define MALLOC_CAP_INVALID (1<<31) ///< Memory can't be used / list end marker
|
||||
|
|
@ -58,8 +58,6 @@ esp_err_t heap_caps_register_failed_alloc_callback(esp_alloc_failed_hook_t callb
|
|||
*
|
||||
* Equivalent semantics to libc malloc(), for capability-aware memory.
|
||||
*
|
||||
* In IDF, ``malloc(p)`` is equivalent to ``heap_caps_malloc(p, MALLOC_CAP_8BIT)``.
|
||||
*
|
||||
* @param size Size, in bytes, of the amount of memory to allocate
|
||||
* @param caps Bitwise OR of MALLOC_CAP_* flags indicating the type
|
||||
* of memory to be returned
|
||||
|
|
|
|||
|
|
@ -132,6 +132,8 @@ typedef struct nvs_opaque_iterator_t *nvs_iterator_t;
|
|||
* mode is NVS_READONLY
|
||||
* - ESP_ERR_NVS_INVALID_NAME if namespace name doesn't satisfy constraints
|
||||
* - ESP_ERR_NO_MEM in case memory could not be allocated for the internal structures
|
||||
* - ESP_ERR_NVS_NOT_ENOUGH_SPACE if there is no space for a new entry or there are too many different
|
||||
* namespaces (maximum allowed different namespaces: 254)
|
||||
* - other error codes from the underlying storage driver
|
||||
*/
|
||||
esp_err_t nvs_open(const char* name, nvs_open_mode_t open_mode, nvs_handle_t *out_handle);
|
||||
|
|
@ -161,6 +163,8 @@ esp_err_t nvs_open(const char* name, nvs_open_mode_t open_mode, nvs_handle_t *ou
|
|||
* mode is NVS_READONLY
|
||||
* - ESP_ERR_NVS_INVALID_NAME if namespace name doesn't satisfy constraints
|
||||
* - ESP_ERR_NO_MEM in case memory could not be allocated for the internal structures
|
||||
* - ESP_ERR_NVS_NOT_ENOUGH_SPACE if there is no space for a new entry or there are too many different
|
||||
* namespaces (maximum allowed different namespaces: 254)
|
||||
* - other error codes from the underlying storage driver
|
||||
*/
|
||||
esp_err_t nvs_open_from_partition(const char *part_name, const char* name, nvs_open_mode_t open_mode, nvs_handle_t *out_handle);
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ typedef struct protocomm_ble_config {
|
|||
/**
|
||||
* BLE device name being broadcast at the time of provisioning
|
||||
*/
|
||||
char device_name[MAX_BLE_DEVNAME_LEN];
|
||||
char device_name[MAX_BLE_DEVNAME_LEN + 1];
|
||||
|
||||
/**
|
||||
* 128 bit UUID of the provisioning service
|
||||
|
|
|
|||
|
|
@ -403,6 +403,11 @@ uint32_t rtc_clk_apb_freq_get(void);
|
|||
* 32k XTAL is being calibrated, but the oscillator has not started up (due to
|
||||
* incorrect loading capacitance, board design issue, or lack of 32 XTAL on board).
|
||||
*
|
||||
* @note When 32k CLK is being calibrated, this function will check the accuracy
|
||||
* of the clock. Since the xtal 32k or ext osc 32k is generally very stable, if
|
||||
* the check fails, then consider this an invalid 32k clock and return 0. This
|
||||
* check can filter some jamming signal.
|
||||
*
|
||||
* @param cal_clk clock to be measured
|
||||
* @param slow_clk_cycles number of slow clock cycles to average
|
||||
* @return average slow clock period in microseconds, Q13.19 fixed point format,
|
||||
|
|
|
|||
|
|
@ -89,9 +89,11 @@
|
|||
#define SOC_ADC_PATT_LEN_MAX (16) //Two pattern table, each contains 16 items. Each item takes 1 byte. But only support ADC1 using DMA mode
|
||||
#define SOC_ADC_DIGI_MIN_BITWIDTH (9)
|
||||
#define SOC_ADC_DIGI_MAX_BITWIDTH (12)
|
||||
#define SOC_ADC_DIGI_RESULT_BYTES (2)
|
||||
#define SOC_ADC_DIGI_DATA_BYTES_PER_CONV (4)
|
||||
/*!< F_sample = F_digi_con / 2 / interval. F_digi_con = 5M for now. 30 <= interva <= 4095 */
|
||||
#define SOC_ADC_SAMPLE_FREQ_THRES_HIGH (2*1000*1000)
|
||||
#define SOC_ADC_SAMPLE_FREQ_THRES_LOW (2000)
|
||||
#define SOC_ADC_SAMPLE_FREQ_THRES_LOW (20*1000)
|
||||
|
||||
/*!< RTC */
|
||||
#define SOC_ADC_MAX_BITWIDTH (12)
|
||||
|
|
@ -224,6 +226,7 @@
|
|||
#define SOC_SPI_DMA_CHAN_NUM 2
|
||||
|
||||
#define SOC_SPI_PERIPH_CS_NUM(i) 3
|
||||
#define SOC_SPI_MAX_CS_NUM 3
|
||||
|
||||
#define SOC_SPI_MAXIMUM_BUFFER_SIZE 64
|
||||
#define SOC_SPI_MAX_PRE_DIVIDER 8192
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ typedef struct {
|
|||
const uint8_t spid6_in;
|
||||
const uint8_t spid7_in;
|
||||
#endif // SOC_SPI_SUPPORT_OCT
|
||||
const uint8_t spics_out[3]; // /CS GPIO output mux signals
|
||||
const uint8_t spics_out[SOC_SPI_MAX_CS_NUM]; // /CS GPIO output mux signals
|
||||
const uint8_t spics_in;
|
||||
const uint8_t spidqs_out;
|
||||
const uint8_t spicd_out;
|
||||
|
|
|
|||
|
|
@ -34,11 +34,32 @@
|
|||
#endif
|
||||
#include "esp_flash.h"
|
||||
#include "hal/spi_flash_hal.h"
|
||||
#include "soc/soc_caps.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Type of MSPI IO
|
||||
typedef enum {
|
||||
ESP_MSPI_IO_CLK = 0,
|
||||
ESP_MSPI_IO_Q,
|
||||
ESP_MSPI_IO_D,
|
||||
ESP_MSPI_IO_CS0, /* cs for spi flash */
|
||||
ESP_MSPI_IO_HD,
|
||||
ESP_MSPI_IO_WP,
|
||||
#if SOC_SPI_MEM_SUPPORT_OPI_MODE
|
||||
ESP_MSPI_IO_DQS,
|
||||
ESP_MSPI_IO_D4,
|
||||
ESP_MSPI_IO_D5,
|
||||
ESP_MSPI_IO_D6,
|
||||
ESP_MSPI_IO_D7,
|
||||
#endif // SOC_SPI_MEM_SUPPORT_OPI_MODE
|
||||
#if CONFIG_SPIRAM
|
||||
ESP_MSPI_IO_CS1 /* cs for spi ram */
|
||||
#endif
|
||||
} esp_mspi_io_t;
|
||||
|
||||
/**
|
||||
* @brief To setup Flash chip
|
||||
*/
|
||||
|
|
@ -80,6 +101,15 @@ void spi_timing_psram_tuning(void);
|
|||
*/
|
||||
void esp_mspi_pin_init(void);
|
||||
|
||||
/**
|
||||
* @brief Get the number of the GPIO corresponding to the given MSPI io
|
||||
*
|
||||
* @param[in] io MSPI io
|
||||
*
|
||||
* @return MSPI IO number
|
||||
*/
|
||||
uint8_t esp_mspi_get_io(esp_mspi_io_t io);
|
||||
|
||||
/**
|
||||
* @brief Set SPI1 registers to make ROM functions work
|
||||
* @note This function is used for setting SPI1 registers to the state that ROM SPI functions work
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ typedef struct esp_transport_keepalive {
|
|||
int keep_alive_count; /*!< Keep-alive packet retry send count */
|
||||
} esp_transport_keep_alive_t;
|
||||
|
||||
typedef struct esp_transport_internal* esp_transport_list_handle_t;
|
||||
typedef struct esp_transport_list_t* esp_transport_list_handle_t;
|
||||
typedef struct esp_transport_item_t* esp_transport_handle_t;
|
||||
|
||||
typedef int (*connect_func)(esp_transport_handle_t t, const char *host, int port, int timeout_ms);
|
||||
|
|
@ -45,6 +45,10 @@ typedef esp_transport_handle_t (*payload_transfer_func)(esp_transport_handle_t);
|
|||
|
||||
typedef struct esp_tls_last_error* esp_tls_error_handle_t;
|
||||
|
||||
/**
|
||||
* @brief Error types for TCP connection issues not covered in socket's errno
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Create transport list
|
||||
*
|
||||
|
|
@ -340,6 +344,7 @@ esp_tls_error_handle_t esp_transport_get_error_handle(esp_transport_handle_t t);
|
|||
*/
|
||||
int esp_transport_get_errno(esp_transport_handle_t t);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
32
tools/sdk/esp32/include/ulp/include/esp32s3/ulp_riscv_adc.h
Normal file
32
tools/sdk/esp32/include/ulp/include/esp32s3/ulp_riscv_adc.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "hal/adc_types.h"
|
||||
#include "esp_err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
adc_channel_t channel; // ADC channel
|
||||
adc_atten_t atten; // ADC channel attenuation
|
||||
adc_bits_width_t width; // ADC bit width, only used for ADC unit 1
|
||||
} ulp_riscv_adc_cfg_t; // ULP Riscv ADC configuration parameters
|
||||
|
||||
/**
|
||||
* @brief Initialize and calibrate the ADC1 for use by ULP RISCV
|
||||
*
|
||||
* @param cfg Configuration parameters
|
||||
* @return esp_err_t ESP_OK for successful.
|
||||
*/
|
||||
esp_err_t ulp_riscv_adc_init(const ulp_riscv_adc_cfg_t *cfg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
@ -29,9 +29,6 @@
|
|||
#define DEBUG_PRINT
|
||||
#endif
|
||||
|
||||
#if CONFIG_WPA_11KV_SUPPORT
|
||||
#define ROAMING_SUPPORT 1
|
||||
#endif
|
||||
|
||||
#if CONFIG_WPA_SCAN_CACHE
|
||||
#define SCAN_CACHE_SUPPORTED
|
||||
|
|
|
|||
|
|
@ -1,19 +1,13 @@
|
|||
// Copyright 2020 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.
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "xtensa/xtruntime.h"
|
||||
|
||||
#define RSR(reg, at) asm volatile ("rsr %0, %1" : "=r" (at) : "i" (reg))
|
||||
#define WSR(reg, at) asm volatile ("wsr %0, %1" : : "r" (at), "i" (reg))
|
||||
#define XSR(reg, at) asm volatile ("xsr %0, %1" : "+r" (at) : "i" (reg))
|
||||
|
|
@ -23,14 +17,27 @@
|
|||
#define WITLB(at, as) asm volatile ("witlb %0, %1; \n isync \n " : : "r" (at), "r" (as))
|
||||
#define WDTLB(at, as) asm volatile ("wdtlb %0, %1; \n dsync \n " : : "r" (at), "r" (as))
|
||||
|
||||
#define EXTRA_SAVE_AREA_SIZE 32
|
||||
#define BASE_SAVE_AREA_SIZE 16
|
||||
#define SAVE_AREA_OFFSET (EXTRA_SAVE_AREA_SIZE + BASE_SAVE_AREA_SIZE)
|
||||
#define BASE_AREA_SP_OFFSET 12
|
||||
|
||||
/* The SET_STACK implements a setting a new stack pointer (sp or a1).
|
||||
* to do this the need reset PS_WOE, reset WINDOWSTART, update SP, and return PS_WOE.
|
||||
*
|
||||
* In addition, if a windowOverflow8/12 happens the exception handler expects to be able to look at
|
||||
* the previous frames stackpointer to find the extra save area. So this function will reserve space
|
||||
* for this area as well as initialise the previous sp that points to it
|
||||
*
|
||||
* Note: It has 2 implementations one for using in assembler files (*.S) and one for using in C.
|
||||
*
|
||||
* C code prototype for SET_STACK:
|
||||
* uint32_t ps_reg;
|
||||
* uint32_t w_base;
|
||||
*
|
||||
* uint32_t sp = (uint32_t)new_sp - SAVE_AREA_OFFSET; \
|
||||
*(uint32_t*)(sp - 12) = (uint32_t)new_sp; \
|
||||
|
||||
* RSR(PS, ps_reg);
|
||||
* ps_reg &= ~(PS_WOE_MASK | PS_OWB_MASK | PS_CALLINC_MASK);
|
||||
* WSR(PS, ps_reg);
|
||||
|
|
@ -46,6 +53,10 @@
|
|||
*/
|
||||
#ifdef __ASSEMBLER__
|
||||
.macro SET_STACK new_sp tmp1 tmp2
|
||||
addi tmp1, new_sp, -SAVE_AREA_OFFSET
|
||||
addi tmp2, tmp1, -BASE_AREA_SP_OFFSET
|
||||
s32i new_sp, tmp2, 0
|
||||
addi new_sp, tmp1, 0
|
||||
rsr.ps \tmp1
|
||||
movi \tmp2, ~(PS_WOE_MASK | PS_OWB_MASK | PS_CALLINC_MASK)
|
||||
and \tmp1, \tmp1, \tmp2
|
||||
|
|
@ -68,8 +79,11 @@
|
|||
rsync
|
||||
.endm
|
||||
#else
|
||||
|
||||
#define SET_STACK(new_sp) \
|
||||
do { \
|
||||
uint32_t sp = (uint32_t)new_sp - SAVE_AREA_OFFSET; \
|
||||
*(uint32_t*)(sp - BASE_AREA_SP_OFFSET) = (uint32_t)new_sp; \
|
||||
uint32_t tmp1 = 0, tmp2 = 0; \
|
||||
asm volatile ( \
|
||||
"rsr.ps %1 \n"\
|
||||
|
|
@ -93,6 +107,6 @@
|
|||
"or %1, %1, %2 \n"\
|
||||
"wsr.ps %1 \n"\
|
||||
"rsync \n"\
|
||||
: "+r"(new_sp), "+r"(tmp1), "+r"(tmp2)); \
|
||||
: "+r"(sp), "+r"(tmp1), "+r"(tmp2)); \
|
||||
} while (0);
|
||||
#endif // __ASSEMBLER__
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef XTENSA_DEBUG_MODULE_H
|
||||
#define XTENSA_DEBUG_MODULE_H
|
||||
|
||||
#include <xtensa/config/core-isa.h>
|
||||
|
||||
/*
|
||||
ERI registers / OCD offsets and field definitions
|
||||
*/
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -70,7 +70,7 @@ MEMORY
|
|||
/* (See iram0_2_seg for meaning of 0x20 offset in the above.) */
|
||||
/* RTC fast memory (executable). Persists over deep sleep.
|
||||
*/
|
||||
rtc_iram_seg(RWX) : org = 0x400C0000, len = 0x2000
|
||||
rtc_iram_seg(RWX) : org = 0x400C0000, len = 0x2000 - (0x10)
|
||||
/* RTC fast memory (same block as above), viewed from data bus */
|
||||
rtc_data_seg(RW) : org = 0x3ff80000, len = 0x2000 - (0x10)
|
||||
/* RTC slow memory (data accessible). Persists over deep sleep.
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue