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
UI_Main.cpp
- Committer:
- the_sz
- Date:
- 2015-10-29
- Revision:
- 3:ecf7f1f8d749
- Child:
- 5:13c70bcde7f6
File content as of revision 3:ecf7f1f8d749:
#include "WakeupLight.h" int32_t timeOut; void UI_MainHandler(UI_REASON_ENUM reason,uint32_t index,UI_STRUCT *ui) { switch (reason) { case UR_CLICK: if (index==0) UI_Show(&uiClock); else if (index==1) UI_Show(&uiClockInWords); else if (index==2) UI_Show(&uiWakeup); else if (index==3) LED_StartAnimation(LAE_WAKEUP); else if (index==4) LED_StartAnimation(LAE_OFF); break; case UR_TIMER: if ((time(NULL)-timeOut)>10) UI_Show(&uiClock); break; case UR_SHOW: timeOut=time(NULL); break; } }