![]() |
Master Thesis
V1.0
Research and Design of Sensor Node for NMSD Treatment
|
UART communication with BLE. More...
#include <stdint.h>#include <stdbool.h>Go to the source code of this file.
Functions | |
| void | uart_Init () |
| UART init. More... | |
| uint8_t | uartGetChar () |
| uartGetChar function More... | |
| void | uartPutChar (uint8_t ch) |
| uartPutChar function More... | |
| void | uartPutData (uint8_t *dataPtr, uint32_t dataLen) |
| uartPutData function More... | |
| uint32_t | uartGetData (uint8_t *dataPtr, uint32_t dataLen) |
| uartGetData function More... | |
| void | UART1_RX_IRQHandler (void) |
| void | UART1_TX_IRQHandler (void) |
| void UART1_RX_IRQHandler | ( | void | ) |
| void UART1_TX_IRQHandler | ( | void | ) |
| void uart_Init | ( | ) |
UART init.
Inspired by Silabs demo code
Definition at line 57 of file uart.c.
References BLE_PIN_RX, BLE_PIN_TX, BLE_PORT, and BLE_USART.
Referenced by BLE_Init().
| uint8_t uartGetChar | ( | ) |
uartGetChar function
Note that if there are no pending characters in the receive buffer, this function will hang until a character is received.
Definition at line 94 of file uart.c.
References BUFFERSIZE, circularBuffer::data, circularBuffer::pendingBytes, circularBuffer::rdI, and rxBuf.
| uint32_t uartGetData | ( | uint8_t * | dataPtr, |
| uint32_t | dataLen | ||
| ) |
uartGetData function
Definition at line 185 of file uart.c.
References BUFFERSIZE, circularBuffer::data, circularBuffer::pendingBytes, circularBuffer::rdI, and rxBuf.
Referenced by BLE_readData().
| void uartPutChar | ( | uint8_t | ch | ) |
uartPutChar function
Definition at line 121 of file uart.c.
References BLE_USART, BUFFERSIZE, circularBuffer::data, circularBuffer::pendingBytes, txBuf, and circularBuffer::wrI.
| void uartPutData | ( | uint8_t * | dataPtr, |
| uint32_t | dataLen | ||
| ) |
uartPutData function
Definition at line 148 of file uart.c.
References BLE_USART, BUFFERSIZE, circularBuffer::data, circularBuffer::pendingBytes, txBuf, and circularBuffer::wrI.
Referenced by BLE_sendData(), and BLE_set_output_power().