Airoha M0 BLE API  1.0.5.4
hci.h
1 /******************************************************************************
2 Copyright (c) Airoha 2016 - All rights reserved
3 
4 FILE NAME
5  hci.h
6 DESCRIPTION
7 NOTES
8 ********************************************************************************/
9 #ifndef _HCI_HH_
10 #define _HCI_HH_
11 #include <stdint.h>
12 #include <stdbool.h>
13 /******************************************************************************
14  * Macro
15  ******************************************************************************/
16 #define MAX_SUPPORT_CTROLLER 1
17 
18 /******************************************************************************
19  * Typedef
20  ******************************************************************************/
21 typedef void (*hci_evt_recv)(uint8_t evt, uint8_t len, uint8_t* buf);
22 typedef void (*hci_dat_recv)(uint16_t handle, uint16_t len, uint8_t *buf);
23 typedef void (*hci_inited_callback)(bool is_success);
24 typedef enum
25 {
26 
27  set_pub_address = 0, //6 bytes address
28  set_tx_power = 1, //1 bytes -127 db ~ 128 dbm
29 }hci_ctrler_specific;
30 /******************************************************************************
31  * Functions
32  ******************************************************************************/
33 void hci_init(hci_inited_callback cb, hci_dat_recv dat_cb, hci_evt_recv evt_cb, void *cdata[], uint8_t ccount);
34 void hci_cmd_send(uint16_t op, uint8_t *parm, uint8_t len);
35 void hci_acl_send(uint16_t handle, uint8_t *dat, uint16_t len);
36 void hci_log_set(uint8_t level);
37 
38 #endif