SliceKit GPIO Example Applications
};
3.2
COM Port Demo
3.2.1
Structure
All of the files required for operation are located in the
app_slicekit_simple_demo/src
directory.
The files that are need to be included for use of this component in an application are:
File
Description
common.h
Header file for API interfaces and Look up tables for thermistor. FIXME -
what about the uart
main.xc
Main file which implements the demo functionality
3.2.2
API
void app_manager(chanend c_uartTX,
chanend c_chanRX,
chanend c_process,
chanend c_end)
Polling uart RX and push button switches and send received commands to pro-
cess_data thread.
This function has the following parameters:
c_uartTX
Channel to Uart TX Thread
c_chanRX
Channel to Uart RX Thread
c_process
Channel to process data Thread
c_end
Channel to read data from process thread
void process_data(chanend c_process, chanend c_end)
process received data to see if received data is valid command or not Polling
switches to see for button press
This function has the following parameters:
c_process
Channel to receive data from app manager Thread
c_end
Channel to communicate to app manager thread
void uart_tx_string(chanend c_uartTX, unsigned char message[100])
Transmits byte by byte to the UART TX thread for an input string.
This function has the following parameters:
REV A