/**************************************************************************//** * @brief Updates the digital clock. * *****************************************************************************/ void digitalClockUpdate(struct tm *time, bool redraw) { char clockString[16]; if (redraw) { GLIB_setFont(&gc, (GLIB_Font_t *)&GLIB_FontNumber16x20); gc.backgroundColor = White; gc.foregroundColor = Black; GLIB_clear(&gc); } sprintf(clockString, "%02d:%02d:%02d", time->tm_hour, time->tm_min, time->tm_sec); GLIB_drawString(&gc, clockString, strlen(clockString), 1, 52, true); /* Update display */ DMD_updateDisplay(); }
/**************************************************************************//** * @brief This function draws the initial display screen *****************************************************************************/ void GRAPHICS_ShowStatus(void) { GLIB_clear(&glibContext); GLIB_drawString(&glibContext, "EFR32 Sample App", 17, 5, 5, 0); DMD_updateDisplay(); }