BlueNRG-MS pack for STM32CubeMX: hci/hci_tl_patterns/Basic/hci_tl.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.h
Go to the documentation of this file.
1 /******************** (C) COPYRIGHT 2016 STMicroelectronics ********************
2 * File Name : hci.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_H_
17 #define __HCI_TL_H_
18 
19 #include "hci_tl_interface.h"
20 #include "bluenrg_types.h"
21 #include "ble_list.h"
22 #include "bluenrg_conf.h"
23 
47 struct hci_request {
48  uint16_t ogf;
49  uint16_t ocf;
50  uint32_t event;
51  void *cparam;
52  uint32_t clen;
53  void *rparam;
54  uint32_t rlen;
55 };
64 typedef struct _tHciDataPacket
65 {
67  uint8_t dataBuff[HCI_READ_PACKET_SIZE];
68  uint8_t data_len;
79 typedef struct
80 {
81  int32_t (* Init) (void* pConf);
82  int32_t (* DeInit) (void);
83  int32_t (* Reset) (void);
84  int32_t (* Receive) (uint8_t*, uint16_t);
85  int32_t (* Send) (uint8_t*, uint16_t);
86  int32_t (* DataAck) (uint8_t*, uint16_t* len);
87  int32_t (* GetTick) (void);
88 } tHciIO;
97 typedef enum
98 {
110 typedef struct
111 {
113  void (* UserEvtRx) (void * pData);
114 } tHciContext;
115 
135 int hci_send_req(struct hci_request *r, BOOL async);
136 
181 void hci_register_io_bus(tHciIO* fops);
182 
191 int32_t hci_notify_asynch_evt(void* pdata);
192 
200 void hci_resume_flow(void);
201 
213 void hci_cmd_resp_wait(uint32_t timeout);
214 
222 void hci_cmd_resp_release(uint32_t flag);
223 
240 #endif /* __HCI_TL_H_ */
void * cparam
Definition: hci_tl.h:51
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
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
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
#define HCI_READ_PACKET_SIZE
Definition: bluenrg_conf_template.h:68
Structure used to read received HCI data packet.
Definition: hci_tl.h:64
tListNode currentNode
Definition: hci_tl.h:66
uint32_t event
Definition: hci_tl.h:50
tHciflowStatus
Describe the HCI flow status.
Definition: hci_tl.h:97
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
uint16_t ogf
Definition: hci_tl.h:48
void * rparam
Definition: hci_tl.h:53
tHciIO io
Definition: hci_tl.h:112
uint32_t rlen
Definition: hci_tl.h:54
uint8_t data_len
Definition: hci_tl.h:68
Definition: ble_list.h:20
uint32_t clen
Definition: hci_tl.h:52
uint16_t ocf
Definition: hci_tl.h:49
Definition: hci_tl.h:100
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
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
Structure used to manage the BUS IO operations. All the structure fields will point to functions defi...
Definition: hci_tl.h:79
struct _tHciDataPacket tHciDataPacket
Structure used to read received HCI data packet.
Definition: hci_tl.h:99
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