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 Nov 12 21:21:48 2015 +0000
Revision:
7:dc29f6647486
Parent:
5:13c70bcde7f6
Child:
9:fe2c9b3a312b
f746 patch used

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 7:dc29f6647486 3 typedef enum
the_sz 7:dc29f6647486 4 {
the_sz 7:dc29f6647486 5 LUS_CLOCK,
the_sz 7:dc29f6647486 6 LUS_CLOCK_IN_WORDS,
the_sz 7:dc29f6647486 7
the_sz 7:dc29f6647486 8 } LAST_USED_SCREENSAVER_ENUM;
the_sz 7:dc29f6647486 9
the_sz 3:ecf7f1f8d749 10 int32_t timeOut;
the_sz 7:dc29f6647486 11 LAST_USED_SCREENSAVER_ENUM lastUsedScreensaver=LUS_CLOCK;
the_sz 3:ecf7f1f8d749 12
the_sz 5:13c70bcde7f6 13 void UI_MainHandler(UI_REASON_ENUM reason,int32_t index,UI_STRUCT *ui)
the_sz 3:ecf7f1f8d749 14 {
the_sz 3:ecf7f1f8d749 15 switch (reason)
the_sz 3:ecf7f1f8d749 16 {
the_sz 3:ecf7f1f8d749 17 case UR_CLICK:
the_sz 3:ecf7f1f8d749 18 if (index==0)
the_sz 7:dc29f6647486 19 {
the_sz 7:dc29f6647486 20 lastUsedScreensaver=LUS_CLOCK;
the_sz 3:ecf7f1f8d749 21 UI_Show(&uiClock);
the_sz 7:dc29f6647486 22 }
the_sz 3:ecf7f1f8d749 23 else if (index==1)
the_sz 7:dc29f6647486 24 {
the_sz 7:dc29f6647486 25 lastUsedScreensaver=LUS_CLOCK_IN_WORDS;
the_sz 3:ecf7f1f8d749 26 UI_Show(&uiClockInWords);
the_sz 7:dc29f6647486 27 }
the_sz 3:ecf7f1f8d749 28 else if (index==2)
the_sz 7:dc29f6647486 29 UI_WakeupShow();
the_sz 3:ecf7f1f8d749 30 else if (index==3)
the_sz 3:ecf7f1f8d749 31 LED_StartAnimation(LAE_WAKEUP);
the_sz 3:ecf7f1f8d749 32 else if (index==4)
the_sz 3:ecf7f1f8d749 33 LED_StartAnimation(LAE_OFF);
the_sz 5:13c70bcde7f6 34 else if (index==5)
the_sz 5:13c70bcde7f6 35 UI_Show(&uiColorTest);
the_sz 3:ecf7f1f8d749 36 break;
the_sz 3:ecf7f1f8d749 37
the_sz 3:ecf7f1f8d749 38 case UR_TIMER:
the_sz 3:ecf7f1f8d749 39 if ((time(NULL)-timeOut)>10)
the_sz 7:dc29f6647486 40 {
the_sz 7:dc29f6647486 41 switch (lastUsedScreensaver)
the_sz 7:dc29f6647486 42 {
the_sz 7:dc29f6647486 43 case LUS_CLOCK: UI_Show(&uiClock); break;
the_sz 7:dc29f6647486 44 case LUS_CLOCK_IN_WORDS: UI_Show(&uiClockInWords); break;
the_sz 7:dc29f6647486 45 }
the_sz 7:dc29f6647486 46 }
the_sz 3:ecf7f1f8d749 47 break;
the_sz 3:ecf7f1f8d749 48
the_sz 3:ecf7f1f8d749 49 case UR_SHOW:
the_sz 3:ecf7f1f8d749 50 timeOut=time(NULL);
the_sz 3:ecf7f1f8d749 51 break;
the_sz 3:ecf7f1f8d749 52 }
the_sz 3:ecf7f1f8d749 53 }