Wakeup Light with touch user interface, anti-aliased Font, SD card access and RTC usage on STM32F746NG-DISCO board

Dependencies:   BSP_DISCO_F746NG_patch_fixed LCD_DISCO_F746NG TS_DISCO_F746NG FATFileSystem TinyJpgDec_interwork mbed-src

Revision:
2:80026d18fcf3
Parent:
1:35e2ad5cd1fe
Child:
3:ecf7f1f8d749
--- a/main.cpp	Thu Oct 29 05:00:04 2015 +0000
+++ b/main.cpp	Thu Oct 29 12:59:54 2015 +0000
@@ -1,34 +1,26 @@
 #include "WakeupLight.h"
 
-LCD_DISCO_F746NG lcd;
-TS_DISCO_F746NG ts;
+    UI_STRUCT ui;
 
 int main()
 {
-    char buffer[100];
-    int counter=0;
-
     debug_Init();
 
-    DPrintf("WakeupLight.\r\n");
+    DPrintf("WakeupLight - Hardware v%08X.\r\n",BSP_GetVersion());
 
     OnBoardLED_Init();
 
     LED_Init();
 
-    BSP_LCD_SetTextColor(LCD_COLOR_RED);
-    BSP_LCD_SetBackColor(LCD_COLOR_BLACK);
+    UI_Init();
 
-    BSP_LCD_SetFont(&display_font_12x22);
-    
-    LED_StartAnimation(LAE_WAKEUP);
+    //LED_StartAnimation(LAE_WAKEUP);
 
-    while(1)
-    {
-        wait(0.2);
+    ui.flags=UI_FLAG_TYPE_CLOCK;
+    UI_Show(&ui);
 
-        snprintf(buffer,sizeof(buffer),"ABC %u",counter);
-        counter++;
-        lcd.DisplayStringAt(0, LINE(1), (uint8_t *)buffer, CENTER_MODE);
+    for (;;)
+    {
+        UI_Poll();
     }
 }