Subversion Repositories Projects

Rev

Rev 130 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 130 Rev 483
1
 
1
 
2
#if !defined(BLUETOOTH_HANDLER_H)
2
#if !defined(BLUETOOTH_HANDLER_H)
3
#define BLUETOOTH_HANDLER_H
3
#define BLUETOOTH_HANDLER_H
4
 
4
 
5
 
5
 
6
#include <bluetooth/bluetooth.h>
6
#include <bluetooth/bluetooth.h>
7
#include <bluetooth/rfcomm.h>
7
#include <bluetooth/rfcomm.h>
8
#include <bluetooth/hci.h>
8
#include <bluetooth/hci.h>
9
#include <bluetooth/hci_lib.h>
9
#include <bluetooth/hci_lib.h>
10
 
10
 
11
#include <unistd.h>//for close() for socket
11
#include <unistd.h>//for close() for socket
12
 
-
 
13
#include <stdlib.h>
12
#include <stdlib.h>
14
 
13
 
15
 
14
 
16
#include <stdio.h>
15
#include <stdio.h>
17
#include <stdlib.h>
16
#include <stdlib.h>
18
#include <fcntl.h>
17
#include <fcntl.h>
19
 
18
 
20
 
19
 
21
 
20
 
22
#include <errno.h>
21
#include <errno.h>
23
#include <sys/types.h>
22
#include <sys/types.h>
24
#include <netinet/in.h>
23
#include <netinet/in.h>
-
 
24
#include <sys/time.h>
-
 
25
 
25
#include <unistd.h>//for close() for socket
26
#include <unistd.h>//for close() for socket
26
 
27
 
27
#include <string.h>
28
#include <string.h>
28
 
29
 
29
#define MAX_BT_DEVICES 3
30
#define MAX_BT_DEVICES 3
30
 
31
 
31
extern int bt_device_count;
32
extern int bt_device_count;
32
 
33
 
33
extern char names[MAX_BT_DEVICES][248];
34
extern char names[MAX_BT_DEVICES][248];
34
extern char addrs[MAX_BT_DEVICES][19];
35
extern char addrs[MAX_BT_DEVICES][19];
35
 
36
 
36
int scan_bt();
37
int scan_bt();
37
int bt_host_tick(int mk_fd);
38
int bt_host_tick(int mk_fd);
38
int bt_host_init();
39
int bt_host_init();
39
int bt_host_send(char RxBuffer[150],int len);
40
int bt_host_send(char RxBuffer[150],int len);
40
 
41
 
41
#endif
42
#endif
42
 
43