Andrew Duda / Mbed 2 deprecated MbedClock

Dependencies:   4DGL-uLCD-SE EthernetInterface NTPClient mbed-rtos mbed SDFileSystem wavfile

Revision:
2:c939d0501184
Parent:
0:4e6ae21cbd31
--- a/Clock.h	Mon Dec 08 10:06:35 2014 +0000
+++ b/Clock.h	Mon Dec 08 23:30:49 2014 +0000
@@ -1,4 +1,5 @@
 #include "mbed.h"
+#include "rtos.h"
 #include "NTPClient.h"
 
 // AM/PM
@@ -15,16 +16,27 @@
 class Clock {
 public:
     Clock();
+    void setAlarmThread(Thread *aThread);
     
     void setTime(int hour, int minute, int period);
     void setTimezone(int timezone);
     
     int syncTime();
     
+    void setAlarm(int hour, int minute, int period);
+    void setTimer(int hours, int minutes);
+    void deleteAlarm();
+    bool alarmSet();
+    
     time_t getTime();
     int getTimezone();
-private:
-    int timezone;    
     
-    static bool isSet;
+
+private:
+    int timezone;
+    bool aSet;
+    Ticker alarmTicker;
+    Thread *alarmThread;
+    
+    void signalAlarm();
 };