Tool/software: TI-RTOS
Hi everyone, I am a new for this work of UART. I working with cc13xx and a device of my company. This is a switchboard with which I have to turn on / off led through the serial. Can anybody give me some clue? Thanks so much!
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: TI-RTOS
Hi everyone, I am a new for this work of UART. I working with cc13xx and a device of my company. This is a switchboard with which I have to turn on / off led through the serial. Can anybody give me some clue? Thanks so much!
#include "contiki.h" #include "dev/serial-line.h" #include "dev/leds.h" #include "dev/cc26xx-uart.h" #include <stdio.h> #include <stdint.h> PROCESS(test_serial, "Serial line test process"); AUTOSTART_PROCESSES(&test_serial); /*-------------------------------------------------------*/ PROCESS_THREAD(test_serial, ev, data){ PROCESS_BEGIN(); printf("Wait\n"); leds_on(LEDS_YELLOW); while(1){ PROCESS_WAIT_EVENT_UNTIL((ev==serial_line_input_byte)); printf("Insert the character! \n"); if(ev == 0) { printf("Led off!\n"); leds_off(LEDS_YELLOW); ev=1; } else if(ev == 1) { printf("Led on!\n"); leds_toggle(LEDS_YELLOW); ev=0; }} PROCESS_END(); } /*--------------------------------------------------------------------------*/
If I use Contiki OS, I create this code but on Uart if write 1 don't success nothing. Can yuo help me?