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:
Sat Nov 14 02:43:33 2015 +0000
Revision:
9:fe2c9b3a312b
Parent:
7:dc29f6647486
Child:
12:a89096944f20
slideshow working

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