STSW-STLKT01: Drivers/BSP/SensorTile/SensorTile_BlueNRG.c File Reference

STSW-STLKT01

STSW-STLKT01
SensorTile_BlueNRG.c File Reference

This file provides the BLE driver for the Sensor Tile board. More...

#include "SensorTile_BlueNRG.h" #include "gp_timer.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define HEADER_SIZE   5
 
#define MAX_BUFFER_SIZE   255
 
#define TIMEOUT_DURATION   15
 

Functions

static void us150Delay (void)
 Utility function for delay. More...
 
void set_irq_as_output (void)
 Set in Output mode the IRQ. More...
 
void set_irq_as_input (void)
 Set the IRQ in input mode. More...
 
void HAL_SPI_MspInit (SPI_HandleTypeDef *hspi)
 This function is used for low level initialization of the SPI communication with the BlueNRG Expansion Board. More...
 
void Hal_Write_Serial (const void *data1, const void *data2, int32_t n_bytes1, int32_t n_bytes2)
 Writes data to a serial interface. More...
 
void BNRG_SPI_Init (void)
 Initializes the SPI communication with the BlueNRG Expansion Board. More...
 
void BlueNRG_RST (void)
 Resets the BlueNRG. More...
 
uint8_t BlueNRG_DataPresent (void)
 Reports if the BlueNRG has data for the host micro. More...
 
void BlueNRG_HW_Bootloader (void)
 Activate internal bootloader using pin. More...
 
int32_t BlueNRG_SPI_Read_All (SPI_HandleTypeDef *hspi, uint8_t *buffer, uint8_t buff_size)
 Reads from BlueNRG SPI buffer and store data into local buffer. More...
 
int32_t BlueNRG_SPI_Write (SPI_HandleTypeDef *hspi, uint8_t *data1, uint8_t *data2, uint8_t Nb_bytes1, uint8_t Nb_bytes2)
 Writes data from local buffer to SPI. More...
 
void Enable_SPI_IRQ (void)
 Enable SPI IRQ. More...
 
void Disable_SPI_IRQ (void)
 Disable SPI IRQ. More...
 
void Clear_SPI_IRQ (void)
 Clear Pending SPI IRQ. More...
 
void Clear_SPI_EXTI_Flag (void)
 Clear EXTI (External Interrupt) line for SPI IRQ. More...
 

Variables

SPI_HandleTypeDef SpiHandle
 

Detailed Description

This file provides the BLE driver for the Sensor Tile board.

Author
Central Labs
Version
V1.3.1
Date
27-Apr-2017
Attention

© COPYRIGHT(c) 2014 STMicroelectronics

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

  1. Redistributions 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 its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.

Definition in file SensorTile_BlueNRG.c.

Generated by   doxygen 1.8.13