3 Programming Guide
I N T H I S C H A P T E R
·
·
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
common.h
Header file for API interfaces and Look up tables for thermistor.
main.xc
Main file which implements the demo functionality
3.1.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
int linear_interpolation(int adc_value)
Calculates temperatue based on linear interpolation.
This function has the following parameters:
adc_value
int value read from ADC
REV A