BlueNRG-MS pack for STM32CubeMX: hci/hci_tl_patterns/Basic/hci_tl.c File Reference

STM32CubeMX BlueNRG-MS

BlueNRG-MS pack for STM32CubeMX  V4.4.0
The BlueNRG-MS pack is an additional software for STM32CubeMX.
hci_tl.c File Reference

Contains the basic functions for managing the framework required for handling the HCI interface. More...

#include "hci_const.h" #include "hci.h"
#include "hci_tl.h"

Macros

#define HCI_LOG_ON   0
 
#define HCI_PCK_TYPE_OFFSET   0
 
#define EVENT_PARAMETER_TOT_LEN_OFFSET   2
 
#define HCI_READ_PACKET_NUM_MAX   (5)
 
#define MIN(a, b)   ((a) < (b))? (a) : (b)
 
#define MAX(a, b)   ((a) > (b))? (a) : (b)
 

Functions

void hci_init (void(*UserEvtRx)(void *pData), void *pConf)
 Initialize the Host Controller Interface. This function must be called before any data can be received from BLE controller. More...
 
void hci_register_io_bus (tHciIO *fops)
 Register IO bus services. The tHciIO structure is initialized here by assigning to each structure field a function for managing the IO Bus. E.g. In case the user needs to register the SPI bus services: More...
 
int hci_send_req (struct hci_request *r, BOOL async)
 Send an HCI request either in synchronous or in asynchronous mode. More...
 
void hci_user_evt_proc (void)
 Processing function that must be called after an event is received from HCI interface. It must be called outside ISR. It will call user_notify() if necessary. More...
 
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 to the host through the BlueNRG-MS interrupt line. More...
 

Variables

tListNode hciReadPktPool
 
tListNode hciReadPktRxQueue
 

Detailed Description

Contains the basic functions for managing the framework required for handling the HCI interface.

Author
AMG RF Application Team
Version
V1.0.0
Date
18-Jan-2018

© Copyright (c) 2018 STMicroelectronics

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted, provided that the following conditions are met:

  1. Redistribution of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of STMicroelectronics nor the names of other contributors to this software may be used to endorse or promote products derived from this software without specific written permission.
  4. This software, including modifications and/or derivative works of this software, must execute solely and exclusively on microcontroller or microprocessor devices manufactured by or for STMicroelectronics.
  5. Redistribution and use of this software other than as permitted under this license is void and will automatically terminate your rights under this license.

THIS SOFTWARE IS PROVIDED BY STMICROELECTRONICS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS, IMPLIED OR STATUTORY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS ARE DISCLAIMED TO THE FULLEST EXTENT PERMITTED BY LAW. IN NO EVENT SHALL STMICROELECTRONICS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ EVENT_PARAMETER_TOT_LEN_OFFSET

#define EVENT_PARAMETER_TOT_LEN_OFFSET   2

◆ HCI_LOG_ON

#define HCI_LOG_ON   0

◆ HCI_PCK_TYPE_OFFSET

#define HCI_PCK_TYPE_OFFSET   0

◆ HCI_READ_PACKET_NUM_MAX

#define HCI_READ_PACKET_NUM_MAX   (5)

Increase this parameter to overcome possible issues due to BLE devices crowded environment or high number of incoming notifications from peripheral devices

◆ MAX

#define MAX (   a,
 
)    ((a) > (b))? (a) : (b)

◆ MIN

#define MIN (   a,
 
)    ((a) < (b))? (a) : (b)

Variable Documentation

◆ hciReadPktPool

tListNode hciReadPktPool

◆ hciReadPktRxQueue

tListNode hciReadPktRxQueue
Generated on Mon Apr 15 2019 18:10:39 for BlueNRG-MS pack for STM32CubeMX by   doxygen 1.8.13