text
stringlengths
1
9.98k
__index_level_0__
int64
0
4.17k
< The number of scenes to be stored */ } esp_ble_mesh_state_change_scene_store_t; /** Parameter of Scene Recall state change event */ typedef struct { uint16_t scene_number; /*!< The number of scenes to be recalled */ } esp_ble_mesh_state_change_scene_recall_t; /** Parameter of Scene Delete state change event */...
3,286
< Scheduled second for the action */ uint64_t day_of_week : 7; /*!< Schedule days of the week for the action */ uint64_t action : 4; /*!< Action to be performed at the scheduled time */ uint64_t trans_time : 8; /*!< Transition time for this action */ uint16_t scene_number; /*!< Scene nu...
3,286
< Scene Recall */ esp_ble_mesh_state_change_scene_delete_t scene_delete; /*!< Scene Delete */ esp_ble_mesh_state_change_scheduler_act_set_t scheduler_act_set; /*!< Scheduler Action Set */ } esp_ble_mesh_time_scene_server_state_change_t; /** Context of the received Scheduler Action Get message *...
3,286
< Current difference between TAI and UTC in seconds */ uint8_t time_zone_offset; /*!< The local time zone offset in 15-minute increments */ } esp_ble_mesh_server_recv_time_set_t; /** Context of the received Time Zone Set message */ typedef struct { uint8_t time_zone_offset_new; /*!< Upcoming local time...
3,286
< The number of scenes to be stored */ } esp_ble_mesh_server_recv_scene_store_t; /** Context of the received Scene Recall message */ typedef struct { bool op_en; /*!< Indicate if optional parameters are included */ uint16_t scene_number; /*!< The number of scenes to be recalled */ uint8_t tid...
3,286
< Scheduled month for the action */ uint64_t day : 5; /*!< Scheduled day of the month for the action */ uint64_t hour : 5; /*!< Scheduled hour for the action */ uint64_t minute : 6; /*!< Scheduled minute for the action */ uint64_t second : 6; /*!< Scheduled second for th...
3,286
< Time Role Set */ esp_ble_mesh_server_recv_scene_store_t scene_store; /*!< Scene Store/Scene Store Unack */ esp_ble_mesh_server_recv_scene_recall_t scene_recall; /*!< Scene Recall/Scene Recall Unack */ esp_ble_mesh_server_recv_scene_delete_t scene_delete; /*!< Scene Delete/S...
3,286
< The local time zone offset in 15-minute increments */ } esp_ble_mesh_server_recv_time_status_t; /** */ typedef union { esp_ble_mesh_server_recv_time_status_t time_status; /*!< Time Status */ } esp_ble_mesh_time_scene_server_recv_status_msg_t; /** */ typedef union { esp_ble_mesh_time_scene_server_state...
3,286
< Value of the received Time and Scenes Messages */ } esp_ble_mesh_time_scene_server_cb_param_t; /** This enum value is the event of Time Scene Server Model */ typedef enum { /** */ ESP_BLE_MESH_TIME_SCENE_SERVER_STATE_CHANGE_EVT, /** */ ESP_BLE_MESH_TIME_SCENE_SERVER_RECV_GET_MSG_EVT, /*...
3,286
/* */ /** @file */ #ifndef _ESP_BLE_MESH_SENSOR_MODEL_API_H_ #define _ESP_BLE_MESH_SENSOR_MODEL_API_H_ #include "esp_ble_mesh_defs.h" #ifdef __cplusplus extern "C" { #endif /** @def ESP_BLE_MESH_MODEL_SENSOR_CLI */ #define ESP_BLE_MESH_MODEL_SENSOR_CLI(cli_pub, cli_data) \ ESP_BLE_MESH_SIG...
3,287
< The value of Sensor Positive Tolerance field */ negative_tolerance : 12, /*!< The value of Sensor Negative Tolerance field */ sampling_function : 8; /*!< The value of Sensor Sampling Function field */ uint8_t measure_period; /*!< The value of Sensor Measurement Period f...
3,287
< The value of Status Trigger Delta Down field */ struct net_buf_simple *trigger_delta_up; /*!< The value of Status Trigger Delta Up field */ uint8_t min_interval; /*!< The value of Status Min Interval field */ struct net_buf_simple *fast_cadence_low; /*!< The value of Fast Caden...
3,287
< The value of Sensor Raw Value Y field */ } esp_ble_mesh_sensor_series_column_t; /** Parameters of Sensor states */ typedef struct { uint16_t sensor_property_id; /*!< The value of Sensor Property ID field */ /* Constant throughout the lifetime of an element */ esp_ble_mesh_sensor_descriptor_t descript...
3,287
< Pointer to the Sensor Server Model. Initialized internally. */ esp_ble_mesh_server_rsp_ctrl_t rsp_ctrl; /*!< Response control of the server model received messages */ const uint8_t state_count; /*!< Sensor state count */ esp_ble_mesh_sensor_state_t *states; /*!< Parameters of th...
3,287
< The value of Fast Cadence Period Divisor state */ trigger_type : 1; /*!< The value of Status Trigger Type state */ struct net_buf_simple *trigger_delta_down; /*!< The value of Status Trigger Delta Down state */ struct net_buf_simple *trigger_delta_up; /*!< The value of Status Trigger Del...
3,287
< Sensor Cadence Set */ esp_ble_mesh_state_change_sensor_setting_set_t sensor_setting_set; /*!< Sensor Setting Set */ } esp_ble_mesh_sensor_server_state_change_t; /** Context of the received Sensor Descriptor Get message */ typedef struct { bool op_en; /*!< Indicate if optional parameters are included */ ...
3,287
< Indicate if optional parameters are included */ uint16_t property_id; /*!< Property ID for the sensor (optional) */ } esp_ble_mesh_server_recv_sensor_get_t; /** Context of the received Sensor Column Get message */ typedef struct { uint16_t property_id; /*!< Property identifying a sensor */ struct ne...
3,287
< Sensor Settings Get */ esp_ble_mesh_server_recv_sensor_setting_get_t sensor_setting; /*!< Sensor Setting Get */ esp_ble_mesh_server_recv_sensor_get_t sensor_data; /*!< Sensor Get */ esp_ble_mesh_server_recv_sensor_column_get_t sensor_column; /*!< Sensor Column Get */ esp...
3,287
< Raw value for the setting */ } esp_ble_mesh_server_recv_sensor_setting_set_t; /** */ typedef union { esp_ble_mesh_server_recv_sensor_cadence_set_t sensor_cadence; /*!< Sensor Cadence Set */ esp_ble_mesh_server_recv_sensor_setting_set_t sensor_setting; /*!< Sensor Setting Set */ } esp_ble_mesh_sensor_ser...
3,287
/* */ #ifndef __ESP_BT_CFG_H__ #define __ESP_BT_CFG_H__ #include #include #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif #if CONFIG_BT_NIMBLE_ENABLED #include "syscfg/syscfg.h" #endif #define NIMBLE_LL_STACK_SIZE CONFIG_BT_LE_CONTROLLER_TASK_STACK_SIZE #if CONFIG_BT_NIMBLE_ENABLED #if CONFIG_...
3,288
/* */ #pragma once #include #include "esp_err.h" #include "esp_intr_alloc.h" #include "freertos/FreeRTOS.h" #include "freertos/queue.h" #include "freertos/semphr.h" #ifdef __cplusplus extern "C" { #endif #if CONFIG_BTDM_CTRL_HLI /*** Queues ***/ struct hli_queue_t { size_t elem_size; char* begin; ch...
3,289
/* */ #ifndef __ESP_BT_CFG_H__ #define __ESP_BT_CFG_H__ #include #include #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif #if CONFIG_BT_NIMBLE_ENABLED #include "syscfg/syscfg.h" #endif #define NIMBLE_LL_STACK_SIZE CONFIG_BT_LE_CONTROLLER_TASK_STACK_SIZE #if CONFIG_BT_NIMBLE_ENABLED #if CONFIG_...
3,290
/* */ #ifndef __ESP_BT_CFG_H__ #define __ESP_BT_CFG_H__ #include #include #include "esp_err.h" #ifdef __cplusplus extern "C" { #endif #if CONFIG_BT_NIMBLE_ENABLED #include "syscfg/syscfg.h" #endif #define NIMBLE_LL_STACK_SIZE CONFIG_BT_LE_CONTROLLER_TASK_STACK_SIZE #if CONFIG_BT_NIMBLE_ENABLED #if CONFIG_...
3,291
/* */ #ifndef __BTC_MANAGE_H__ #define __BTC_MANAGE_H__ #include "btc/btc_task.h" #if BTC_DYNAMIC_MEMORY == FALSE extern void *btc_profile_cb_tab[BTC_PID_NUM]; #else extern void **btc_profile_cb_tab; #endif /* reset gatt callback table */ void esp_profile_cb_reset(void); int btc_profile_cb_set(btc_pid_t profile_id...
3,292
/* */ #ifndef __BTC_ALARM_H__ #define __BTC_ALARM_H__ #include #include "osi/alarm.h" /* btc_alarm_args_t */ typedef struct { osi_alarm_callback_t cb; void *cb_data; } btc_alarm_args_t; void btc_alarm_handler(btc_msg_t *msg); #endif /* __BTC_ALARM_H__ */
3,293
/* */ #ifndef __BTC_TASK_H__ #define __BTC_TASK_H__ #include #include "bt_common.h" #include "osi/thread.h" #if CONFIG_BT_BLUEDROID_ENABLED #include "common/bt_target.h" #endif typedef struct btc_msg { uint8_t sig; //event signal uint8_t aid; //application id uint8_t pid; //profile id uin...
3,294
/* */ #ifndef __BLUFI_INT_H__ #define __BLUFI_INT_H__ #include "btc/btc_task.h" #include "esp_blufi_api.h" #ifdef __cplusplus extern "C" { #endif #if (BLUFI_INCLUDED == TRUE) #define BTC_BLUFI_GREAT_VER 0x01 //Version + Subversion #define BTC_BLUFI_SUB_VER 0x03 //Version + Subversion #define BTC_BLUFI_VER...
3,295
((fc) & BLUFI_DIR_P2E_MASK)) #define BLUFI_FC_IS_REQ_ACK(fc) ((fc) & BLUFI_FC_REQ_ACK_MASK) #define BLUFI_FC_IS_FRAG(fc) ((fc) & BLUFI_FC_FRAG_MASK) /* default GATT MTU size over LE link */ #define GATT_DEF_BLE_MTU_SIZE 23 /* BLUFI HEADER + TOTAL(REMAIN) LENGTH + CRC + L2CAP RESERVED */ #define BL...
3,295
/* */ #ifndef __ESP_BLUFI_H__ #define __ESP_BLUFI_H__ #include "esp_blufi_api.h" #include "esp_err.h" #ifdef CONFIG_BT_NIMBLE_ENABLED #include "nimble/ble.h" #include "host/ble_gap.h" #include "modlog/modlog.h" #endif #ifdef CONFIG_BT_BLUEDROID_ENABLED #include "esp_gap_ble_api.h" #endif #ifdef __cplusplus extern...
3,296
/* */ #ifndef __BTC_BLUFI_PRF_H__ #define __BTC_BLUFI_PRF_H__ #include "blufi_int.h" #include "btc/btc_task.h" #include "esp_blufi_api.h" #include "esp_err.h" #ifdef CONFIG_BT_BLUEDROID_ENABLED #include "stack/gatt_api.h" #define ESP_BLUFI_ERROR GATT_ERROR #define ESP_BLUFI_SUCCESS GATT_SUCCESS #else #define ESP_BL...
3,297
/* */ #ifndef _BT_COMMON_H_ #define _BT_COMMON_H_ #include #include #include "bt_user_config.h" #include "esp_log.h" #ifndef FALSE #define FALSE false #endif #ifndef TRUE #define TRUE true #endif #if (UC_BT_BLUFI_ENABLE) #define BLUFI_INCLUDED TRUE #else #define BLUFI_INCLUDED FALS...
3,298
(a) : (b)) #define BT_LOG_LEVEL_CHECK(LAYER, LEVEL) (MAX(LAYER##_INITIAL_TRACE_LEVEL, LOG_LOCAL_LEVEL_MAPPING) >= BT_TRACE_LEVEL_##LEVEL) #define BT_PRINT_E(tag, format, ...) {esp_log_write(ESP_LOG_ERROR, tag, LOG_FORMAT(E, format), esp_log_timestamp(), tag, ##__VA_ARGS__); } #define BT_PRINT_W(tag, format, ...)...
3,298
..) {if (BTC_INITIAL_TRACE_LEVEL >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(BTC, WARNING)) BT_PRINT_W("BT_BTC", fmt, ## args);} #define BTC_TRACE_API(fmt, args...) {if (BTC_INITIAL_TRACE_LEVEL >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(BTC,API)) BT_PRINT_I("BT_BTC", fmt, ## args);} #define BTC_TRACE_EVE...
3,298
..) {if (OSI_INITIAL_TRACE_LEVEL >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(OSI, WARNING)) BT_PRINT_W("BT_OSI", fmt, ## args);} #define OSI_TRACE_API(fmt, args...) {if (OSI_INITIAL_TRACE_LEVEL >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(OSI,API)) BT_PRINT_I("BT_OSI", fmt, ## args);} #define OSI_TRACE_EVE...
3,298
..) {if (BLUFI_INITIAL_TRACE_LEVEL >= BT_TRACE_LEVEL_WARNING && BT_LOG_LEVEL_CHECK(BLUFI, WARNING)) BT_PRINT_W("BT_BLUFI", fmt, ## args);} #define BLUFI_TRACE_API(fmt, args...) {if (BLUFI_INITIAL_TRACE_LEVEL >= BT_TRACE_LEVEL_API && BT_LOG_LEVEL_CHECK(BLUFI,API)) BT_PRINT_I("BT_BLUFI", fmt, ## args);} #define...
3,298
..) #define BTC_TRACE_DEBUG(fmt, args...) #define BTC_TRACE_VERBOSE(fmt, args...) /* define traces for OSI */ #define OSI_TRACE_ERROR(fmt, args...) #define OSI_TRACE_WARNING(fmt, args...) #define OSI_TRACE_API(fmt, args...) #define OSI_TRACE_EVENT(fmt, args...) #define OSI_TRACE_DEBUG(fmt, args...) #define OSI_TRACE_V...
3,298
*/ #define MAX_UUID_SIZE 16 typedef struct { #define LEN_UUID_16 2 #define LEN_UUID_32 4 #define LEN_UUID_128 16 UINT16 len; union { UINT16 uuid16; UINT32 uuid32; UINT8 uuid128[MAX_UUID_SIZE]; } uu; } tBT_UUID; /* Common Bluetoot...
3,298
/* */ #ifndef __BT_USER_CONFIG_H__ #define __BT_USER_CONFIG_H__ #include "sdkconfig.h" #define UC_TRACE_LEVEL_NONE 0 /* No trace messages to be generated */ #define UC_TRACE_LEVEL_ERROR 1 /* Error condition trace messages */ #define UC_TRACE_LEVEL_WARNING ...
3,299
CONFIG_BT_BLUEDROID_PINNED_TO_CORE : tskNO_AFFINITY) #else #define UC_TASK_PINNED_TO_CORE (0) #endif #ifdef CONFIG_BT_BTC_TASK_STACK_SIZE #define UC_BTC_TASK_STACK_SIZE CONFIG_BT_BTC_TASK_STACK_SIZE #else #define UC_BTC_TASK_STACK_SIZE 4096 #endif / / #ifdef CONFIG_LOG_DEFAUL...
3,299
/ #ifndef __SEMAPHORE_H__ #define __SEMAPHORE_H__ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/queue.h" #include "freertos/semphr.h" #define OSI_SEM_MAX_TIMEOUT 0xffffffffUL typedef SemaphoreHandle_t osi_sem_t; #define osi_sem_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE ) #def...
3,300
/ #ifndef _FIXED_QUEUE_H_ #define _FIXED_QUEUE_H_ #include #include "osi/list.h" #include "osi/semaphore.h" #ifndef QUEUE_SIZE_MAX #define QUEUE_SIZE_MAX 254 #endif #define FIXED_QUEUE_MAX_TIMEOUT OSI_SEM_MAX_TIMEOUT struct fixed_queue_t; typedef struct fixed_queue_t fixed_queue_t; /...
3,301
If |queue| // is NULL, the return value is true. bool fixed_queue_is_empty(fixed_queue_t *queue); // Returns the length of the |queue|. If |queue| is NULL, the return value // is 0. size_t fixed_queue_length(fixed_queue_t *queue); // Returns the maximum number of elements this queue may hold. |queue| may // not be N...
3,301
// This function will never block the caller. Returns NULL if there are no // elements in the queue or |queue| is NULL. void *fixed_queue_try_peek_first(fixed_queue_t *queue); // Returns the last element from |queue|, if present, without dequeuing it. // This function will never block the caller. Returns NULL if ther...
3,301
// TODO: The usage of this function should be refactored, and the function // itself should be removed. list_t *fixed_queue_get_list(fixed_queue_t *queue); // This function returns a valid file descriptor. Callers may perform one // operation on the fd: select(2). If |select| indicates that the file // descriptor is ...
3,301
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_queue_register_dequeue(fixed_queue_t *queue, fixed_queue_cb ready_cb); // Unregisters the dequeue ready callback for |queue| from whichever reactor ...
3,301
/ #ifndef __FUTURE_H__ #define __FUTURE_H__ #include "osi/semaphore.h" struct future { bool ready_can_be_called; osi_sem_t semaphore; // NULL semaphore means immediate future void *result; }; typedef struct future future_t; #define FUTURE_SUCCESS ((void *)1) #define FUTURE_FAIL ((void *)0) // Construct...
3,302
/ #ifndef _ALARM_H_ #define _ALARM_H_ #include #include "esp_timer.h" typedef struct alarm_t osi_alarm_t; typedef uint64_t period_ms_t; typedef esp_timer_cb_t osi_alarm_callback_t; typedef enum { OSI_ALARM_ERR_PASS = 0, OSI_ALARM_ERR_FAIL = -1, OSI_ALARM_ERR_INVALID_ARG = -2, OSI_ALARM_ERR_INVALID_...
3,303
Note that |deadline| is the // number of milliseconds relative to the current time. |data| is a context variable // for the callback and may be NULL. |cb| will be called back in the context of an // unspecified thread (i.e. it will not be called back in the same thread as the caller). // |alarm| and |cb| may not be NU...
3,303
// Return true if active, false otherwise. bool osi_alarm_is_active(osi_alarm_t *alarm); #endif /*_ALARM_H_*/
3,303
/ #ifndef _HASH_MAP_H_ #define _HASH_MAP_H_ #include #include struct hash_map_t; typedef struct hash_map_t hash_map_t; typedef struct hash_map_entry_t { const void *key; void *data; const hash_map_t *hash_map; } hash_map_entry_t; typedef size_t hash_index_t; // Takes a key structure and returns a ha...
3,304
They can be used to release resources held by the hash_map element, // e.g. memory or file descriptor. |key_fn| and |data_fn| may be NULL if no cleanup // is necessary on element removal. |equality_fn| is used to check for key equality. // If |equality_fn| is NULL, default pointer equality is used. hash_map_t *hash_...
3,304
This function does not accept a // NULL |hash_map|. //size_t hash_map_num_buckets(const hash_map_t *hash_map); // Returns true if the hash_map has a valid entry for the presented key. // This function does not accept a NULL |hash_map|. bool hash_map_has_key(const hash_map_t *hash_map, const void *key); // Returns t...
3,304
|hash_map| may not be NULL. // If |key_fn| or |data_fn| functions were specified in |hash_map_new|, they // will be called back with |key| or |data| respectively. This function returns true // if |key| was found in the hash_map and removed, false otherwise. bool hash_map_erase(hash_map_t *hash_map, const void *key); ...
3,304
/* */ #ifndef __CONFIG_H__ #define __CONFIG_H__ // This module implements a configuration parser. Clients can query the // contents of a configuration file through the interface provided here. // The current implementation is read-only; mutations are only kept in // memory. This parser supports the INI file format. ...
3,305
e. not backed by a file). // This function returns a config object or NULL on error. Clients must call // |config_free| on the returned handle when it is no longer required. config_t *config_new_empty(void); // Loads the specified file and returns a handle to the config file. If there // was a problem loading the file...
3,305
// Returns false otherwise. |config|, |section|, and |key| must not be NULL. bool config_has_key(const config_t *config, const char *section, const char *key); // Returns true if the config file has a key named |key| and the key_value. // Returns false otherwise. |config|, |key|, and |key_value| must not be NULL. boo...
3,305
If |section| or // |key| do not exist, this function returns |def_value|. The returned string // is owned by the config module and must not be freed. |config|, |section|, // and |key| must not be NULL. |def_value| may be NULL. const char *config_get_string(const config_t *config, const char *section, const char *key, ...
3,305
|config|, |section|, |key|, and // |value| must not be NULL. void config_set_string(config_t *config, const char *section, const char *key, const char *value, bool insert_back); // Removes |section| from the |config| (and, as a result, all keys in the section). // Returns true if |section| was found and removed from ...
3,305
If there are no // sections, the iterator will equal the return value of |config_section_end|. // The returned pointer must be treated as an opaque handle and must not be freed. // The iterator is invalidated on any config mutating operation. |config| may not // be NULL. const config_section_node_t *config_section_beg...
3,305
const config_section_node_t *config_section_next(const config_section_node_t *iter); // Returns the name of the section referred to by |iter|. The returned pointer is // owned by the config module and must not be freed by the caller. The pointer will // remain valid until |config_free| is called. |iter| may not be NU...
3,305
/* */ #ifndef _PKT_LIST_H_ #define _PKT_LIST_H_ #include "sys/queue.h" #include #include #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_...
3,306
/ #ifndef _HASH_FUNCTIONS_H_ #define _HASH_FUNCTIONS_H_ #include "osi/hash_map.h" typedef unsigned char hash_key_t[4]; hash_index_t hash_function_naive(const void *key); hash_index_t hash_function_integer(const void *key); // Hashes a pointer based only on its address value hash_index_t hash_function_pointer(cons...
3,307
#ifndef _OSI_H_ #define _OSI_H_ #include #include #define UNUSED_ATTR __attribute__((unused)) #define CONCAT(a, b) a##b #define COMPILE_ASSERT(x) int osi_init(void); void osi_deinit(void); #endif /*_OSI_H_*/
3,308
#ifndef _LIST_H_ #define _LIST_H_ #include #include struct list_node_t; typedef struct list_node_t list_node_t; struct list_t; typedef struct list_t list_t; typedef void (*list_free_cb)(void *data); typedef bool (*list_iter_cb)(void *data, void *context); // Returns a new, empty list. Returns NULL if not enough m...
3,309
void list_free(list_t *list); // Returns true if |list| is empty (has no elements), false otherwise. // |list| may not be NULL. bool list_is_empty(const list_t *list); // Returns true if the list contains |data|, false otherwise. // |list| may not be NULL. bool list_contains(const list_t *list, const void *data); /...
3,309
Returns true if |data| could be inserted, false otherwise // (e.g. out of memory). bool list_insert_after(list_t *list, list_node_t *prev_node, void *data); // Inserts |data| at the beginning of |list|. Neither |data| nor |list| may be NULL. // This function does not make a copy of |data| so the pointer must remain v...
3,309
If a free function was specified in |list_new|, it will be called back // with |data|. This function returns true if |data| was found in the list and removed, // false otherwise. //list_node_t list_remove_node(list_t *list, list_node_t *prev_node, list_node_t *node); //list_node_t list_insert_node(list_t *list, list_n...
3,309
list_node_t *list_foreach(const list_t *list, list_iter_cb callback, void *context); // Returns an iterator to the first element in |list|. |list| may not be NULL. // The returned iterator is valid as long as it does not equal the value returned // by |list_end|. list_node_t *list_begin(const list_t *list); // Retur...
3,309
// |node| must not equal the value returned by |list_end|. void *list_node(const list_node_t *node); #endif /* _LIST_H_ */
3,309
/ #ifndef _BUFFER_H_ #define _BUFFER_H_ #include #include typedef struct buffer_t buffer_t; // Returns a new buffer of |size| bytes. Returns NULL if a buffer could not be // allocated. |size| must be non-zero. The caller must release this buffer with // |buffer_free|. buffer_t *buffer_new(size_t size); // Create...
3,310
buffer_t *buffer_new_slice(const buffer_t *buf, size_t slice_size); // Frees a buffer object. |buf| may be NULL. void buffer_free(buffer_t *buf); // Returns a pointer to a writeable memory region for |buf|. All references // and slices that share overlapping bytes will also be written to when // writing to the retur...
3,310
/* */ #ifndef __THREAD_H__ #define __THREAD_H__ #include "freertos/FreeRTOSConfig.h" #include "freertos/FreeRTOS.h" #include "freertos/queue.h" #include "freertos/task.h" #include "osi/semaphore.h" #include "esp_task.h" #include "bt_common.h" #define OSI_THREAD_MAX_TIMEOUT OSI_SEM_MAX_TIMEOUT struct osi_thread; st...
3,311
/ #ifndef _ALLOCATOR_H_ #define _ALLOCATOR_H_ #include #include #include "esp_heap_caps.h" char *osi_strdup(const char *str); void *osi_malloc_func(size_t size); void *osi_calloc_func(size_t size); void osi_free_func(void *ptr); #if HEAP_MEMORY_DEBUG void osi_mem_dbg_init(void); void osi_mem_dbg_record(void *p,...
3,312
/* */ #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_MA...
3,313
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|...
3,313
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_queu...
3,313
/ #ifndef __MUTEX_H__ #define __MUTEX_H__ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/queue.h" #include "freertos/semphr.h" #include "osi/semaphore.h" #define OSI_MUTEX_MAX_TIMEOUT OSI_SEM_MAX_TIMEOUT #define osi_mutex_valid( x ) ( ( ( *x ) == NULL) ? pdFALSE : pdTRUE ) #define osi_...
3,314
/* */ #ifndef __ESP_BLUFI_API_H__ #define __ESP_BLUFI_API_H__ #include "esp_err.h" #include "esp_wifi_types.h" #ifdef __cplusplus extern "C" { #endif typedef enum { ESP_BLUFI_EVENT_INIT_FINISH = 0, /*<! When BLUFI init complete, this event happen */ ESP_BLUFI_EVENT_DEINIT_FINISH, ...
3,315
When Phone get ESP32 wifi status, this event happen */ ESP_BLUFI_EVENT_DEAUTHENTICATE_STA, /*<! When Phone deauthenticate sta from SOFTAP, this event happen */ /* recv data */ ESP_BLUFI_EVENT_RECV_STA_BSSID, /*<! When Phone send STA BSSID to ESP32 to connect, this even...
3,315
When Phone send SOFTAP authentication mode to ESP32 to start SOFTAP, this event happen */ ESP_BLUFI_EVENT_RECV_SOFTAP_CHANNEL, /*<! When Phone send SOFTAP channel to ESP32 to start SOFTAP, this event happen */ ESP_BLUFI_EVENT_RECV_USERNAME, /*<! When Phone send username to...
3,315
When Phone send Disconnect key to ESP32, this event happen */ ESP_BLUFI_EVENT_GET_WIFI_LIST, /*<! When Phone send get wifi list command to ESP32, this event happen */ ESP_BLUFI_EVENT_REPORT_ERROR, /*<! When Blufi report error, this event happen */ ESP_BLUFI_EVEN...
3,315
< BSSID of station interface */ bool sta_bssid_set; /*!< is BSSID of station interface set */ uint8_t *sta_ssid; /*!< SSID of station interface */ int sta_ssid_len; /*!< length of SSID of station interface */ uint8_t *sta_passwd; /*!< password of station...
3,315
< is max connection number of softap interface set */ uint8_t softap_channel; /*!< channel of softap interface */ bool softap_channel_set; /*!< is channel of softap interface set */ uint8_t sta_max_conn_retry; /*!< max retry of sta establish connection */ bool sta_max_conn_retry_set; ...
3,315
< Initial status */ } init_finish; /*!< Blufi callback param of ESP_BLUFI_EVENT_INIT_FINISH */ /** */ struct blufi_deinit_finish_evt_param { esp_blufi_deinit_state_t state; /*!< De-initial status */ } deinit_finish; /*!< Blufi callback param of ESP_BLUFI_EVENT_DEINIT_FINISH ...
3,315
< Blufi Remote bluetooth device address */ } disconnect; /*!< Blufi callback param of ESP_BLUFI_EVENT_DISCONNECT */ /* ESP_BLUFI_EVENT_REQ_WIFI_CONNECT */ /* No callback param */ /* ESP_BLUFI_EVENT_REQ_WIFI_DISCONNECT */ /* No callback param */ /** */ struct blufi_recv_...
3,315
< Password Length */ } sta_passwd; /*!< Blufi callback param of ESP_BLUFI_EVENT_RECV_STA_PASSWD */ /** */ struct blufi_recv_softap_ssid_evt_param { uint8_t *ssid; /*!< SSID */ int ssid_len; /*!...
3,315
< Authentication mode */ } softap_auth_mode; /*!< Blufi callback param of ESP_BLUFI_EVENT_RECV_SOFTAP_AUTH_MODE */ /** */ struct blufi_recv_softap_channel_evt_param { uint8_t channel; /*!< Authentication mode */ } softap_channel; ...
3,315
< Blufi callback param of ESP_BLUFI_EVENT_RECV_CA_CERT */ /** */ struct blufi_recv_client_cert_evt_param { uint8_t *cert; /*!< Client certificate point */ int cert_len; /*!< Client certificate length */ } client_cert; ...
3,315
< Client Private key length */ } client_pkey; /*!< Blufi callback param of ESP_BLUFI_EVENT_RECV_CLIENT_PRIV_KEY */ /** */ struct blufi_recv_server_pkey_evt_param { uint8_t *pkey; /*!< Client Private Key point, if Client certificate n...
3,315
< Blufi callback param of ESP_BLUFI_EVENT_RECV_CUSTOM_DATA */ } esp_blufi_cb_param_t; /** */ typedef void (* esp_blufi_event_cb_t)(esp_blufi_cb_event_t event, esp_blufi_cb_param_t *param); /* security function declare */ /** */ typedef void (*esp_blufi_negotiate_data_handler_t)(uint8_t *data, int len, uint8_t **ou...
3,315
< BLUFI decrypt data function with share key generated by negotiate_data_handler */ esp_blufi_checksum_func_t checksum_func; /*!< BLUFI check sum function (FCS) */ } esp_blufi_callbacks_t; /** esp_err_t esp_blufi_register_callbacks(esp_blufi_callbacks_t *callbacks); /** esp_err_t esp_blufi_...
3,315
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif #include #include "driver/uart.h" /** */ typedef int (*hci_uart_tx_char)(void *arg); /** */ typedef void (*hci_uart_tx_done)(void *arg); /** */ typedef int (*hci_uart_rx_char)(void *arg, uint8_t byte); /** */ int hci_uart_init_cbs(int uart, hci_uar...
3,316
/* */ #pragma once #ifdef __cplusplus extern "C" { #endif #if SOC_ESP_NIMBLE_CONTROLLER && CONFIG_BT_CONTROLLER_ENABLED struct os_mempool; struct os_mbuf_pool; int r_mem_malloc_mempool(struct os_mempool *mempool, uint16_t num_blocks, uint32_t block_size, char *name, void **out_buf); #defi...
3,317
/* utils.h - TinyCrypt interface to platform-dependent run-time operations */ /* */ /** #ifndef __TC_UTILS_H__ #define __TC_UTILS_H__ #include #include #ifdef __cplusplus extern "C" { #endif /** */ unsigned int _copy(uint8_t *to, unsigned int to_len, const uint8_t *from, unsigned int from_len); /...
3,318
/* ctr_prng.h - TinyCrypt interface to a CTR-PRNG implementation */ /* */ /** */ #ifndef __TC_CTR_PRNG_H__ #define __TC_CTR_PRNG_H__ #include #define TC_CTR_PRNG_RESEED_REQ -1 #ifdef __cplusplus extern "C" { #endif typedef struct { /* updated each time another BLOCKLEN_BYTES bytes are produced */ uint8_t V[...
3,319
/* ccm_mode.h - TinyCrypt interface to a CCM mode implementation */ /* */ /** */ #ifndef __TC_CCM_MODE_H__ #define __TC_CCM_MODE_H__ #include #include #ifdef __cplusplus extern "C" { #endif /* max additional authenticated size in bytes: 2^16 - 2^8 = 65280 */ #define TC_CCM_AAD_MAX_BYTES 0xff00 /* max message...
3,320
/* cbc_mode.h - TinyCrypt interface to a CBC mode implementation */ /* */ /** #ifdef __cplusplus extern "C" { #endif /** */ int tc_cbc_mode_encrypt(uint8_t *out, unsigned int outlen, const uint8_t *in, unsigned int inlen, const uint8_t *iv, const TCAesKeySched_t sched); /** int tc_cbc_mode_decrypt(uint8_t ...
3,321
/* sha256.h - TinyCrypt interface to a SHA-256 implementation */ /* */ /** */ #ifndef __TC_SHA256_H__ #define __TC_SHA256_H__ #include #include #ifdef __cplusplus extern "C" { #endif #define TC_SHA256_BLOCK_SIZE (64) #define TC_SHA256_DIGEST_SIZE (32) #define TC_SHA256_STATE_BLOCKS (TC_SHA256_DIGEST_SIZE/4) ...
3,322
/* hmac_prng.h - TinyCrypt interface to an HMAC-PRNG implementation */ /* */ /** */ #ifndef __TC_HMAC_PRNG_H__ #define __TC_HMAC_PRNG_H__ #include #include #ifdef __cplusplus extern "C" { #endif #define TC_HMAC_PRNG_RESEED_REQ -1 struct tc_hmac_prng_struct { /* the HMAC instance for this PRNG */ struct tc_...
3,323
/* ecc_dh.h - TinyCrypt interface to EC-DH implementation */ /* */ /* Copyright (C) 2017 by Intel Corporation, All Rights Reserved. */ /** */ #ifndef __TC_ECC_DH_H__ #define __TC_ECC_DH_H__ #include #ifdef __cplusplus extern "C" { #endif /** */ int uECC_make_key(uint8_t *p_public_key, uint8_t *p_private_key...
3,324