1 /**
2  * Copyright (c) 2015, Realsil Semiconductor Corporation. All rights reserved.
3  */
4 
5 #ifndef _HCI_IF_H_
6 #define _HCI_IF_H_
7 
8 #include <stdint.h>
9 #include <stdbool.h>
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 typedef enum
16 {
17     HCI_IF_EVT_OPENED,     /* hci I/F open completed */
18     HCI_IF_EVT_CLOSED,     /* hci I/F close completed */
19     HCI_IF_EVT_DATA_IND,   /* hci I/F rx data indicated */
20     HCI_IF_EVT_DATA_XMIT,  /* hci I/F tx data transmitted */
21     HCI_IF_EVT_ERROR,      /* hci I/F error occurred */
22 } T_HCI_IF_EVT;
23 
24 typedef bool (*P_HCI_IF_CALLBACK)(T_HCI_IF_EVT evt, bool status, uint8_t *p_buf, uint32_t len);
25 
26 bool hci_if_open(P_HCI_IF_CALLBACK p_callback);
27 
28 bool hci_if_close(void);
29 
30 bool hci_if_write(uint8_t *p_buf, uint32_t len);
31 
32 bool hci_if_confirm(uint8_t *p_buf);
33 
34 
35 #ifdef __cplusplus
36 }
37 #endif
38 
39 #endif /* _HCI_IF_H_ */
40