Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_BlueNRG by
BlueNRG_Shield_Driver
[BlueNRG_Shield]
BlueNRG Shield driver based on STM32Cube HAL for STM32 Nucleo boards. More...
Functions | |
| void | HAL_SPI_MspInit (SPI_HandleTypeDef *hspi) |
| This function is used for low level initialization of the SPI communication with the BlueNRG Shield. | |
| void | HAL_GPIO_EXTI_Callback (uint16_t GPIO_Pin) |
| EXTI line detection callback. | |
| void | BNRG_SPI_Init (void) |
| This function is used to initialize the SPI communication with the BlueNRG Shield. | |
| int32_t | BlueNRG_SPI_Read_All (SPI_HandleTypeDef *hspi, uint8_t *buffer, uint8_t buff_size) |
| Read from BlueNRG SPI buffer and store data into local buffer. | |
| int32_t | BlueNRG_SPI_Write (SPI_HandleTypeDef *hspi, uint8_t *data1, uint8_t *data2, uint8_t Nb_bytes1, uint8_t Nb_bytes2) |
| Write data from local buffer to SPI. | |
| void | Hal_Write_Serial (const void *data1, const void *data2, tHalInt32 n_bytes1, tHalInt32 n_bytes2) |
| Writes data to a serial interface. | |
| void | Disable_SPI_IRQ (void) |
| Disable SPI IRQ. | |
| void | Enable_SPI_IRQ (void) |
| Enable SPI IRQ. | |
| void | Clear_SPI_IRQ (void) |
| Clear Pending SPI IRQ. | |
| void | Clear_SPI_EXTI_Flag (void) |
| Clear EXTI (External Interrupt) line for SPI IRQ. | |
| void | BlueNRG_RST (void) |
| Reset the BlueNRG. | |
Detailed Description
BlueNRG Shield driver based on STM32Cube HAL for STM32 Nucleo boards.
Function Documentation
| void BlueNRG_RST | ( | void | ) |
Reset the BlueNRG.
- Parameters:
-
None
- Return values:
-
None
Definition at line 382 of file bluenrg_shield_bsp.c.
| int32_t BlueNRG_SPI_Read_All | ( | SPI_HandleTypeDef * | hspi, |
| uint8_t * | buffer, | ||
| uint8_t | buff_size | ||
| ) |
Read from BlueNRG SPI buffer and store data into local buffer.
- Parameters:
-
hspi,: handle of the STM32Cube HAL SPI interface buffer,: buffer where data from SPI are stored buff_size,: buffer size
- Return values:
-
number of read bytes
Definition at line 212 of file bluenrg_shield_bsp.c.
| int32_t BlueNRG_SPI_Write | ( | SPI_HandleTypeDef * | hspi, |
| uint8_t * | data1, | ||
| uint8_t * | data2, | ||
| uint8_t | Nb_bytes1, | ||
| uint8_t | Nb_bytes2 | ||
| ) |
Write data from local buffer to SPI.
- Parameters:
-
hspi,: handle of the STM32Cube HAL SPI interface data1,: first data buffer to be written data2,: second data buffer to be written Nb_bytes1,: size of first data buffer to be written Nb_bytes2,: size of second data buffer to be written
- Return values:
-
number of read bytes
Definition at line 265 of file bluenrg_shield_bsp.c.
| void BNRG_SPI_Init | ( | void | ) |
This function is used to initialize the SPI communication with the BlueNRG Shield.
- Parameters:
-
None
- Return values:
-
None
Definition at line 187 of file bluenrg_shield_bsp.c.
| void Clear_SPI_EXTI_Flag | ( | void | ) |
Clear EXTI (External Interrupt) line for SPI IRQ.
- Parameters:
-
None
- Return values:
-
None
Definition at line 372 of file bluenrg_shield_bsp.c.
| void Clear_SPI_IRQ | ( | void | ) |
Clear Pending SPI IRQ.
- Parameters:
-
None
- Return values:
-
None
Definition at line 362 of file bluenrg_shield_bsp.c.
| void Disable_SPI_IRQ | ( | void | ) |
Disable SPI IRQ.
Disable interrupts from BLE controller.
- Parameters:
-
None
- Return values:
-
None
Definition at line 342 of file bluenrg_shield_bsp.c.
| void Enable_SPI_IRQ | ( | void | ) |
Enable SPI IRQ.
Enable interrupts from HCI controller.
- Parameters:
-
None
- Return values:
-
None
Definition at line 352 of file bluenrg_shield_bsp.c.
| void HAL_GPIO_EXTI_Callback | ( | uint16_t | GPIO_Pin ) |
EXTI line detection callback.
- Parameters:
-
GPIO_Pin,: Specifies the pins connected EXTI line
- Return values:
-
None
Definition at line 146 of file bluenrg_shield_bsp.c.
| void HAL_SPI_MspInit | ( | SPI_HandleTypeDef * | hspi ) |
This function is used for low level initialization of the SPI communication with the BlueNRG Shield.
- Parameters:
-
hspi,: handle of the STM32Cube HAL SPI interface
- Return values:
-
None
Definition at line 67 of file bluenrg_shield_bsp.c.
| void Hal_Write_Serial | ( | const void * | data1, |
| const void * | data2, | ||
| tHalInt32 | n_bytes1, | ||
| tHalInt32 | n_bytes2 | ||
| ) |
Writes data to a serial interface.
- Parameters:
-
data1 1st buffer data2 2nd buffer n_bytes1 number of bytes in 1st buffer n_bytes2 number of bytes in 2nd buffer
Definition at line 323 of file bluenrg_shield_bsp.c.
Generated on Tue Jul 12 2022 16:24:21 by
1.7.2
