Airoha M0 BLE API  1.0.5.4
hci_protocols.h
1 /******************************************************************************
2 Copyright (c) Airoha 2016 - All rights reserved
3 
4 FILE NAME
5  hci_protocols.h
6 DESCRIPTION
7 NOTES
8 ********************************************************************************/
9 #ifndef __HCI_PROTOCOL_HH
10 #define __HCI_PROTOCOL_HH
11 #include "hci_devices.h"
12 #include "hci_packet.h"
13 /******************************************************************************
14  * Macro
15  ******************************************************************************/
16 #define HCI_PROT_MODULE_NAME "hci_prot"
17 
18 /******************************************************************************
19  * Typedef
20  ******************************************************************************/
21 typedef void (*hcip_cmd_send)(uint16_t op, uint8_t *parm, uint8_t len);
22 typedef void (*hcip_acl_send)(uint16_t handle, uint8_t *dat, uint16_t len);
23 typedef void (*hcip_pkt_recv)(hci_rx_packet *pkt);
24 typedef void (*hcip_init_result)(bool);
25 typedef void (*hcip_init)(hcidops *dev, hcip_pkt_recv rx_cb, hcip_init_result init_cb, void *cdata[], uint8_t ccount);
26 
27 typedef struct
28 {
29 
30  char * hci_dev_name;
31  hcip_init init;
32  hcip_cmd_send cmd2hci;
33  hcip_acl_send acl2hci;
34 }hcipops;
35 
36 typedef struct
37 {
38  char *name; //HCI_PROT_MODULE_NAME
39  hcipops *ops;
40 }hci_proto_module;
41 
42 
43 #endif