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

Committer:
the_sz
Date:
Thu Oct 29 18:09:31 2015 +0000
Revision:
3:ecf7f1f8d749
Child:
5:13c70bcde7f6
ui menu working, time() added

Who changed what in which revision?

UserRevisionLine numberNew contents of line
the_sz 3:ecf7f1f8d749 1 #include "WakeupLight.h"
the_sz 3:ecf7f1f8d749 2
the_sz 3:ecf7f1f8d749 3 int32_t timeOut;
the_sz 3:ecf7f1f8d749 4
the_sz 3:ecf7f1f8d749 5 void UI_MainHandler(UI_REASON_ENUM reason,uint32_t index,UI_STRUCT *ui)
the_sz 3:ecf7f1f8d749 6 {
the_sz 3:ecf7f1f8d749 7 switch (reason)
the_sz 3:ecf7f1f8d749 8 {
the_sz 3:ecf7f1f8d749 9 case UR_CLICK:
the_sz 3:ecf7f1f8d749 10 if (index==0)
the_sz 3:ecf7f1f8d749 11 UI_Show(&uiClock);
the_sz 3:ecf7f1f8d749 12 else if (index==1)
the_sz 3:ecf7f1f8d749 13 UI_Show(&uiClockInWords);
the_sz 3:ecf7f1f8d749 14 else if (index==2)
the_sz 3:ecf7f1f8d749 15 UI_Show(&uiWakeup);
the_sz 3:ecf7f1f8d749 16 else if (index==3)
the_sz 3:ecf7f1f8d749 17 LED_StartAnimation(LAE_WAKEUP);
the_sz 3:ecf7f1f8d749 18 else if (index==4)
the_sz 3:ecf7f1f8d749 19 LED_StartAnimation(LAE_OFF);
the_sz 3:ecf7f1f8d749 20 break;
the_sz 3:ecf7f1f8d749 21
the_sz 3:ecf7f1f8d749 22 case UR_TIMER:
the_sz 3:ecf7f1f8d749 23 if ((time(NULL)-timeOut)>10)
the_sz 3:ecf7f1f8d749 24 UI_Show(&uiClock);
the_sz 3:ecf7f1f8d749 25 break;
the_sz 3:ecf7f1f8d749 26
the_sz 3:ecf7f1f8d749 27 case UR_SHOW:
the_sz 3:ecf7f1f8d749 28 timeOut=time(NULL);
the_sz 3:ecf7f1f8d749 29 break;
the_sz 3:ecf7f1f8d749 30 }
the_sz 3:ecf7f1f8d749 31 }