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

Revision:
12:a89096944f20
Parent:
9:fe2c9b3a312b
--- a/main.cpp	Mon Nov 16 23:29:15 2015 +0000
+++ b/main.cpp	Sun Jan 31 01:02:36 2016 +0000
@@ -44,10 +44,8 @@
 void checkForAlarm(void)
 {
     struct tm                   *tmStruct;
-    time_t                      timeValue;
 
-    timeValue=time(NULL);
-    tmStruct=localtime(&timeValue);
+    RTC_Get(&tmStruct);
     
     if (tmStruct->tm_min!=lastCheckedMinute)
     {
@@ -63,54 +61,28 @@
     }
 }
 
-#include "stm32746g_discovery_audio.h"
-
-//uint16_t buffer1[2000];
-void BSP_AUDIO_OUT_TransferComplete_CallBack()
-{
-    DPrintf("***1");
-    BSP_AUDIO_OUT_Stop(CODEC_PDWN_SW);
-}
-void BSP_AUDIO_OUT_HalfTransfer_CallBack()
-{
-    DPrintf("***2");
-    BSP_AUDIO_OUT_Stop(CODEC_PDWN_SW);
-}
-
-
-
 int main()
 {
     debug_Init();
 
-    DPrintf("WakeupLight - Hardware v%08X.\r\n",BSP_GetVersion());
+    RTC_Init();
+
+    DPrintf("WakeupLight - Hardware v%08X @ %u MHz.\r\n",BSP_GetVersion(),(HAL_RCC_GetSysClockFreq()/1000/1000));
 
     OnBoardLED_Init();
 
+    TM_RNG_Init();
+
     LED_Init();
 
+    Sound_Init();
+
     SD_Init();
 
     UI_Init();
 
     Config_Init();
 
-/*
-// OUTPUT_DEVICE_SPEAKER OUTPUT_DEVICE_BOTH
-uint8_t xxx=BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_HEADPHONE,100,8000);
-DPrintf("resilt %u\r\n",xxx);
-uint32_t index;
-for (index=0;index<100;index++)
-{
-    if ((index % 2)==0)
-        buffer1[index]=0x0000;
-    else
-        buffer1[index]=0x7000;
-}
-   
-BSP_AUDIO_OUT_Play(buffer1, sizeof(buffer1)*sizeof(uint16_t));
-*/
-
     for (;;)
     {
         checkForAlarm();