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@5:13c70bcde7f6, 2015-11-09 (annotated)
- Committer:
- the_sz
- Date:
- Mon Nov 09 17:53:22 2015 +0000
- Revision:
- 5:13c70bcde7f6
- Parent:
- 3:ecf7f1f8d749
- Child:
- 7:dc29f6647486
color button
Who changed what in which revision?
User | Revision | Line number | New 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 | 5:13c70bcde7f6 | 5 | void UI_MainHandler(UI_REASON_ENUM reason,int32_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 | 5:13c70bcde7f6 | 20 | else if (index==5) |
the_sz | 5:13c70bcde7f6 | 21 | UI_Show(&uiColorTest); |
the_sz | 3:ecf7f1f8d749 | 22 | break; |
the_sz | 3:ecf7f1f8d749 | 23 | |
the_sz | 3:ecf7f1f8d749 | 24 | case UR_TIMER: |
the_sz | 3:ecf7f1f8d749 | 25 | if ((time(NULL)-timeOut)>10) |
the_sz | 3:ecf7f1f8d749 | 26 | UI_Show(&uiClock); |
the_sz | 3:ecf7f1f8d749 | 27 | break; |
the_sz | 3:ecf7f1f8d749 | 28 | |
the_sz | 3:ecf7f1f8d749 | 29 | case UR_SHOW: |
the_sz | 3:ecf7f1f8d749 | 30 | timeOut=time(NULL); |
the_sz | 3:ecf7f1f8d749 | 31 | break; |
the_sz | 3:ecf7f1f8d749 | 32 | } |
the_sz | 3:ecf7f1f8d749 | 33 | } |