Subversion Repositories Projects

Rev

Rev 483 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 483 Rev 522
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
#define RIDDIM_ADDRESS 12+'a'
6
#include <bluetooth/bluetooth.h>
7
#include <bluetooth/bluetooth.h>
7
#include <bluetooth/rfcomm.h>
8
#include <bluetooth/rfcomm.h>
8
#include <bluetooth/hci.h>
9
#include <bluetooth/hci.h>
9
#include <bluetooth/hci_lib.h>
10
#include <bluetooth/hci_lib.h>
10
 
11
 
11
#include <unistd.h>//for close() for socket
12
#include <unistd.h>//for close() for socket
12
#include <stdlib.h>
13
#include <stdlib.h>
13
 
14
 
14
 
15
 
15
#include <stdio.h>
16
#include <stdio.h>
16
#include <stdlib.h>
17
#include <stdlib.h>
17
#include <fcntl.h>
18
#include <fcntl.h>
18
 
19
 
19
 
20
 
-
 
21
 
20
 
22
 
21
#include <errno.h>
23
#include <errno.h>
22
#include <sys/types.h>
24
#include <sys/types.h>
23
#include <netinet/in.h>
25
#include <netinet/in.h>
24
#include <sys/time.h>
26
#include <sys/time.h>
25
 
27
 
26
#include <unistd.h>//for close() for socket
28
#include <unistd.h>//for close() for socket
27
 
29
 
28
#include <string.h>
30
#include <string.h>
-
 
31
#include "riddim_meta.h"
-
 
32
#include "statistics.h" 
-
 
33
#include "config.h" 
-
 
34
#include "riddim.h"
-
 
35
#include "fc.h"
29
 
36
 
30
#define MAX_BT_DEVICES 3
37
#define MAX_BT_DEVICES 3
31
 
38
 
32
extern int bt_device_count;
39
extern int bt_device_count;
33
 
40
 
34
extern char names[MAX_BT_DEVICES][248];
41
extern char names[MAX_BT_DEVICES][248];
35
extern char addrs[MAX_BT_DEVICES][19];
42
extern char addrs[MAX_BT_DEVICES][19];
36
 
43
 
37
int scan_bt();
44
int scan_bt();
38
int bt_host_tick(int mk_fd);
45
int bt_host_tick(int mk_fd);
39
int bt_host_init();
46
int bt_host_init();
40
int bt_host_send(char RxBuffer[150],int len);
47
int bt_host_send(char RxBuffer[150],int len);
-
 
48
 
-
 
49
 
-
 
50
#define MAX_BUFF_LEN 150
-
 
51
 
-
 
52
 
-
 
53
extern struct str_DebugOut    DebugOut;
-
 
54
extern struct str_VersionInfo VersionInfo;
-
 
55
 
41
 
56
 
42
#endif
57
#endif
43
 
58