Esempio n. 1
0
/*** Function    : main
**   Parameters  : None
**   Return      : int
**   Description : It is entry point of program
**/
int main(void)
{
	stopWatchDog();
	lcdBegin();                       // Initiate the LCD
	while(1)
	{
    #if _LCD_TYPE_ == 1
	lcdSetCursor(1,0);
    lcdPrint(String1);
    __delay_ms__(LCD_REFRESH_DELAY);
    lcdSetCursor(2,0);
    lcdPrint(String2);
    __delay_ms__(LCD_REFRESH_DELAY);
    lcdSetCursor(3,0);
    lcdPrint(String3);
    __delay_ms__(LCD_REFRESH_DELAY);
    lcdSetCursor(4,0);
    lcdPrint(String4);
    __delay_ms__(LCD_REFRESH_DELAY);
    lcdClear();
    __delay_ms__(LCD_REFRESH_DELAY);
    #elif _LCD_TYPE_ == 2
	lcdSetCursor(1,0);
    lcdPrint(String1);
    __delay_ms__(LCD_REFRESH_DELAY);
    lcdSetCursor(2,0);
    lcdPrint(String2);
    __delay_ms__(LCD_REFRESH_DELAY);
    lcdClear();
    __delay_ms__(LCD_REFRESH_DELAY);
    #endif
	}
}
Esempio n. 2
0
File: main.c Progetto: pixma/ecs
void main(){
	char  cChoiceMenu;	
	lcdBegin();
	SplashScreenWindow();
	InitUartComm();
	delay( 1000 );
	key_init();
	ecs_MainMenu();	
	while( 1 )
	{		
		//pooling for the keypads to let the user to select the choice from the options shown...	
		cChoiceMenu = translateKeyCode( get_key() );
		
		if( cChoiceMenu == '3' ){
				//Sync Data operation mode....
				syncScreenActivity();
				clearLcdScreen();
				ecs_MainMenu();
		}
		else if( cChoiceMenu == '7' )
		{
			//Settings like date settings only...
			SettingActivity();
			clearLcdScreen();
			ecs_MainMenu();
		}
		else if( cChoiceMenu == 'B')
		{
			//Data Entry Mode operation....
			dataEntrySession();
			clearLcdScreen();
			ecs_MainMenu();
		}
		else
		{
			//catch the unallocated button as invalid and indicate the user about it...
		}				
	}
	
}