| 
    XFusion API v1.3.0
    
   | 
 
Generic Attribute Profile 更多...

结构体 | |
| union | _xf_ble_gap_adv_struct_data_t | 
| BLE GAP 广播数据单元的数据 ( AD Data )  更多... | |
| struct | xf_ble_gap_adv_struct_t | 
| BLE GAP 广播数据单元 ( AD structure )  更多... | |
| struct | xf_ble_gap_adv_data_t | 
| BLE GAP 广播数据 ( 包含响应数据 )  更多... | |
| struct | xf_ble_gap_adv_param_t | 
| BLE GAP 广播参数  更多... | |
| struct | xf_ble_gap_scan_param_t | 
| BLE GAP 扫描参数  更多... | |
| struct | xf_ble_gap_conn_param_update_t | 
| BLE GAP 连接参数更新数据结构  更多... | |
类型定义 | |
| typedef uint16_t | xf_ble_appearance_t | 
| BLE 外观值,完全遵循蓝牙标准进行定义   | |
| typedef union _xf_ble_gap_adv_struct_data_t | xf_ble_gap_adv_struct_data_t | 
| BLE GAP 广播数据单元的数据 ( AD Data )   | |
Generic Attribute Profile
| #define XF_BLE_APPEARANCE_UNKNOWN 0x0000 | 
在文件 xf_ble_gap_types.h 第 55 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_PHONE 0x0040 | 
在文件 xf_ble_gap_types.h 第 56 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_COMPUTER 0x0080 | 
在文件 xf_ble_gap_types.h 第 57 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_WATCH 0x00C0 | 
在文件 xf_ble_gap_types.h 第 58 行定义.
| #define XF_BLE_APPEARANCE_SPORTS_WATCH 0x00C1 | 
在文件 xf_ble_gap_types.h 第 59 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_CLOCK 0x0100 | 
在文件 xf_ble_gap_types.h 第 60 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_DISPLAY 0x0140 | 
在文件 xf_ble_gap_types.h 第 61 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_REMOTE 0x0180 | 
在文件 xf_ble_gap_types.h 第 62 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_EYEGLASSES 0x01C0 | 
在文件 xf_ble_gap_types.h 第 63 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_TAG 0x0200 | 
在文件 xf_ble_gap_types.h 第 64 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_KEYRING 0x0240 | 
在文件 xf_ble_gap_types.h 第 65 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_MEDIA_PLAYER 0x0280 | 
在文件 xf_ble_gap_types.h 第 66 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_BARCODE_SCANNER 0x02C0 | 
在文件 xf_ble_gap_types.h 第 67 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_THERMOMETER 0x0300 | 
在文件 xf_ble_gap_types.h 第 68 行定义.
| #define XF_BLE_APPEARANCE_THERMOMETER_EAR 0x0301 | 
在文件 xf_ble_gap_types.h 第 69 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_HEART_RATE 0x0340 | 
在文件 xf_ble_gap_types.h 第 70 行定义.
| #define XF_BLE_APPEARANCE_HEART_RATE_BELT 0x0341 | 
在文件 xf_ble_gap_types.h 第 71 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_BLOOD_PRESSURE 0x0380 | 
在文件 xf_ble_gap_types.h 第 72 行定义.
| #define XF_BLE_APPEARANCE_BLOOD_PRESSURE_ARM 0x0381 | 
在文件 xf_ble_gap_types.h 第 73 行定义.
| #define XF_BLE_APPEARANCE_BLOOD_PRESSURE_WRIST 0x0382 | 
在文件 xf_ble_gap_types.h 第 74 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_HID 0x03C0 | 
在文件 xf_ble_gap_types.h 第 75 行定义.
| #define XF_BLE_APPEARANCE_HID_KEYBOARD 0x03C1 | 
在文件 xf_ble_gap_types.h 第 76 行定义.
| #define XF_BLE_APPEARANCE_HID_MOUSE 0x03C2 | 
在文件 xf_ble_gap_types.h 第 77 行定义.
| #define XF_BLE_APPEARANCE_HID_JOYSTICK 0x03C3 | 
在文件 xf_ble_gap_types.h 第 78 行定义.
| #define XF_BLE_APPEARANCE_HID_GAMEPAD 0x03C4 | 
在文件 xf_ble_gap_types.h 第 79 行定义.
| #define XF_BLE_APPEARANCE_HID_DIGITIZER_TABLET 0x03C5 | 
| #define XF_BLE_APPEARANCE_HID_CARD_READER 0x03C6 | 
在文件 xf_ble_gap_types.h 第 81 行定义.
| #define XF_BLE_APPEARANCE_HID_DIGITAL_PEN 0x03C7 | 
在文件 xf_ble_gap_types.h 第 82 行定义.
| #define XF_BLE_APPEARANCE_HID_BARCODE_SCANNER 0x03C8 | 
在文件 xf_ble_gap_types.h 第 83 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_GLUCOSE 0x0400 | 
在文件 xf_ble_gap_types.h 第 84 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_WALKING 0x0440 | 
在文件 xf_ble_gap_types.h 第 85 行定义.
| #define XF_BLE_APPEARANCE_WALKING_IN_SHOE 0x0441 | 
在文件 xf_ble_gap_types.h 第 86 行定义.
| #define XF_BLE_APPEARANCE_WALKING_ON_SHOE 0x0442 | 
在文件 xf_ble_gap_types.h 第 87 行定义.
| #define XF_BLE_APPEARANCE_WALKING_ON_HIP 0x0443 | 
在文件 xf_ble_gap_types.h 第 88 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_CYCLING 0x0480 | 
在文件 xf_ble_gap_types.h 第 89 行定义.
| #define XF_BLE_APPEARANCE_CYCLING_COMPUTER 0x0481 | 
在文件 xf_ble_gap_types.h 第 90 行定义.
| #define XF_BLE_APPEARANCE_CYCLING_SPEED 0x0482 | 
在文件 xf_ble_gap_types.h 第 91 行定义.
| #define XF_BLE_APPEARANCE_CYCLING_CADENCE 0x0483 | 
在文件 xf_ble_gap_types.h 第 92 行定义.
| #define XF_BLE_APPEARANCE_CYCLING_POWER 0x0484 | 
在文件 xf_ble_gap_types.h 第 93 行定义.
| #define XF_BLE_APPEARANCE_CYCLING_SPEED_CADENCE 0x0485 | 
在文件 xf_ble_gap_types.h 第 94 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_PULSE_OXIMETER 0x0C40 | 
在文件 xf_ble_gap_types.h 第 95 行定义.
| #define XF_BLE_APPEARANCE_PULSE_OXIMETER_FINGERTIP 0x0C41 | 
在文件 xf_ble_gap_types.h 第 96 行定义.
| #define XF_BLE_APPEARANCE_PULSE_OXIMETER_WRIST 0x0C42 | 
在文件 xf_ble_gap_types.h 第 97 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_WEIGHT 0x0C80 | 
在文件 xf_ble_gap_types.h 第 98 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_PERSONAL_MOBILITY_DEVICE 0x0CC0 | 
在文件 xf_ble_gap_types.h 第 99 行定义.
| #define XF_BLE_APPEARANCE_POWERED_WHEELCHAIR 0x0CC1 | 
在文件 xf_ble_gap_types.h 第 100 行定义.
| #define XF_BLE_APPEARANCE_MOBILITY_SCOOTER 0x0CC2 | 
在文件 xf_ble_gap_types.h 第 101 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_CONTINUOUS_GLUCOSE_MONITOR 0x0D00 | 
在文件 xf_ble_gap_types.h 第 102 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_INSULIN_PUMP 0x0D40 | 
在文件 xf_ble_gap_types.h 第 103 行定义.
| #define XF_BLE_APPEARANCE_INSULIN_PUMP_DURABLE_PUMP 0x0D41 | 
在文件 xf_ble_gap_types.h 第 104 行定义.
| #define XF_BLE_APPEARANCE_INSULIN_PUMP_PATCH_PUMP 0x0D44 | 
在文件 xf_ble_gap_types.h 第 105 行定义.
| #define XF_BLE_APPEARANCE_INSULIN_PEN 0x0D48 | 
在文件 xf_ble_gap_types.h 第 106 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_MEDICATION_DELIVERY 0x0D80 | 
在文件 xf_ble_gap_types.h 第 107 行定义.
| #define XF_BLE_APPEARANCE_GENERIC_OUTDOOR_SPORTS 0x1440 | 
在文件 xf_ble_gap_types.h 第 108 行定义.
| #define XF_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION 0x1441 | 
在文件 xf_ble_gap_types.h 第 109 行定义.
| #define XF_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_AND_NAV 0x1442 | 
在文件 xf_ble_gap_types.h 第 110 行定义.
| #define XF_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_POD 0x1443 | 
在文件 xf_ble_gap_types.h 第 111 行定义.
| #define XF_BLE_APPEARANCE_OUTDOOR_SPORTS_LOCATION_POD_AND_NAV 0x1444 | 
在文件 xf_ble_gap_types.h 第 112 行定义.
| #define XF_BLE_GAP_ADV_STRUCT_AD_TYPE_FIELD_SIZE 1 | 
BLE GAP 广播数据单元类型 (AD_TYPE) 字段的大小
在文件 xf_ble_gap_types.h 第 142 行定义.
| #define XF_BLE_GAP_ADV_STRUCT_LEN_FIELD_SIZE 1 | 
BLE GAP 广播数据单元数据长度 (LEN) 字段的大小
在文件 xf_ble_gap_types.h 第 146 行定义.
| #define XF_BLE_ADV_STRUCT_TYPE_ARRAY | ( | type_name, | |
| adv_data_array_size | |||
| ) | 
定义一个严格遵循蓝牙标准的广播数据单元结构,单元数据 ( AD Data ) 为数组的类型
| type_name | 指定定义的类型名 | 
| adv_data_array_size | 单元数据 ( AD Data ) 数组的大小 | 
在文件 xf_ble_gap_types.h 第 195 行定义.
| #define XF_BLE_ADV_STRUCT_TYPE_VAL_U8 | ( | type_name | ) | 
定义一个严格遵循蓝牙标准的广播数据单元结构,单元数据 ( AD Data ) 为 uint8_t 的类型
| type_name | 指定定义的类型名 | 
在文件 xf_ble_gap_types.h 第 218 行定义.
| #define XF_BLE_ADV_STRUCT_TYPE_VAL_U16 | ( | type_name | ) | 
定义一个严格遵循蓝牙标准的广播数据单元结构,单元数据 ( AD Data ) 为 uint16_t 的类型
| type_name | 指定定义的类型名 | 
在文件 xf_ble_gap_types.h 第 241 行定义.
| typedef uint16_t xf_ble_appearance_t | 
BLE 外观值,完全遵循蓝牙标准进行定义
在文件 xf_ble_gap_types.h 第 53 行定义.
| typedef union _xf_ble_gap_adv_struct_data_t xf_ble_gap_adv_struct_data_t | 
BLE GAP 广播数据单元的数据 ( AD Data )
以下为蓝牙标准定义的广播数据结构及广播数据单元数据 ( AD Data ) 所在的位置
BLE GAP 链接角色类型
| 枚举值 | |
|---|---|
| XF_BLE_GAP_LINK_ROLE_MASTER | 主机  | 
| XF_BLE_GAP_LINK_ROLE_SLAVE | 从机  | 
在文件 xf_ble_gap_types.h 第 117 行定义.
BLE 广播数据单元 ( AD Structure ) 类型,完全遵循蓝牙标准进行定义
在文件 xf_ble_gap_types.h 第 129 行定义.
BLE GAP 广播类型,完全遵循蓝牙标准进行定义
在文件 xf_ble_gap_types.h 第 282 行定义.
BLE GAP 广播过滤策略,完全遵循蓝牙标准进行定义
在文件 xf_ble_gap_types.h 第 298 行定义.
BLE GAP 广播通道,完全遵循蓝牙标准进行定义
| 枚举值 | |
|---|---|
| XF_BLE_GAP_ADV_CH_37 | 启用 37 通道  | 
| XF_BLE_GAP_ADV_CH_38 | 启用 38 通道  | 
| XF_BLE_GAP_ADV_CH_39 | 启用 39 通道  | 
| XF_BLE_GAP_ADV_CH_ALL | 启用所有通道  | 
在文件 xf_ble_gap_types.h 第 313 行定义.
BLE GAP PHY 类型
| 枚举值 | |
|---|---|
| XF_BLE_GAP_PHY_NO_PACKET | 无数据包  | 
| XF_BLE_GAP_PHY_1M | 1M PHY  | 
| XF_BLE_GAP_PHY_2M | 2M PHY  | 
| XF_BLE_GAP_PHY_CODED | Coded PHY  | 
在文件 xf_ble_gap_types.h 第 323 行定义.
BLE GAP 扫描过滤策略,完全遵循蓝牙标准进行定义
在文件 xf_ble_gap_types.h 第 357 行定义.
BLE GAP 扫描类型,完全遵循蓝牙标准进行定义
| 枚举值 | |
|---|---|
| XF_BLE_GAP_SCAN_TYPE_PASSIVE | 被动扫描  | 
| XF_BLE_GAP_SCAN_TYPE_ACTIVE | 主动扫描  | 
在文件 xf_ble_gap_types.h 第 376 行定义.
蓝牙断连原因
| 枚举值 | |
|---|---|
| XF_BLE_GAP_DISCONNECT_UNKNOWN | 未知原因断连  | 
| XF_BLE_GAP_DISCONNECT_TIMEOUT | 连接超时断连  | 
| XF_BLE_GAP_DISCONNECT_ENDED_BY_REMOTE_USER | 远端用户断连  | 
| XF_BLE_GAP_DISCONNECT_ENDED_BY_LOCAL_HOST | 本端 HOST 断连  | 
在文件 xf_ble_gap_types.h 第 421 行定义.
| xf_err_t xf_ble_enable | ( | void | ) | 
| xf_err_t xf_ble_disable | ( | void | ) | 
| xf_err_t xf_ble_gap_set_local_addr | ( | uint8_t | addr[XF_BLE_ADDR_LEN], | 
| xf_ble_addr_type_t | type | ||
| ) | 
BLE GAP 设置本端设备地址
| addr | BLE 地址值 | 
| type | BLE 地址类型,见 xf_ble_addr_type_t | 
| xf_err_t xf_ble_gap_get_local_addr | ( | xf_ble_addr_t * | addr | ) | 
BLE GAP 获取本端设备地址
| [out] | addr | BLE 地址信息,见 xf_ble_addr_t | 
| xf_err_t xf_ble_gap_set_local_appearance | ( | xf_ble_appearance_t | appearance | ) | 
BLE GAP 设置本端设备的外观
| appearance | 外观值,见 xf_ble_appearance_t | 
| xf_ble_appearance_t xf_ble_gap_get_local_appearance | ( | void | ) | 
BLE GAP 获取本端设备的外观
| xf_err_t xf_ble_gap_set_local_name | ( | const uint8_t * | name, | 
| const uint8_t | len | ||
| ) | 
| xf_err_t xf_ble_gap_get_local_name | ( | uint8_t * | name, | 
| uint8_t * | len | ||
| ) | 
| xf_err_t xf_ble_gap_set_adv_data | ( | const xf_ble_gap_adv_data_t * | data | ) | 
| xf_err_t xf_ble_gap_set_adv_param | ( | const xf_ble_gap_adv_param_t * | param | ) | 
BLE GAP 设置广播参数
| param | 广播参数,见 xf_ble_gap_adv_param_t | 
| xf_err_t xf_ble_gap_set_scan_param | ( | const xf_ble_gap_scan_param_t * | param | ) | 
BLE GAP 设置扫描参数
| param | 扫描参数,见 xf_ble_gap_scan_param_t | 
| xf_err_t xf_ble_gap_start_scan | ( | void | ) | 
BLE GAP 扫描开启
| xf_err_t xf_ble_gap_update_conn_params | ( | xf_ble_gap_conn_param_update_t * | params | ) | 
BLE GAP 更新连接参数
| params | 更新连接参数的信息,见 xf_ble_gap_conn_param_update_t | 
| xf_err_t xf_ble_gap_connect | ( | const xf_ble_addr_t * | addr | ) | 
| xf_err_t xf_ble_gap_disconnect | ( | const xf_ble_addr_t * | addr | ) | 
| xf_err_t xf_ble_gap_add_pair | ( | const xf_ble_addr_t * | addr | ) | 
| xf_err_t xf_ble_gap_del_pair | ( | const xf_ble_addr_t * | addr | ) | 
| xf_err_t xf_ble_gap_del_pair_all | ( | void | ) | 
BLE GAP 删除所有配对
| xf_err_t xf_ble_gap_get_pair_list | ( | uint16_t * | max_num, | 
| xf_ble_addr_t * | dev_list | ||
| ) | 
BLE GAP 获取已配对的设备
| max_num | 要获取的最大数量 | |
| [out] | dev_list | 获取到的设备列表,见 xf_ble_addr_t | 
| xf_err_t xf_ble_gap_get_bond_list | ( | int * | max_num, | 
| xf_ble_addr_t * | dev_list | ||
| ) | 
BLE GAP 获取已绑定的设备
| max_num | 要获取的最大数量 | |
| [out] | dev_list | 获取到的设备列表,见 xf_ble_addr_t | 
| xf_err_t xf_ble_gap_set_security_param | ( | xf_ble_sm_param_type_t | param_type, | 
| void * | value, | ||
| uint8_t | len | ||
| ) | 
BLE GAP 设置安全参数
| param_type | 安全参数类型,见 xf_ble_sm_param_type_t | 
| value | 安全参数的数据值 | 
| len | 安全参数的数据长度 |