text stringlengths 1 9.98k | __index_level_0__ int64 0 4.17k |
|---|---|
NULL : genie_slist_get_not_empty(list);
}
/**
*/
static inline void genie_slist_remove(genie_slist_t *list,
genie_snode_t *prev_node,
genie_snode_t *node)
{
if (!prev_node) {
list->head = node->next;
/* Was node also the tai... | 4,034 |
// Copyright (C) 2018-2020 Alibaba Group Holding Limited
// Adaptations to ESP-IDF Copyright (c) 2020 Espressif Systems (Shanghai) Co. 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... | 4,035 |
/*
*/
#ifndef _BOARD_H_
#define _BOARD_H_
#ifdef __cplusplus
extern "C" {
#endif /**< __cplusplus */
#include "driver/gpio.h"
#include "lightbulb.h"
#define LED_ON 1
#define LED_OFF 0
#define POWERUP_KEY "powerup"
/**
*/
void board_init(void);
/**
*/
void board_led_hsl(uint8_t elem_index, uint16_t hue, ... | 4,036 |
/*
*/
#ifndef _BOARD_H_
#define _BOARD_H_
#ifdef __cplusplus
extern "C" {
#endif /**< __cplusplus */
#include "sdkconfig.h"
#include "driver/gpio.h"
#include "esp_ble_mesh_defs.h"
#ifdef CONFIG_BLE_MESH_ESP_WROOM_32
#define LED_R GPIO_NUM_25
#define LED_G GPIO_NUM_26
#define LED_B GPIO_NUM_27
#elif defined(CONFIG_... | 4,037 |
/*
*/
#ifndef _BLE_MESH_FAST_PROV_COMMON_H_
#define _BLE_MESH_FAST_PROV_COMMON_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "esp_ble_mesh_defs.h"
#include "esp_ble_mesh_config_model_api.h"
#define LED_OFF 0x00
#define LED_ON 0x01
#define CID_ESP 0x02E5
/* Fast Prov Model ID */
#define ESP_BLE_... | 4,038 |
/*
*/
#ifndef _BLE_MESH_FAST_PROV_SERVER_MODEL_H_
#define _BLE_MESH_FAST_PROV_SERVER_MODEL_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "ble_mesh_fast_prov_common.h"
#define DISABLE_FAST_PROV_TIMEOUT K_SECONDS(10)
#define GATT_PROXY_ENABLE_TIMEOUT K_SECONDS(10)
#define FAST_PROV_NODE_COUNT_MIN ... | 4,039 |
g. phone) which triggers fast provisioning */
esp_ble_mesh_msg_ctx_t ctx; /* the context stored for sending fast prov status message */
struct fast_prov_info_set *set_info; /* Used to store received fast prov info set context */
uint16_t node_addr_cnt; /* Number of node address shall be received */... | 4,039 |
/*
*/
#ifndef _BLE_MESH_FAST_PROV_OPERATION_H_
#define _BLE_MESH_FAST_PROV_OPERATION_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "ble_mesh_fast_prov_common.h"
esp_err_t example_store_node_info(const uint8_t uuid[16], uint16_t node_addr,
uint8_t elem_num, uint16_t net_idx,
... | 4,040 |
/*
*/
#ifndef _BLE_MESH_FAST_PROV_CLIENT_MODEL_H_
#define _BLE_MESH_FAST_PROV_CLIENT_MODEL_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "esp_ble_mesh_defs.h"
enum {
SEND_SELF_PROV_NODE_ADDR_START, /* Flag indicates the timer used to send self-provisioned node addresses has been started */
CLI_MAX_FLA... | 4,041 |
/*
*/
#ifndef _BLE_MESH_EXAMPLE_INIT_H_
#define _BLE_MESH_EXAMPLE_INIT_H_
#ifdef __cplusplus
extern "C" {
#endif /**< __cplusplus */
#include "esp_err.h"
void ble_mesh_get_dev_uuid(uint8_t *dev_uuid);
esp_err_t bluetooth_init(void);
#ifdef __cplusplus
}
#endif /**< __cplusplus */
#endif /* _BLE_MESH_EXAMPLE_INI... | 4,042 |
/*
*/
#ifndef _BLE_MESH_EXAMPLE_NVS_H_
#define _BLE_MESH_EXAMPLE_NVS_H_
#ifdef __cplusplus
extern "C" {
#endif /**
#include "esp_err.h"
#include "nvs_flash.h"
esp_err_t ble_mesh_nvs_open(nvs_handle_t *handle);
esp_err_t ble_mesh_nvs_store(nvs_handle_t handle, const char *key, const void *data, size_t length);
esp... | 4,043 |
/*
*/
#ifndef _IOT_BUTTON_H_
#define _IOT_BUTTON_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "driver/gpio.h"
#include "freertos/FreeRTOS.h"
typedef void (* button_cb)(void*);
typedef void* button_handle_t;
typedef enum {
BUTTON_ACTIVE_HIGH = 1, /*!add_cb(BUTTON_CB_PUSH, button_tap_cb, (void*) push, ... | 4,044 |
/* board.h - Board-specific hooks */
/*
*/
#ifndef _BOARD_H_
#define _BOARD_H_
#ifdef __cplusplus
extern "C" {
#endif /**< __cplusplus */
void board_init(void);
#ifdef __cplusplus
}
#endif /**< __cplusplus */
#endif /* _BOARD_H_ */
| 4,045 |
/* board.h - Board-specific hooks */
/*
*/
#ifndef _BOARD_H_
#define _BOARD_H_
#ifdef __cplusplus
extern "C" {
#endif /**< __cplusplus */
#include "driver/gpio.h"
#if defined(CONFIG_BLE_MESH_ESP_WROOM_32)
#define LED_R GPIO_NUM_25
#define LED_G GPIO_NUM_26
#define LED_B GPIO_NUM_27
#elif defined(CONFIG_BLE_MESH_E... | 4,046 |
/*
*/
#ifndef __ESP_HIDD_API_H__
#define __ESP_HIDD_API_H__
#include "esp_bt_defs.h"
#include "esp_gatt_defs.h"
#include "esp_err.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
ESP_HIDD_EVENT_REG_FINISH = 0,
ESP_BAT_EVENT_REG,
ESP_HIDD_EVENT_DEINIT_FINISH,
ESP_HIDD_EVENT_BLE_CONNECT,
... | 4,047 |
< Initial status */
esp_gatt_if_t gatts_if;
} init_finish; /*!< HID callback param of ESP_HIDD_EVENT_INIT_FINISH */
/**
*/
struct hidd_deinit_finish_evt_param {
esp_hidd_deinit_state_t state; /*!< De-initial status */
} deinit_finish; /*!< HID callback param of E... | 4,047 |
< HID report index */
uint16_t length; /*!< data length */
uint8_t *data; /*!< The pointer to the data */
} vendor_write; /*!< HID callback param of ESP_HIDD_EVENT_BLE_VENDOR_REPORT_WRITE_EVT */
/**
*/
struct hidd_led_writ... | 4,047 |
/*
*/
#ifndef HID_DEV_H__
#define HID_DEV_H__
#include "hidd_le_prf_int.h"
#ifdef __cplusplus
extern "C" {
#endif
/* HID Report type */
#define HID_TYPE_INPUT 1
#define HID_TYPE_OUTPUT 2
#define HID_TYPE_FEATURE 3
// HID Keyboard/Keypad Usage IDs (subset of the codes available in the USB HID Usag... | 4,048 |
#define HID_KEY_2 31 // Keyboard 2 and @
#define HID_KEY_3 32 // Keyboard 3 and #
#define HID_KEY_4 33 // Keyboard 4 and %
#define HID_KEY_5 34 // Keyboard 5 and %
#define HID_KEY_6 35 // Keyboard 6 and ^
#define HID_KEY_7 36 // ... | 4,048 |
#define HID_KEY_CAPS_LOCK 57 // Keyboard Caps Lock
#define HID_KEY_F1 58 // Keyboard F1
#define HID_KEY_F2 59 // Keyboard F2
#define HID_KEY_F3 60 // Keyboard F3
#define HID_KEY_F4 61 // Keyboard F4
#define HID_KEY_F5 62 // Keyboard F5
#defin... | 4,048 |
and Delete
#define HID_KEY_MUTE 127 // Keyboard Mute
#define HID_KEY_VOLUME_UP 128 // Keyboard Volume up
#define HID_KEY_VOLUME_DOWN 129 // Keyboard Volume down
#define HID_KEY_LEFT_CTRL 224 // Keyboard LeftContorl
#define HID_KEY_LEFT_SHIFT 225 // Keyboard LeftShift
#define HID_KEY_LEF... | 4,048 |
/*
*/
#ifndef __HID_DEVICE_LE_PRF__
#define __HID_DEVICE_LE_PRF__
#include
#include "esp_gatts_api.h"
#include "esp_gatt_defs.h"
#include "esp_hidd_prf_api.h"
#include "esp_gap_ble_api.h"
#include "hid_dev.h"
#define SUPPORT_REPORT_VENDOR false
//HID BLE profile log tag
#define HID_LE_PRF_TAG ... | 4,049 |
that can be added in the DB for one HIDS - Up to 11
#define HIDD_LE_NB_REPORT_INST_MAX (5)
/// Maximal length of Report Char. Value
#define HIDD_LE_REPORT_MAX_LEN (255)
/// Maximal length of Report Map Char. Value
#define HIDD_LE_REPORT_MAP_MAX_LEN (512)
/// Length of Boot Report... | 4,049 |
Configuration Flag Values
enum {
HIDD_LE_CFG_REPORT_IN = 0x01,
HIDD_LE_CFG_REPORT_OUT = 0x02,
//HOGPD_CFG_REPORT_FEAT can be used as a mask to check Report type
HIDD_LE_CFG_REPORT_FEAT = 0x03,
HIDD_LE_CFG_REPORT_WR = 0x10,
};
/// Pointer to the connection clean-up function
#define HID... | 4,049 |
/*
*/
#include
#include
#include
/*
*/
#define HRPS_HT_MEAS_MAX_LEN (13)
#define HRPS_MANDATORY_MASK (0x0F)
#define HRPS_BODY_SENSOR_LOC_MASK (0x30)
#define HRPS_HR_CTNL_PT_MASK (0xC0)
///Attributes State Machine
enum
{
HRS_IDX_SVC,
HRS_IDX_HR_MEAS_CHAR,
... | 4,050 |
/*
*/
#include
#include
#include
/* Attributes State Machine */
enum
{
IDX_SVC,
IDX_CHAR_A,
IDX_CHAR_VAL_A,
IDX_CHAR_CFG_A,
IDX_CHAR_B,
IDX_CHAR_VAL_B,
IDX_CHAR_CFG_B,
IDX_CHAR_C,
IDX_CHAR_VAL_C,
IDX_CHAR_CFG_C,
IDX_CHAR_CFG_C_2,
HRS_IDX_NB,
};
| 4,051 |
/*
*/
#ifndef __ESP_EDDYSTONE_API_H__
#define __ESP_EDDYSTONE_API_H__
typedef struct {
struct {
uint8_t flags; /*<! AD flags data */
uint16_t srv_uuid; /*<! complete list of 16-bit service uuid*/
uint16_t srv_data_type; /*<! service data type */
uint8_t fram... | 4,052 |
beacon temperature in degrees Celsius */
uint32_t adv_count; /*<! adv pdu count since power-up */
uint32_t time; /*<! time since power-up, a 0.1 second resolution counter */
} tlm;
} inform;
} esp_eddystone_result_t;
/* utils */
static inline uint16_t little_... | 4,052 |
/*
*/
#ifndef __ESP_EDDYSTONE_PROTOCOL_H__
#define __ESP_EDDYSTONE_PROTOCOL_H__
#include "stdbool.h"
#include "stdint.h"
/* Eddystone definitions */
#define EDDYSTONE_SERVICE_UUID 0xFEAA
#define EDDYSTONE_FRAME_TYPE_UID 0x00
#define EDDYSTONE_FRAME_TYPE_URL 0x10
#define EDDYSTONE_FRAME_TYPE_... | 4,053 |
/*
*/
#include
#include
#include
/*
*/
//#define SUPPORT_HEARTBEAT
//#define SPP_DEBUG_MODE
#define spp_sprintf(s,...) sprintf((char*)(s), ##__VA_ARGS__)
#define SPP_DATA_MAX_LEN (512)
#define SPP_CMD_MAX_LEN (20)
#define SPP_STATUS_MAX_LEN (20)
#define SPP_DATA_BUFF_MAX_... | 4,054 |
/*
*/
/
#include
#include
#include
#include
#include "esp_gap_ble_api.h"
#include "esp_gattc_api.h"
#define IBEACON_SENDER 0
#define IBEACON_RECEIVER 1
#define IBEACON_MODE CONFIG_IBEACON_MODE
/* Major and Minor part are stored in big endian mode in iBeacon packet,
#define ENDIAN_CHANGE_U16(x) ((((x)... | 4,055 |
/*
*/
#include
#include
#include
//EventID values
typedef enum {
EventIDNotificationAdded = 0,
EventIDNotificationModified = 1,
EventIDNotificationRemoved = 2,
//Reserved EventID values = 3–255
} esp_EventID;
//EventFlags
typedef enum {
EventFlagSilent = (1 << 0),
EventFlag... | 4,056 |
The format of the NotificationAttributeIDDate constant is a string that uses the Unicode Technical
Standard (UTS) #35 date format pattern yyyyMMdd'T'HHmmSS. The format of all the other constants in Table 3-5 are UTF-8
strings.
*/
//ActionID values
typedef enum {
ActionIDPositive = 0,
ActionIDNegative = 1,
//... | 4,056 |
attr_title_index,
attr_subtitle_index,
attr_message_index,
attr_messagesize_index,
attr_date_index,
attr_positiveactionlabel_index,
attr_negativeactionlabel_index,
} esp_attr_index;
#define ESP_NOTIFICATIONUID_LEN 4
char *EventID_to_String(uint8_t EventID);
char *CategoryID_to_String(uint8_t ... | 4,056 |
/*
*/
#include
#include
#include
/* Attributes State Machine */
enum
{
IDX_SVC,
IDX_CHAR_A,
IDX_CHAR_VAL_A,
IDX_CHAR_CFG_A,
IDX_CHAR_B,
IDX_CHAR_VAL_B,
IDX_CHAR_C,
IDX_CHAR_VAL_C,
HRS_IDX_NB,
};
| 4,057 |
/*
*/
#ifndef __BT_APP_CORE_H__
#define __BT_APP_CORE_H__
#include
#include
#include
/* log tag */
#define BT_APP_CORE_TAG "BT_APP_CORE"
/* signal for `bt_app_work_dispatch` */
#define BT_APP_SIG_WORK_DISPATCH (0x01)
/**
*/
typedef void (* bt_app_cb_t) (uint16_t event, void *param);
/* message to be se... | 4,058 |
/*
*/
#ifndef __BT_APP_AV_H__
#define __BT_APP_AV_H__
#include
#include "esp_a2dp_api.h"
#include "esp_avrc_api.h"
/* log tags */
#define BT_AV_TAG "BT_AV"
#define BT_RC_TG_TAG "RC_TG"
#define BT_RC_CT_TAG "RC_CT"
/**
*/
void bt_app_a2d_cb(esp_a2d_cb_event_t event, esp_a2d_cb_param_t *param);
/**
*... | 4,059 |
/*
*/
#include
#include
#include
/* Attributes State Machine */
enum
{
IDX_SVC,
IDX_CHAR_A,
IDX_CHAR_VAL_A,
IDX_CHAR_CFG_A,
IDX_CHAR_B,
IDX_CHAR_VAL_B,
IDX_CHAR_C,
IDX_CHAR_VAL_C,
HRS_IDX_NB,
};
| 4,060 |
/*
*/
#ifndef __APP_HF_MSG_SET_H__
#define __APP_HF_MSG_SET_H__
#define HF_MSG_ARGS_MAX (8)
typedef int (* hf_cmd_handler)(int argn, char **argv);
typedef struct {
const char *str;
hf_cmd_handler handler;
} hf_msg_hdl_t;
void register_hfp_ag(void);
#endif /* __APP_HF_MSG_SET_H__*/
| 4,061 |
/*
*/
#ifndef __GPIO_PCM_CONFIG_H__
#define __GPIO_PCM_CONFIG_H__
#define ACOUSTIC_ECHO_CANCELLATION_ENABLE 1
void app_gpio_pcm_io_cfg(void);
#if ACOUSTIC_ECHO_CANCELLATION_ENABLE
void app_gpio_aec_io_cfg(void);
#endif /* ACOUSTIC_ECHO_CANCELLATION_ENABLE */
#endif /* #define __GPIO_PCM_CONFIG_H__ */
| 4,062 |
/*
*/
#ifndef __BT_APP_CORE_H__
#define __BT_APP_CORE_H__
#include
#include
#include
#define BT_APP_CORE_TAG "BT_APP_CORE"
#define BT_APP_SIG_WORK_DISPATCH (0x01)
/**
*/
typedef void (* bt_app_cb_t) (uint16_t event, void *param);
/* message to be sent */
typedef struct {
uint16... | 4,063 |
/*
*/
#ifndef __BT_APP_HF_H__
#define __BT_APP_HF_H__
#include
#include "esp_hf_ag_api.h"
#include "esp_bt_defs.h"
extern esp_bd_addr_t hf_peer_addr; // Declaration of peer device bdaddr
#define BT_HF_TAG "BT_APP_HF"
/**
*/
void bt_app_hf_cb(esp_hf_cb_event_t event, esp_hf_cb_param_t *param);
#end... | 4,064 |
/*
*/
#ifndef __APP_HF_MSG_SET_H__
#define __APP_HF_MSG_SET_H__
#define HF_MSG_ARGS_MAX (5)
typedef int (* hf_cmd_handler)(int argn, char **argv);
typedef struct {
const char *str;
hf_cmd_handler handler;
} hf_msg_hdl_t;
void register_hfp_hf(void);
#endif /* __APP_HF_MSG_SET_H__*/
| 4,065 |
/*
*/
#ifndef __GPIO_PCM_CONFIG_H__
#define __GPIO_PCM_CONFIG_H__
#define ACOUSTIC_ECHO_CANCELLATION_ENABLE 1
void app_gpio_pcm_io_cfg(void);
#if ACOUSTIC_ECHO_CANCELLATION_ENABLE
void app_gpio_aec_io_cfg(void);
#endif /* ACOUSTIC_ECHO_CANCELLATION_ENABLE */
#endif /* #define __GPIO_PCM_CONFIG_H__ */
| 4,066 |
/*
*/
#ifndef __BT_APP_CORE_H__
#define __BT_APP_CORE_H__
#include
#include
#include
#define BT_APP_CORE_TAG "BT_APP_CORE"
#define BT_APP_SIG_WORK_DISPATCH (0x01)
/**
*/
typedef void (* bt_app_cb_t) (uint16_t event, void *param);
/* message to be sent */
typedef struct {
uint16... | 4,067 |
/*
*/
#ifndef __BT_APP_HF_H__
#define __BT_APP_HF_H__
#include
#include "esp_hf_client_api.h"
#define BT_HF_TAG "BT_HF"
/**
*/
void bt_app_hf_client_cb(esp_hf_client_cb_event_t event, esp_hf_client_cb_param_t *param);
#endif /* __BT_APP_HF_H__*/
| 4,068 |
/*
*/
#ifndef __SPP_TASK_H__
#define __SPP_TASK_H__
#include
#include
#include
#define SPP_TASK_TAG "SPP_TASK"
#define SPP_TASK_SIG_WORK_DISPATCH (0x01)
/**
*/
typedef void (* spp_task_cb_t) (uint16_t event, void *param);
/* message to be sent */
typedef struct {
uint16_t ... | 4,069 |
/*
*/
#ifndef __BT_APP_CORE_H__
#define __BT_APP_CORE_H__
#include
#include
#include
/* log tag */
#define BT_APP_CORE_TAG "BT_APP_CORE"
/* signal for `bt_app_work_dispatch` */
#define BT_APP_SIG_WORK_DISPATCH (0x01)
/**
*/
typedef void (* bt_app_cb_t) (uint16_t event, void *param);
/**
*/
typedef voi... | 4,070 |
/*
*/
#ifndef __BT_APP_CORE_H__
#define __BT_APP_CORE_H__
#include
#include
#include
/* log tag */
#define BT_APP_CORE_TAG "BT_APP_CORE"
/* signal for `bt_app_work_dispatch` */
#define BT_APP_SIG_WORK_DISPATCH (0x01)
/**
*/
typedef void (* bt_app_cb_t) (uint16_t event, void *param);
/* message to be se... | 4,071 |
/*
*/
#ifndef __BT_APP_AV_H__
#define __BT_APP_AV_H__
#include
#include "esp_a2dp_api.h"
#include "esp_avrc_api.h"
/* log tags */
#define BT_AV_TAG "BT_AV"
#define BT_RC_TG_TAG "RC_TG"
#define BT_RC_CT_TAG "RC_CT"
/**
*/
void bt_app_a2d_cb(esp_a2d_cb_event_t event, esp_a2d_cb_param_t *param);
/**
*... | 4,072 |
/*
*/
#ifndef __SPP_TASK_H__
#define __SPP_TASK_H__
#include
#include
#include
#define SPP_TASK_TAG "SPP_TASK"
#define SPP_TASK_SIG_WORK_DISPATCH (0x01)
/**
*/
typedef void (* spp_task_cb_t) (uint16_t event, void *param);
/* message to be sent */
typedef struct {
uint16_t ... | 4,073 |
/*
*/
#ifndef __APP_SPP_MSG_PRS_H__
#define __APP_SPP_MSG_PRS_H__
typedef enum {
SPP_MSG_PRS_ERR_OK = 0, // a complete message is finished
SPP_MSG_PRS_ERR_IN_PROGRESS, // message parsing is in progress
SPP_MSG_PRS_ERR_HDR_UNDETECTED, // header not detected
SPP_MSG_PRS_ERR_HDR_SYNC_FAILE... | 4,074 |
/*
*/
#ifndef __APP_SPP_MSG_SET_H__
#define __APP_SPP_MSG_SET_H__
#define SPP_MSG_ARGS_MAX (5)
typedef void (* spp_cmd_handler)(int argn, char **argv);
typedef struct {
uint16_t opcode;
const char *str;
spp_cmd_handler handler;
} spp_msg_hdl_t;
extern spp_msg_hdl_t *spp_get_cmd_tbl(void);
... | 4,075 |
/*
*/
#ifndef __CONSOLE_UART_H__
#define __CONSOLE_UART_H__
#define TAG_CNSL "CNSL"
/**
*/
esp_err_t console_uart_init(void);
#endif /* __CONSOLE_UART_H__ */
| 4,076 |
/*
*/
#ifndef __BT_APP_CORE_H__
#define __BT_APP_CORE_H__
#include
#include
#include
/* log tag */
#define BT_APP_CORE_TAG "BT_APP_CORE"
/* signal for dispatcher */
#define BT_APP_SIG_WORK_DISPATCH (0x01)
/**
*/
typedef void (* bt_app_cb_t) (uint16_t event, void *param);
/* message to be sent ... | 4,077 |
/*
*/
#ifndef __BT_APP_CORE_H__
#define __BT_APP_CORE_H__
#include
#include
#include
/* log tag */
#define BT_APP_CORE_TAG "BT_APP_CORE"
/* signal for `bt_app_work_dispatch` */
#define BT_APP_SIG_WORK_DISPATCH (0x01)
/**
*/
typedef void (* bt_app_cb_t) (uint16_t event, void *param);
/**
*/
typedef voi... | 4,078 |
/*
*/
#ifndef __UART_DRIVER_H__
#define __UART_DRIVER_H__
#include
#include
#include "esp_bluedroid_hci.h"
/**
*/
void hci_uart_open(void);
/**
*/
void hci_uart_close(void);
/**
*/
void hci_uart_send(uint8_t *data, uint16_t len);
/**
*/
bool hci_check_send_available(void);
/**
*/
esp_err_t hci_register_h... | 4,079 |
/*
*/
#ifndef H_BLEPRPH_
#define H_BLEPRPH_
#include
#include "nimble/ble.h"
#include "modlog/modlog.h"
#include "esp_peripheral.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_cfg;
struct ble_gatt_register_ctxt;
/** GATT server. */
#define GATT_SVR_SVC_ALERT_UUID 0x1811
#define GATT_SVR_CHR... | 4,080 |
/*
*/
#ifndef H_BLE_CTS_CENT_
#define H_BLE_CTS_CENT_
#include "modlog/modlog.h"
#include "esp_central.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_adv_fields;
struct ble_gap_conn_desc;
struct ble_hs_cfg;
union ble_store_value;
union ble_store_key;
/* 16 BIT CCCD UUID */
#define BLE_SVC_CTS_DSC_CLT_CFG_... | 4,081 |
/*
*/
#ifndef H_BLE_CTS_PRPH_
#define H_BLE_CTS_PRPH_
#include "nimble/ble.h"
#include "modlog/modlog.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_cfg;
struct ble_gatt_register_ctxt;
void gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *arg);
int gatt_svr_init(void);
#ifdef __cplusplus
... | 4,082 |
/*
*/
#ifndef H_PHY_PRPH_
#define H_PHY_PRPH_
#include
#include "nimble/ble.h"
#include "modlog/modlog.h"
#include "esp_peripheral.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_cfg;
struct ble_gatt_register_ctxt;
/** Making sure client connects to server having LE PHY UUID */
#define LE_PHY_UUID16 ... | 4,083 |
/*
*/
#ifndef H_PHY_CENT_
#define H_PHY_CENT_
#include "modlog/modlog.h"
#include "esp_central.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_adv_fields;
struct ble_gap_conn_desc;
struct ble_hs_cfg;
union ble_store_value;
union ble_store_key;
#define LE_PHY_UUID16 0xABF2
#define LE_PHY_CHR_U... | 4,084 |
// Copyright 2015-2020 The Apache Software Foundation
// Modifications Copyright 2017-2020 Espressif Systems (Shanghai) CO., LTD.
//
// Portions of this software were developed at Runtime Inc, copyright 2015.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in co... | 4,085 |
/*
*/
#ifndef H_BLESPPSERVER_
#define H_BLESPPSERVER_
#include
#include "nimble/ble.h"
#include "modlog/modlog.h"
#include "esp_peripheral.h"
#ifdef __cplusplus
extern "C" {
#endif
/* 16 Bit SPP Service UUID */
#define BLE_SVC_SPP_UUID16 0xABF0
/* 16 Bit SPP Service Characteristic... | 4,086 |
/*
*/
#ifndef H_BLESPPCLIENT_
#define H_BLESPPCLIENT_
#include "modlog/modlog.h"
#include "esp_central.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_adv_fields;
struct ble_gap_conn_desc;
struct ble_hs_cfg;
union ble_store_value;
union ble_store_key;
/* 16 Bit SPP Service UUID */
#define GATT_SPP_SVC_UUID... | 4,087 |
/*
*/
#ifndef H_ENC_ADV_DATA_PRPH_
#define H_ENC_ADV_DATA_PRPH_
#if CONFIG_EXAMPLE_ENC_ADV_DATA
#include
#include "nimble/ble.h"
#include "modlog/modlog.h"
#include "esp_peripheral.h"
#include "host/ble_ead.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_cfg;
struct ble_gatt_register_ctxt;
void gatt_svr_... | 4,088 |
/*
*/
#ifndef H_ENC_ADV_DATA_CENT_
#define H_ENC_ADV_DATA_CENT_
#if CONFIG_EXAMPLE_ENC_ADV_DATA
#include "modlog/modlog.h"
#include "esp_central.h"
#include "host/ble_ead.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_adv_fields;
struct ble_gap_conn_desc;
struct ble_hs_cfg;
union ble_store_value;
union bl... | 4,089 |
/*
*/
#ifndef H_COC_BLEPRPH_
#define H_COC_BLEPRPH_
#include
#include "nimble/ble.h"
#include "modlog/modlog.h"
#include "esp_peripheral.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_cfg;
struct ble_gatt_register_ctxt;
/** Making sure client connects to server having L2CAP COC UUID */
#define L2CAP_COC_... | 4,090 |
/*
*/
#ifndef H_COC_BLECENT_
#define H_COC_BLECENT_
#include "modlog/modlog.h"
#include "esp_central.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_adv_fields;
struct ble_gap_conn_desc;
struct ble_hs_cfg;
union ble_store_value;
union ble_store_key;
#ifdef __cplusplus
}
#endif
#endif
| 4,091 |
/*
*/
#ifndef H_BLEPRPH_
#define H_BLEPRPH_
#include
#include "nimble/ble.h"
#include "modlog/modlog.h"
#include "esp_peripheral.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_cfg;
struct ble_gatt_register_ctxt;
/** GATT server. */
#define GATT_SVR_SVC_ALERT_UUID 0x1811
#define GATT_SVR_CHR... | 4,092 |
/*
*/
#ifndef H_BLE_HTP_PRPH_
#define H_BLE_HTP_PRPH_
#include "nimble/ble.h"
#include "modlog/modlog.h"
#include "services/htp/ble_svc_htp.h"
#ifdef __cplusplus
extern "C" {
#endif
/* 16 Bit Device Information Service Characteristic UUIDs */
#define GATT_DIS_DEVICE_INFO_UUID 0x180A
#define... | 4,093 |
/*
*/
#ifndef H_BLE_HTP_CENT_
#define H_BLE_HTP_CENT_
#include "modlog/modlog.h"
#include "esp_central.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_adv_fields;
struct ble_gap_conn_desc;
struct ble_hs_cfg;
union ble_store_value;
union ble_store_key;
/* 16 Bit Health Thermometer Service UUID */
#define BL... | 4,094 |
/*
*/
#ifndef H_BLEPRPH_
#define H_BLEPRPH_
#include
#include "nimble/ble.h"
#include "modlog/modlog.h"
#include "esp_peripheral.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_cfg;
struct ble_gatt_register_ctxt;
/** GATT server. */
#define GATT_SVR_SVC_ALERT_UUID 0x1811
#define GATT_SVR_CHR_... | 4,095 |
/*
*/
#ifndef __UART_DRIVER_H__
#define __UART_DRIVER_H__
#include
#include
/**
*/
void hci_uart_open(void);
/**
*/
void hci_uart_close(void);
/**
*/
void hci_uart_send(uint8_t *data, uint16_t len);
#endif /* __UART_DRIVER_H__ */
| 4,096 |
/*
*/
#ifndef H_BLECENT_
#define H_BLECENT_
#include "modlog/modlog.h"
#include "esp_central.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_adv_fields;
struct ble_gap_conn_desc;
struct ble_hs_cfg;
union ble_store_value;
union ble_store_key;
#define BLECENT_SVC_ALERT_UUID 0x1811
#define BLECEN... | 4,097 |
/*
*/
#ifndef H_BLE_PERIODIC_ADV_
#define H_BLE_PERIODIC_ADV_
#include
#include "nimble/ble.h"
#include "modlog/modlog.h"
#include "esp_peripheral.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_cfg;
struct ble_gatt_register_ctxt;
#ifdef __cplusplus
}
#endif
#endif
| 4,099 |
/*
*/
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
// Register system functions
void register_system(void);
#ifdef __cplusplus
}
#endif
| 4,100 |
/*
*/
#ifndef H_BLECENT_
#define H_BLECENT_
#pragma once
#include "modlog/modlog.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_adv_fields;
struct ble_gap_conn_desc;
struct ble_hs_cfg;
union ble_store_value;
union ble_store_key;
#define BLECENT_SVC_ALERT_UUID 0x1811
#define BLECENT_CHR_SUP_N... | 4,101 |
*/
struct peer_svc_list svcs;
/** Keeps track of where we are in the service discovery process. */
uint16_t disc_prev_chr_val;
struct peer_svc *cur_svc;
/** Callback that gets executed when service discovery completes. */
peer_disc_fn *disc_cb;
void *disc_cb_arg;
};
int peer_disc_all(uin... | 4,101 |
/*
*/
#ifndef H_GATTS_SENS_
#define H_GATTS_SENS_
#include "nimble/ble.h"
#include "modlog/modlog.h"
#ifdef __cplusplus
extern "C" {
#endif
extern uint16_t notify_handle;
struct ble_hs_cfg;
struct ble_gatt_register_ctxt;
void gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *arg);
int gatt_svr_init... | 4,102 |
/*
*/
#ifndef H_ESP_CENTRAL_
#define H_ESP_CENTRAL_
#include "modlog/modlog.h"
#ifdef __cplusplus
extern "C" {
#endif
#define PEER_ADDR_VAL_SIZE 6
/** Misc. */
void print_bytes(const uint8_t *bytes, int len);
void print_mbuf(const struct os_mbuf *om);
void print_mbuf_data(const str... | 4,103 |
*/
struct peer_svc_list svcs;
/** Keeps track of where we are in the service discovery process. */
uint16_t disc_prev_chr_val;
struct peer_svc *cur_svc;
/** Callback that gets executed when service discovery completes. */
peer_disc_fn *disc_cb;
void *disc_cb_arg;
};
void peer_traverse_al... | 4,103 |
/*
*/
#ifndef H_ESP_PERIPHERAL_
#define H_ESP_PERIPHERAL_
#include
#include "nimble/ble.h"
#include "modlog/modlog.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Console */
int scli_init(void);
int scli_receive_key(int *key);
/** Misc. */
void print_bytes(const uint8_t *bytes, int len);
void print_addr(const void *... | 4,104 |
/*
*/
#ifndef H_BLE_DYNAMIC_SERVICE_
#define H_BLE_DYNAMIC_SERVICE_
#include
#include "nimble/ble.h"
#include "modlog/modlog.h"
#include "esp_peripheral.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_cfg;
struct ble_gatt_register_ctxt;
/** GATT server. */
#define GATT_SVR_SVC_ALERT_UUID 0x1... | 4,105 |
/*
*/
#ifndef H_BLEHR_SENSOR_
#define H_BLEHR_SENSOR_
#include "nimble/ble.h"
#include "modlog/modlog.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Heart-rate configuration */
#define GATT_HRS_UUID 0x180D
#define GATT_HRS_MEASUREMENT_UUID 0x2A37
#define GATT_HRS_BODY_SENSOR_L... | 4,106 |
/*
*/
#ifndef H_BLE_PROX_PRPH_
#define H_BLE_PROX_PRPH_
#include "nimble/ble.h"
#include "modlog/modlog.h"
#include "services/prox/ble_svc_prox.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_cfg;
struct ble_gatt_register_ctxt;
#ifdef __cplusplus
}
#endif
#endif
| 4,107 |
/*
*/
#ifndef H_BLE_PROX_CENT_
#define H_BLE_PROX_CENT_
#include "modlog/modlog.h"
#include "esp_central.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_adv_fields;
struct ble_gap_conn_desc;
struct ble_hs_cfg;
union ble_store_value;
union ble_store_key;
/* 16 Bit Proximity Sensor Service UUID */
#define BL... | 4,108 |
/*
*/
#ifndef H_BLECENT_
#define H_BLECENT_
#include "esp_central.h"
#ifdef __cplusplus
extern "C" {
#endif
int gatt_svr_init(void);
#ifdef __cplusplus
}
#endif
#endif
| 4,109 |
/*
*/
#ifndef H_BLEPRPH_
#define H_BLEPRPH_
#include
#include "nimble/ble.h"
#include "modlog/modlog.h"
#include "esp_peripheral.h"
#ifdef __cplusplus
extern "C" {
#endif
void gatt_svr_register_cb(struct ble_gatt_register_ctxt *ctxt, void *arg);
int gatt_svr_init(void);
#ifdef __cplusplus
}
#endif
#endif
| 4,110 |
/*
*/
#ifndef H_BLE_MULTI_ADV_
#define H_BLE_MULTI_ADV_
#include
#include "nimble/ble.h"
#include "modlog/modlog.h"
#include "esp_peripheral.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_cfg;
struct ble_gatt_register_ctxt;
typedef int ble_instance_cb_fn(uint16_t instance);
struct ble_instance_cb_regist... | 4,111 |
/*
*/
#ifndef H_BLE_PERIODIC_SYNC_
#define H_BLE_PERIODIC_SYNC_
#include "modlog/modlog.h"
#include "esp_central.h"
#ifdef __cplusplus
extern "C" {
#endif
struct ble_hs_adv_fields;
struct ble_gap_conn_desc;
struct ble_hs_cfg;
union ble_store_value;
union ble_store_key;
#ifdef __cplusplus
}
#endif
#endif
| 4,112 |
/*
*/
#include "esp_zigbee_core.h"
#define ESP_ZB_DEFAULT_RADIO_CONFIG() \
{ \
.radio_mode = RADIO_MODE_NATIVE, \
}
#define ESP_ZB_DEFAULT_HOST_CONFIG() \
{ ... | 4,113 |
rx_flow_ctrl_thresh = 0, \
.source_clk = UART_SCLK_DEFAULT, \
}, \
.rx_pin = UART_PIN_NO_CHANGE, \
.tx_pin = UART_PIN_NO_CHANGE, \
}, ... | 4,113 |
/*
*/
#pragma once
#include
#ifdef __cplusplus
extern "C" {
#endif
/* light intensity level */
#define LIGHT_DEFAULT_ON 1
#define LIGHT_DEFAULT_OFF 0
/* LED strip configuration */
#define CONFIG_EXAMPLE_STRIP_LED_GPIO 8
#define CONFIG_EXAMPLE_STRIP_LED_NUMBER 1
/**
*/
void light_driver_set_power(bool power);... | 4,114 |
/*
*/
#include "esp_zigbee_core.h"
#include "light_driver.h"
/* Zigbee configuration */
#define INSTALLCODE_POLICY_ENABLE false /* enable the install code policy for security */
#define ED_AGING_TIMEOUT ESP_ZB_ED_AGING_TIMEOUT_64MIN
#define ED_KEEP_ALIVE 3000 /* 3000 milli... | 4,115 |
keep_alive = ED_KEEP_ALIVE, \
}, \
}
#define ESP_ZB_DEFAULT_RADIO_CONFIG() \
{ \
.radio_mode = RADIO_MODE_NATIVE, ... | 4,115 |
/*
*/
#pragma once
#include "driver/gpio.h"
#ifdef __cplusplus
extern "C" {
#endif
/* user should configure which I/O port as toggle switch input, default is GPIO9 */
#define GPIO_INPUT_IO_TOGGLE_SWITCH GPIO_NUM_9
/* config button level depends on the pull up/down setting
push button level is on level = 1 when... | 4,116 |
/*
*/
#include "esp_zigbee_core.h"
#include "switch_driver.h"
/* Zigbee configuration */
#define MAX_CHILDREN 10 /* the max amount of connected devices */
#define INSTALLCODE_POLICY_ENABLE false /* enable the install code policy for security */
#define HA_ONOFF_SWITCH_ENDPOINT ... | 4,117 |
radio_mode = RADIO_MODE_NATIVE, \
}
#define ESP_ZB_DEFAULT_HOST_CONFIG() \
{ \
.host_connection_mode = HOST_CONNECTION_MODE_NONE, \
}
| 4,117 |
/*
*/
#include "esp_err.h"
#include "esp_zigbee_core.h"
/* Zigbee Configuration */
#define MAX_CHILDREN 10 /* the max amount of connected devices */
#define INSTALLCODE_POLICY_ENABLE false /* enable the install code policy for security */
#define ESP_ZB_PRIMARY_CHANNEL_MASK ... | 4,118 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.