Wavetronix Click 500 (programmable controller) (CLK-500) - Developer Guide User Manual
Page 49
48
CHAPTER 4 • OPERATING FUNCTIONS AND MENU
///////////////////////////////////////////////////////////////
// ExampleCode4.1.C
///////////////////////////////////////////////////////////////
#use click500menu.lib
void Mode1( void );
void Setup1( void );
void TaskA( void );
void ChangeTextColor( int color );
#define STDIO_BLUE 34
#define STDIO_RED 31
#define STDIO_GREEN 32
#define STDIO_BLACK 30
void main( void )
{
ClickMenuAddMode( Mode1, Setup1, BLUE, 3, 2 );
ClickMenuAddTask( TaskA, YELLOW, 4, 0 );
ClickMenuStart();
}
void Mode1( void )
{
printf(“This is operating mode 1\n”);
ClickUtilPause(1000);
}
void Setup1( void )
{
printf(“\n\nSetting up Mode 1...\n”);
printf(“Selection 1 (yellow bank) = %d \n”,
ClickMenuSelection1());
printf(“Selection 2 (red bank) = %d \n”,
ClickMenuSelection2());
printf(“Finished\n”);
}
void TaskA( void )