| STM32L - BlueNRG-1 BLE stack APIs, Events and Constants

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

Classes | Macros | Typedefs | Functions | Variables
hci.h File Reference

Header file for BlueNRG-1's HCI APIs. More...

`#include "hal_types.h"`
`#include "link_layer.h"`
`#include <list.h>`

Go to the source code of this file.

## Classes

struct | _tHciDataPacket
struct | hci_request

## Macros

#define | HCI_READ_PACKET_SIZE 128
#define | HCI_MAX_PAYLOAD_SIZE 128

## Typedefs

typedef struct _tHciDataPacket | tHciDataPacket

## Functions

uint8_t | BlueNRG_Stack_Initialization (void)
void | HCI_Event_CB (void *pckt)
void | BTLE_StackTick (void)
BOOL | HCI_Queue_Empty (void)
| Check if queue of HCI event is empty or not. More...
void | HCI_Isr (void)
int | hci_send_req (struct hci_request *r, BOOL async)

## Variables

tListNode | hciReadPktPool
tListNode | hciReadPktRxQueue

## Detailed Description

Header file for BlueNRG-1's HCI APIs.

Author
  AMS - VMA RF Application team

Version
  V1.0.0

Date
  21-Sept-2016

Attention

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

##
© COPYRIGHT 2015 STMicroelectronics

Definition in file hci.h.

## Macro Definition Documentation

#define HCI_MAX_PAYLOAD_SIZE 128

Maximum payload of HCI commands that can be sent. Change this value if needed. This value can be up to 255.

Definition at line 35 of file hci.h.

#define HCI_READ_PACKET_SIZE 128

Definition at line 29 of file hci.h.

## Typedef Documentation

typedef struct _tHciDataPacket tHciDataPacket

## Function Documentation

uint8_t BlueNRG_Stack_Initialization | ( | void |  | ) |

Initialization function. Must be done before any data can be received from BLE controller.

void BTLE_StackTick | ( | void |  | ) |

Processing function that must be called after an event is received from HCI interface. Must be called outside ISR. It will call HCI_Event_CB if necessary.

void HCI_Event_CB | ( | void * | pckt | ) |

Callback used to pass events to application.

Parameters

  [in] | pckt | The event.

void HCI_Isr | ( | void |  | ) |

Iterrupt service routine that must be called when the BlueNRG reports a packet received or an event to the host through the BlueNRG interrupt line.

BOOL HCI_Queue_Empty | ( | void |  | ) |

Check if queue of HCI event is empty or not.

Note
  This funtion can be used to check if the event queue from BlueNRG is empty. This is useful when checking if it is safe to go to sleep.

Returns
  TRUE if event queue is empty. FALSE otherwhise.

int hci_send_req | ( | struct hci_request * | r,
|  | BOOL | async
| ) |  |

## Variable Documentation

tListNode hciReadPktPool

tListNode hciReadPktRxQueue