XFusion API v1.3.0
载入中...
搜索中...
未找到
xf_ble_types.h 文件参考
#include "xf_utils.h"
xf_ble_types.h 的引用(Include)关系图:

浏览源代码.

结构体

struct  xf_ble_addr_t
 BLE 地址信息 更多...
 
struct  _xf_ble_uuid_info_t
 BLE UUID 信息 (多种长度类型通用) 更多...
 
struct  _xf_ble_uuid16_info_t
 BLE 16-bit UUID 信息 更多...
 
struct  _xf_ble_uuid32_info_t
 BLE 32-bit UUID 信息 更多...
 
struct  _xf_ble_uuid128_info_t
 BLE 128-bit UUID 信息 更多...
 
union  _xf_ble_var_uintptr_t
 BLE 中类型可变的数据 更多...
 

宏定义

#define XF_BLE_IS_ENABLE   1
 
#define XF_BLE_ADDR_LEN   6
 BLE 地址长度
 
#define XF_BLE_ADDR_PRINT_FMT   "%02X:%02X:%02X:%02X:%02X:%02X"
 BLE 地址打印格式
 
#define XF_BLE_ADDR_EXPAND_TO_ARG(addr)   (addr)[0],(addr)[1],(addr)[2],(addr)[3],(addr)[4],(addr)[5]
 BLE 地址展开为参数
 
#define _XF_BLE_UUID16_INIT(uuid16)
 
#define _XF_BLE_UUID32_INIT(uuid32)
 
#define _XF_BLE_UUID128_INIT(uuid128 ...)
 
#define XF_BLE_DECLARE_UUID16(uuid16)    ((xf_ble_uuid_info_t *) (&(xf_ble_uuid16_info_t) _XF_BLE_UUID16_INIT(uuid16)))
 BLE 声明一个 16-bit UUID
 
#define XF_BLE_DECLARE_UUID32(uuid32)    ((xf_ble_uuid_info_t *) (&(xf_ble_uuid32_info_t) _XF_BLE_UUID32_INIT(uuid32)))
 BLE 声明一个 32-bit UUID
 
#define XF_BLE_DECLARE_UUID128(uuid128...)    ((xf_ble_uuid_info_t *) (&(xf_ble_uuid128_info_t) _XF_BLE_UUID128_INIT(uuid128)))
 BLE 声明一个 128-bit UUID
 
#define XF_BLE_INVALID_ATTR_HANDLE   (0x0000)
 BLE 无效属性句柄
 

类型定义

typedef struct __packed _xf_ble_uuid_info_t xf_ble_uuid_info_t
 BLE UUID 信息 (多种长度类型通用)
 
typedef struct __packed _xf_ble_uuid16_info_t xf_ble_uuid16_info_t
 BLE 16-bit UUID 信息
 
typedef struct __packed _xf_ble_uuid32_info_t xf_ble_uuid32_info_t
 BLE 32-bit UUID 信息
 
typedef struct __packed _xf_ble_uuid128_info_t xf_ble_uuid128_info_t
 BLE 128-bit UUID 信息
 
typedef uint16_t xf_ble_attr_handle_t
 BLE 属性句柄
 
typedef union _xf_ble_var_uintptr_t xf_ble_var_uintptr_t
 BLE 中类型可变的数据
 

枚举

enum  xf_ble_addr_type_t { XF_BT_ADDR_TYPE_PUBLIC_DEV = 0x00 , XF_BT_ADDR_TYPE_RANDOM_DEV = 0x01 , XF_BT_ADDR_TYPE_RPA_PUBLIC = 0x02 , XF_BT_ADDR_TYPE_RPA_RANDOM = 0x03 }
 蓝牙地址类型,完全遵循蓝牙标准进行定义 更多...
 
enum  xf_ble_uuid_type_t { XF_BLE_UUID_TYPE_16 = 2 , XF_BLE_UUID_TYPE_32 = 4 , XF_BLE_UUID_TYPE_128 = 16 }
 BLE UUID 类型 (长度类型) 更多...
 
enum  xf_ble_gap_event_t {
  XF_BLE_GAP_EVT_CONNECT , XF_BLE_GAP_EVT_DISCONNECT , XF_BLE_GAP_EVT_PAIR_END , XF_BLE_GAP_EVT_CONN_PARAMS_UPDATE ,
  XF_BLE_GAP_EVT_SCAN_PARAM_SET , XF_BLE_GAP_EVT_SCAN_RESULT , XF_BLE_GAP_ADV_STARTED , XF_BLE_GAP_ADV_STOPPED ,
  _XF_BLE_GAP_EVT_ENUM_END
}
 BLE GAP 事件 更多...
 
enum  xf_ble_gatts_event_t {
  XF_BLE_GATTS_EVT_ADD_SERVICE = _XF_BLE_GAP_EVT_ENUM_END , XF_BLE_GATTS_EVT_DEL_SERVICE , XF_BLE_GATTS_EVT_ADD_CHARA , XF_BLE_GATTS_EVT_ADD_DESC ,
  XF_BLE_GATTS_EVT_SERVICE_START , XF_BLE_GATTS_EVT_SERVICE_STOP , XF_BLE_GATTS_EVT_REQ_READ , XF_BLE_GATTS_EVT_REQ_WRITE ,
  XF_BLE_GATTS_EVT_MTU_CHANGED
}
 BLE GATTS 事件 更多...
 
enum  xf_ble_gattc_event_t {
  XF_BLE_GATTC_EVT_DISCOVER_SERVICE_COMPLETE = _XF_BLE_GAP_EVT_ENUM_END , XF_BLE_GATTC_EVT_MTU_CHANGED , XF_BLE_GATTC_EVT_WRITE_COMPLETE , XF_BLE_GATTC_EVT_READ_COMPLETE ,
  XF_BLE_GATTC_EVT_RECV_NOTIFICATION_OR_INDICATION
}
 BLE GATTC 事件 更多...
 

详细描述

作者
dotc (dotch.nosp@m.an@q.nosp@m.q.com)
版本
1.0
日期
2024-08-06

Copyright (c) 2024, CorAL. All rights reserved.

在文件 xf_ble_types.h 中定义.