BlueNRG-MS pack for STM32CubeMX: hci/hci_tl_patterns/Template/hci_tl_template.h Source File

STM32CubeMX BlueNRG-MS

BlueNRG-MS pack for STM32CubeMX  V4.4.0
The BlueNRG-MS pack is an additional software for STM32CubeMX.
hci_tl_template.h
Go to the documentation of this file.
1 /******************** (C) COPYRIGHT 2016 STMicroelectronics ********************
2 * File Name : hci_tl_template.h
3 * Author : AMG RF FW team
4 * Version : V1.1.0
5 * Date : 18-July-2016
6 * Description : Header file for framework required for handling HCI interface.
7 ********************************************************************************
8 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
9 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
10 * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
11 * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
12 * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
13 * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
14 *******************************************************************************/
15 
16 #ifndef __HCI_TL_TEMPLATE_H_
17 #define __HCI_TL_TEMPLATE_H_
18 
19 #include "hci_tl_interface.h"
20 #include "bluenrg_types.h"
21 #include "ble_list.h"
22 #include "bluenrg_conf.h"
23 
48 struct hci_request {
49  uint16_t ogf;
50  uint16_t ocf;
51  uint32_t event;
52  void *cparam;
53  uint32_t clen;
54  void *rparam;
55  uint32_t rlen;
56 };
65 typedef struct _tHciDataPacket
66 {
67  tListNode currentNode;
68  uint8_t dataBuff[HCI_READ_PACKET_SIZE];
69  uint8_t data_len;
80 typedef struct
81 {
82  int32_t (* Init) (void* pConf);
83  int32_t (* DeInit) (void);
84  int32_t (* Reset) (void);
85  int32_t (* Receive) (uint8_t*, uint16_t);
86  int32_t (* Send) (uint8_t*, uint16_t);
87  int32_t (* DataAck) (uint8_t*, uint16_t* len);
88  int32_t (* GetTick) (void);
89 } tHciIO;
98 typedef enum
99 {
111 typedef struct
112 {
113  tHciIO io;
114  void (* UserEvtRx)(void* pData);
115 } tHciContext;
116 
137 int hci_send_req(struct hci_request *r, BOOL async);
138 
183 void hci_register_io_bus(tHciIO* fops);
184 
193 int32_t hci_notify_asynch_evt(void* pdata);
194 
202 void hci_resume_flow(void);
203 
215 void hci_cmd_resp_wait(uint32_t timeout);
216 
224 void hci_cmd_resp_release(uint32_t flag);
225 
242 #endif /* __HCI_TL_TEMPLATE_H_ */
void * cparam
Definition: hci_tl.h:51
struct _tHciDataPacket tHciDataPacket
Structure used to read received HCI data packet.
int hci_send_req(struct hci_request *r, BOOL async)
Send an HCI request either in synchronous or in asynchronous mode.
Definition: hci_tl.c:191
#define HCI_READ_PACKET_SIZE
Definition: bluenrg_conf_template.h:68
void hci_resume_flow(void)
This function resume the User Event Flow which has been stopped on return from UserEvtRx() when the U...
Definition: hci_tl_template.c:82
Structure used to read received HCI data packet.
Definition: hci_tl.h:64
uint32_t event
Definition: hci_tl.h:50
uint16_t ogf
Definition: hci_tl.h:48
void * rparam
Definition: hci_tl.h:53
tHciflowStatus
Describe the HCI flow status.
Definition: hci_tl_template.h:98
uint32_t rlen
Definition: hci_tl.h:54
Definition: ble_list.h:20
void hci_cmd_resp_release(uint32_t flag)
This function is called when an ACI/HCI command is sent and the response is received from the BLE cor...
Definition: hci_tl_template.c:96
uint32_t clen
Definition: hci_tl.h:52
uint16_t ocf
Definition: hci_tl.h:49
Definition: hci_tl_template.h:101
int32_t hci_notify_asynch_evt(void *pdata)
Interrupt service routine that must be called when the BlueNRG reports a packet received or an event ...
Definition: hci_tl.c:345
Structure used to manage the BUS IO operations. All the structure fields will point to functions defi...
Definition: hci_tl.h:79
void hci_register_io_bus(tHciIO *fops)
Register IO bus services. The tHciIO structure is initialized here by assigning to each structure fie...
Definition: hci_tl.c:181
void hci_cmd_resp_wait(uint32_t timeout)
This function is called when an ACI/HCI command is sent and the response is waited from the BLE core...
Definition: hci_tl_template.c:89
Definition: hci_tl_template.h:100
Contain the HCI context.
Definition: hci_tl.h:110
Structure hosting the HCI request.
Definition: hci_tl.h:47
uint8_t BOOL
Definition: bluenrg_types.h:48
Generated on Mon Apr 15 2019 18:10:39 for BlueNRG-MS pack for STM32CubeMX by   doxygen 1.8.13