3 Programming Guide
IN TH I S C H A P T ER
Simple Demo
COM Port Demo
3.1 Simple Demo
3.1.1 Structure
All of the files required for operation are located in the app_sk_gpio_simple_demo/src directory.
The files that are need to be included for use of this component in an application are:
File
Description
Header file for API interfaces and Look up tables for thermistor.
common.h
Main file which implements the demo functionality
main.xc
3.1.2 API
void app_manager(chanend c_uartTX,
Polling uart RX and push button switches and send received commands to pro-
cess_data thread.
This function has the following parameters:
c_uartTX
c_chanRX
c_process
c_end
int linear_interpolation(int adc_value)
Calculates temperatue based on linear interpolation.
This function has the following parameters:
adc_value
REV A
chanend c_chanRX,
chanend c_process,
chanend c_end)
Channel to Uart TX Thread
Channel to Uart RX Thread
Channel to process data Thread
Channel to read data from process thread
int value read from ADC