STSW-STLKT01: SENSORTILE_BLE Exported Functions

STSW-STLKT01

STSW-STLKT01
SENSORTILE_BLE Exported Functions

Functions

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...
 
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...
 
static void us150Delay (void)
 Utility function for delay. More...
 

Detailed Description

Function Documentation

◆ BlueNRG_DataPresent()

uint8_t BlueNRG_DataPresent ( void  )

Reports if the BlueNRG has data for the host micro.

Parameters
None
Return values
1if data are present, 0 otherwise

Definition at line 270 of file SensorTile_BlueNRG.c.

◆ BlueNRG_HW_Bootloader()

void BlueNRG_HW_Bootloader ( void  )

Activate internal bootloader using pin.

Parameters
None
Return values
None

Definition at line 283 of file SensorTile_BlueNRG.c.

◆ BlueNRG_RST()

void BlueNRG_RST ( void  )

Resets the BlueNRG.

Parameters
None
Return values
None

Definition at line 256 of file SensorTile_BlueNRG.c.

◆ BlueNRG_SPI_Read_All()

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.

Parameters
hspi: SPI handle
buffer: Buffer where data from SPI are stored
buff_sizeBuffer size
Return values
int32_t: Number of read bytes

Definition at line 299 of file SensorTile_BlueNRG.c.

◆ BlueNRG_SPI_Write()

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.

Parameters
hspi: SPI handle
data1: First data buffer to be written
data2: Second data buffer to be written
Nb_bytes1Size of first data buffer to be written
Nb_bytes2Size of second data buffer to be written
Return values
Numberof read bytes

Definition at line 363 of file SensorTile_BlueNRG.c.

◆ BNRG_SPI_Init()

void BNRG_SPI_Init ( void  )

Initializes the SPI communication with the BlueNRG Expansion Board.

Parameters
None
Return values
None

Definition at line 233 of file SensorTile_BlueNRG.c.

◆ Clear_SPI_EXTI_Flag()

void Clear_SPI_EXTI_Flag ( void  )

Clear EXTI (External Interrupt) line for SPI IRQ.

Parameters
None
Return values
None

Definition at line 539 of file SensorTile_BlueNRG.c.

◆ Clear_SPI_IRQ()

void Clear_SPI_IRQ ( void  )

Clear Pending SPI IRQ.

Parameters
None
Return values
None

Definition at line 529 of file SensorTile_BlueNRG.c.

◆ Disable_SPI_IRQ()

void Disable_SPI_IRQ ( void  )

Disable SPI IRQ.

Parameters
None
Return values
None

Definition at line 519 of file SensorTile_BlueNRG.c.

◆ Enable_SPI_IRQ()

void Enable_SPI_IRQ ( void  )

Enable SPI IRQ.

Parameters
None
Return values
None

Definition at line 509 of file SensorTile_BlueNRG.c.

◆ HAL_SPI_MspInit()

void HAL_SPI_MspInit ( SPI_HandleTypeDef *  hspi)

This function is used for low level initialization of the SPI communication with the BlueNRG Expansion Board.

Parameters
hspiSPI handle.
Return values
None

Definition at line 119 of file SensorTile_BlueNRG.c.

◆ Hal_Write_Serial()

void Hal_Write_Serial ( const void *  data1,
const void *  data2,
int32_t  n_bytes1,
int32_t  n_bytes2 
)

Writes data to a serial interface.

Parameters
data1: 1st buffer
data2: 2nd buffer
n_bytes1number of bytes in 1st buffer
n_bytes2number of bytes in 2nd buffer
Return values
None

Definition at line 201 of file SensorTile_BlueNRG.c.

◆ set_irq_as_input()

void set_irq_as_input ( void  )

Set the IRQ in input mode.

Parameters
None
Return values
None

Definition at line 465 of file SensorTile_BlueNRG.c.

◆ set_irq_as_output()

void set_irq_as_output ( void  )

Set in Output mode the IRQ.

Parameters
None
Return values
None

Definition at line 447 of file SensorTile_BlueNRG.c.

◆ us150Delay()

static void us150Delay ( void  )
static

Utility function for delay.

Parameters
None
Return values
NoneNOTE: TODO: implement with clock-independent function.

Definition at line 487 of file SensorTile_BlueNRG.c.

Generated by   doxygen 1.8.13