/*
 * File:		main.c
 * Purpose:		TSI Example
 *
 *                      Toggle the LED's on the tower board by pressing the TSI
 *                        touch pads
 *
 */

#include "common.h"
#include "TSI.h"
#include "misc.h"

void GPIO_Init(void);

/********************************************************************/
void tsi_demo(int a,char** b)
{
    printf("****Kinetis TSI Demo****\r\n");
    printf("****Press any key to exit...****\r\n");
    TSI_Init();
    GPIO_Init();
    TSI_SelfCalibration();
    
    START_SCANNING;
    ENABLE_EOS_INT;
    ENABLE_TSI;
    
    while(1)
    {
        if(char_present())
        {// if pressing any key, exit this demo
            break;
        }
    }
    in_char();
    printf("\r\n");  
    TSI_Deinit();
}
/********************************************************************/

