Other Parts Discussed in Thread: CC2650
Tool/software: TI C/C++ Compiler
Hello,
I am using cc2650 Launch pad with simple Peripheral example to print some data as Char values. I am able to do that, but I also want to print the data on COM port using UART_write() function.
I tried to print data using UART_echo example as a reference. In main.c file of simple_ble_peripheral example I added
UART_Handle uart; UART_Params uartParams; const char print[] = "\fPrinting data\r\n"; UART_Params_init(&uartParams); uartParams.writeDataMode = UART_DATA_BINARY; uartParams.baudRate = 9600; uart = UART_open(Board_UART0, &uartParams); UART_write(uart, print, sizeof(print));
It successfully prints "Printing data" on comport, but if I try to print anything else using UART_write(), it does not print anything. Is there a way to print integers, array using UART_write()?
Also, how can I implement UART print function inside the application? I tried doing it but didn't work for me.
Please let me know how to use UART_write() or any other function to print the necessary data on COM Port within the application.
Thank you,
Rathna