Hi,
I am trying to use the uart read interrupt through the uart driver. I am not able to read from the UART.
I have pasted the code added to simpleBLEPeripheral below. I am not currently using the npi patches.
In looking at this thread, am I required to manually post a semaphore?
I am using TI RTOS 2.13.00.06
BLE Stack 2.1 and CCS 6.1.2, CC2640 4x4 chip.
Thanks,
Priya
#include "Board.h"
static UART_Handle uart;
static void readCallback(UART_Handle handle, void *rx_buf, size_t size)
{
UART_read(uart, &rx_buf, size);
// UART_enqueueMsg(&rx_buf);
}
static void UART_initialize(void)
{
UART_init();
UART_Params uartParams;
uint8_t rx_buf;
uint8_t size = sizeof(rx_buf);
/* Create a UART with data processing off. */
UART_Params_init(&uartParams);
uartParams.writeDataMode = UART_DATA_BINARY;
uartParams.readDataMode = UART_DATA_BINARY;
uartParams.readReturnMode = UART_RETURN_FULL;
uartParams.readMode = UART_MODE_CALLBACK;
uartParams.baudRate = 9600;
uart = UART_open(Board_UART, &uartParams);
if (uart == NULL) {
System_abort("Error opening the UART");
}
uartParams.readCallback = readCallback;
}