// BUSY_DRV monitoring void WaitNonBusy(void) // Stall program execution for as long as BUSY_DRV remains HIGH { while(LCD_BUSY_GetVal()) { LED0_PutVal(ON); // Enable LED to show that the LCD is busy } LED0_PutVal(OFF); }
void main(void) { /* Write your local variable definition here */ //TT_ptr = &tt; /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/ PE_low_level_init(); /*** End of Processor Expert internal initialization. ***/ /* Write your code here */ //TSS1_Configure(); //RTC_SetCV(65524); //RTC_Enable(); /* For example: for(;;) { } */ for(;;) { //RTC_Disable(); TSS_Task(); RTC_GetTimeSec(&ttyy); if(Key123_flag_L) { LED1_NegVal(); //Key123_flag_L = 0; } else { if(0 != RTC_GetTimeSec(&ttyy)) { ttyy = 0; } else { if((0 == (ttyy%5))&&(0 != ttyy)&&(0 == Key123_flag_L)) { //enable RTC for Wake up Touch scan //RTC_Enable(); // end of enable RTC LED0_PutVal(0); // before stop, need configuration TSI //TSI_EnterIntoStopMode(); //Cpu_SetStopMode(); asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); asm("NOP"); } } } } /*** Don't write any code pass this line, or it will be deleted during code generation. ***/ /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/ #ifdef PEX_RTOS_START PEX_RTOS_START(); /* Startup of the selected RTOS. Macro is defined by the RTOS component. */ #endif /*** End of RTOS startup code. ***/ /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/ for(;;){} /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/ } /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/