#define  GLOBALS_API_RTC
#include "../app_Headers/g_includes.h"



/*-------------------------------------------------------------------------
* Function Name  : bsp_RTC_isr
* Description    : 
* Input          : 
* Output         : None
* Return         : None
* onther         : 
--------------------------------------------------------------------------*/
interrupt void bsp_RTC_isr(void)
{        
    //glztestTime++;
    //if(glztestTime > 1) 
    {
    //glztestTime = 0;
       glztest = glztest + 1;
       if(glztest>200) glztest = 200;
       
    }
    
    
    
    
    if(KeyAddIn == PushDown)
    {
	    if(G_Button.PushTime1 <= T_10s)
	    {
	      G_Button.PushTime1 ++;
	    }
    }
    if(KeySubIn == PushDown)
    {
	    if(G_Button.PushTime2 <= T_10s)
	    {
	      G_Button.PushTime2 ++;
	    }
    }

     
      if(XUN_HUAN == 1)
      {
         AutoTime++;
         if(AutoTime > T_3s) 
         {        
           AutoTime = 0;
            if((G_Button.LED_STEP >= 0)&&(G_Button.LED_STEP < MenuCn))
            {
                G_Button.LED_STEP ++;
                if(g_FRStep < MenuCn)
                {
                  g_FRStep++;
                }
               
            }
            else
            {
                G_Button.LED_STEP = 0;
                g_FRStep = 0;
            }
         } 
     }
     else 
     {
         AutoTime = 0;
     }
     Gui_ButtonProc((_Button*)&G_Button); 
     
    
    CPMUFLG_RTIF = ClearFlag;
}
