
#include "Startup_Animation.h"

StartupAnimationPlayStruct  StartupAnimationPlay;

/******************************************************************************
函数：Startup_Animation_Reset
******************************************************************************/
void Startup_Animation_Reset(void)
{
  StartupAnimationPlay.FrameCnt = 0;
  StartupAnimationPlay.Timer    = 0;
}
/******************************************************************************
函数：Startup_Animation_Play_Service
*******************************************************************************/
void Startup_Animation_Play_Service(void)
{
  if (IO_ANIMATION_DISPLAY_ENABLE)
  {
    if (StartupAnimationPlay.FrameCnt < STARTUP_ANIMATION_TOTAL_FRAME)
    {
      if (StartupAnimationPlay.Timer == 0)
      {
        StartupAnimationPlay.FrameCnt++;
        GUI_Animation_Frame_Display(StartupAnimationPlay.FrameCnt);    //开机动画
        //GUI_Animation_Frame_Display(0);    //开机动画
      }
      StartupAnimationPlay.Timer++;
      if (StartupAnimationPlay.Timer >= (STARTUP_ANIMATION_FRAME_PERIOD / 10))
        StartupAnimationPlay.Timer = 0;
    }   
  }
 /* else 
    {
      TFT_LCD_Clear_Layer(LAYER_BEIJING);      //清开机LOGO         
      TFT_LCD_Clear_Layer(LAYER_BEIJING1); 
    }
    */
}
