天嵌二次封装库使用手册
V2.1.2
首页
类
文件
文件列表
文件成员
lib_bluetooth.h
浏览该文件的文档.
1
7
#ifndef LINUX_LIBV2_SOURCE_BULETOOTH_LIB_BULETOOTH_H_
8
#define LINUX_LIBV2_SOURCE_BULETOOTH_LIB_BULETOOTH_H_
9
10
11
#define LE_LINK 0x80
12
13
#define FLAGS_AD_TYPE 0x01
14
#define FLAGS_LIMITED_MODE_BIT 0x01
15
#define FLAGS_GENERAL_MODE_BIT 0x02
16
#define EIR_FLAGS 0x01
/* flags */
17
#define EIR_UUID16_SOME 0x02
/* 16-bit UUID, more available */
18
#define EIR_UUID16_ALL 0x03
/* 16-bit UUID, all listed */
19
#define EIR_UUID32_SOME 0x04
/* 32-bit UUID, more available */
20
#define EIR_UUID32_ALL 0x05
/* 32-bit UUID, all listed */
21
#define EIR_UUID128_SOME 0x06
/* 128-bit UUID, more available */
22
#define EIR_UUID128_ALL 0x07
/* 128-bit UUID, all listed */
23
#define EIR_NAME_SHORT 0x08
/* shortened local name */
24
#define EIR_NAME_COMPLETE 0x09
/* complete local name */
25
#define EIR_TX_POWER 0x0A
/* transmit power level */
26
#define EIR_DEVICE_ID 0x10
/* device ID */
27
28
static
volatile
int
signal_received = 0;
29
30
static
char
*major_classes[] = {
31
"Miscellaneous"
,
"Computer"
,
"Phone"
,
"LAN Access"
,
32
"Audio/Video"
,
"Peripheral"
,
"Imaging"
,
"Uncategorized"
33
};
34
35
#ifdef __cplusplus
36
#define BLUETOOTH_API extern "C"
37
#else
38
#define BLUETOOTH_API
39
#endif
40
46
BLUETOOTH_API
int
cmd_scan
(
char
*resList,
int
len);
54
BLUETOOTH_API
int
cmd_lescan
(
int
num,
char
*resList,
int
len);
55
56
#endif //TQ_BLUETOOTH_H
BLUETOOTH_API
#define BLUETOOTH_API
Definition:
lib_bluetooth.h:38
cmd_scan
BLUETOOTH_API int cmd_scan(char *resList, int len)
扫描蓝牙设备
cmd_lescan
BLUETOOTH_API int cmd_lescan(int num, char *resList, int len)
扫描低功耗蓝牙设备
tqinclude
bluetooth
lib_bluetooth.h
制作者
1.8.11