Temp Publish

Revision:
0:4ccd12e1d789
diff -r 000000000000 -r 4ccd12e1d789 dateTime.hpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dateTime.hpp	Tue Jan 08 16:21:39 2019 +0000
@@ -0,0 +1,58 @@
+/*------------------------------------------------------------------------------
+Creator : Ben Gordon
+Date : 
+Module : ELEC351
+Project : ELEC351_GroupA
+Dependencies : 
+Purpose : 
+------------------------------------------------------------------------------*/
+#ifndef _dateTime_HPP
+#define _dateTime_HPP
+    #include "mbed.h"
+    #include "General.hpp"
+    //dateTime(PinName GREEN, PinName YELLOW, PinName RED);
+    
+    BYTE updateSystemTime();
+    
+    BYTE setTime(S_BYTE hours   = 0,
+                 S_BYTE minutes = 0,
+                 S_BYTE seconds = 0);
+     
+    //Setting the date and time
+    BYTE setDate(S_BYTE days    = 1,
+                 S_BYTE months  = 1,
+                 INT_32 years   = 1970);
+    
+    void addYear (INT_32 years  = 1);
+    
+    void addMonth(S_BYTE months =1);
+    void addDay  (S_BYTE days   =1);
+    void addHour (S_BYTE hours  =1);
+    void addMin  (S_BYTE minutes=1);
+    void addSec  (S_BYTE seconds=1);
+    
+    BYTE confirmDate();
+    char* getSetDate();
+    char* getSetTime();
+    
+    char* startEditDate();
+    char* startEditTime();
+    void   endEdit();
+    
+    char* getSystemDateTime();
+    //-----------------------------------
+    BYTE checkStruct(struct tm check);
+    
+    char* printDate(struct tm _time_struct);
+    
+    char* printTime(struct tm _time_struct);
+    struct tm getRawTime();
+    
+    signed INT_32 getYear(struct tm _time_struct);
+    BYTE          getMonth(struct tm _time_struct);
+    BYTE          getDay(struct tm _time_struct);
+    BYTE          getHour(struct tm _time_struct);
+    BYTE          getMin(struct tm _time_struct);
+    BYTE          getSec(struct tm _time_struct);
+#endif
+