Part Number: LAUNCHXL-CC1350
Other Parts Discussed in Thread: CC1350
Hello,
I want to send and receive data over uart in cc1350 with Contiki.
I am using following .c file. But it looks like "if(ev == serial_line_event_message)" is not working. Do I need to add something in code?
#include "contiki.h"
#include "dev/serial-line.h"
#include <stdio.h>
PROCESS(test_serial, "Serial line test process");
AUTOSTART_PROCESSES(&test_serial);
PROCESS_THREAD(test_serial, ev, data)
{
PROCESS_BEGIN();
printf("Hello");
for(;;) {
PROCESS_YIELD();
if(ev == serial_line_event_message) {
printf("received line: %s\n", (char *)data);
}
}
PROCESS_END();
}
Another question is how can I use callback function for UART data receive in contiki instead of waiting for data to be received?
