Part Number: LAUNCHXL-CC2650
Hi !
My problem is the UART. In the project there is an UART.h file. I tried to use Uart with this but it's not working. I also tried with NPI but the UART.h seems to me more simple.Can I use this for UART. If I can't ,where can I find a proper description on NPI/UART. I already tried with this software-dl.ti.com/.../index.html but it's not clear yet, how can I recieve messages from UART. My pourpose is , that I want to recieve strings from UART, and I want to send it with the data service.I also read all the simlpllink acaedmy tutorials, but I couldn't find a specific UART task example, with multiple tasks.
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
static void UARTfx_init(void){ UART_Params uartParams; const char echoPrompt[] = "\fEchoing characters:\r\n"; /* Create a UART with data processing off. */ UART_Params_init(&uartParams); uartParams.readMode = UART_MODE_CALLBACK; uartParams.writeMode = UART_MODE_CALLBACK; uartParams.readTimeout = UART_WAIT_FOREVER; uartParams.writeTimeout = UART_WAIT_FOREVER; uartParams.readCallback = IThandler; uartParams.writeCallback = IThandler; uartParams.baudRate = 9600; uart = UART_open(Board_UART0, &uartParams); if (uart == NULL) { System_abort("Error opening the UART"); } UART_write(uart, echoPrompt, sizeof(echoPrompt)); } static void IThandler() { UARTFxn(); } static void UARTFxn() { UART_read(uart, &UART_input, 1); DataService_SetParameter(DS_STRING_ID, sizeof(UART_input), UART_input); } |
Best regards,
Mayer Tamás