コード例 #1
0
ファイル: scrollable.c プロジェクト: Chen-Leon/DeviationX
void GUI_DrawScrollable(struct guiObject *obj)
{
    struct guiScrollable *scrollable = (struct guiScrollable *)obj;
    guiObject_t *head = objHEAD;
    objHEAD = scrollable->head;
    GUI_DrawObjects();
    objHEAD = head;
}
コード例 #2
0
ファイル: main.c プロジェクト: BatteryPower/smart_tft
/**
 * @function main
 * @brief entry point
 * @param none
 * @return dummy
 */
int32_t main(void) {

  timer_t tmInit;

  UcInit();       /*uc init; shall be the first one*/
  TicksInit();    /*software clock init*/
  LCD_Init();     /*start the ILI932X*/

  /* start a timer; backlight will be turned on once this timer will elapse
   * -> this avoids a white flash*/
  tmInit = GetTimeout(120);

  P2D_Init();
  GUI_Init();
  TouchScreenCalib(NULL);
  TouchScreenEnable();

  /*mount the file system*/
  disk_initialize(0);
  f_mount(0, &Fatfs);

  /* wait the 120ms timeout */
  while(IsTimerElapsed(tmInit) == false) DelayMs(1);
  BacklightInit();

  /*set the main task*/
  pCurrentTask = &SetupTask;

  /*main loop*/
  while(1) {

    /*execute the main task, if any*/
    if(pCurrentTask != NULL) pCurrentTask();

    /*GUI task*/
    GUI_DrawObjects();
    GUI_DBG_Task();

    /*software RTC task*/
    RtcTask();

    /*CPU limiter; reduces the power consumption*/
    DelayMs(1);
  }

  /*never arrive here*/
  return -1;
}
コード例 #3
0
ファイル: gui.c プロジェクト: NathanBarguss/deviation
void GUI_DrawScreen(void)
{
#ifdef DEBUG_DRAW
    printf("DrawScreen\n");
#endif
    /*
     * First we need to draw the main background
     *  */
    GUI_DrawBackground(0, 0, LCD_WIDTH, LCD_HEIGHT);
    /*
     * Then we need to draw any supporting GUI
     */
    FullRedraw = REDRAW_IF_NOT_MODAL;
    GUI_DrawObjects();
    FullRedraw = REDRAW_ONLY_DIRTY;
    LCD_ForceUpdate();
}