#include "common.h"
#include "uif.h"

const char PROMPT[] = "demo>";

extern void led_test(int a,char** b);
extern void i2c_demo(int a,char** b);
extern void rtc_demo(int a,char** b);
extern void adc_pdb_demo(int a,char** b);
extern void tsi_demo(int a,char** b);
extern void irq_demo(int a,char** b);
extern void usb_device_demo(int a,char** b);
extern void irda_demo(int a, char** b);


void test_flexbus(void);

UIF_CMD UIF_CMDTAB[] =
{
    UIF_CMD_HELP
    {"led",0,1,0,led_test,"LED Demo",""},
    {"i2c",0,1,0,i2c_demo,"I2C Demo",""},
    {"rtc",0,1,0,rtc_demo,"RTC Demo",""},
    {"adc",0,1,0,adc_pdb_demo,"ADC/PDB Demo",""},
    {"tsi",0,1,0,tsi_demo,"TSI Demo",""},
    {"irq",0,1,0,irq_demo,"GPIO IRQ Demo",""},
    {"usb",0,1,0,usb_device_demo,"USB Device Demo",""},
	{"irda",0,1,0,irda_demo,"Irda Demo",""}
};      

UIF_SETCMD UIF_SETCMDTAB[] =
{
   {NULL, 0,1,NULL,""},     
};

const int UIF_NUM_CMD    = UIF_CMDTAB_SIZE;
const int UIF_NUM_SETCMD = UIF_SETCMDTAB_SIZE;

void main(void)
{
  
    printf("***********************************\r\n\r\n");
    printf("      Kinetis Tower board Demo\r\n");
    printf("***********************************\r\n\r\n");
	
    uif_cmd_help(1, NULL);
    for(;;)
    {
        printf(PROMPT);
        run_cmd();
    }  
}
