![](/media/cache/group/TB_quadri.jpg.50x50_q85.jpg)
ble
Dependencies: HC_SR04_Ultrasonic_Library Servo mbed
Fork of FIP_REV1 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 383 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 213 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 266 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 188 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 373 of file bluenrg_shield_bsp.c.
void Clear_SPI_IRQ | ( | void | ) |
Clear Pending SPI IRQ.
- Parameters:
-
None
- Return values:
-
None
Definition at line 363 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 343 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 353 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 147 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 68 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 324 of file bluenrg_shield_bsp.c.
Generated on Tue Jul 12 2022 21:42:00 by
![doxygen](doxygen.png)