For coursework of group 3 in SOFT564Z

Dependencies:   Motordriver ros_lib_kinetic

Revision:
5:207e0cd8b9de
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dateTime.hpp	Mon Dec 02 13:13:15 2019 +0000
@@ -0,0 +1,59 @@
+/*------------------------------------------------------------------------------
+Creator : Ben Gordon
+Date : 08/01/2019
+Module : ELEC351
+Note : Code Ripped from coursework of Group A for ELEC351
+------------------------------------------------------------------------------*/
+#ifndef _dateTime_HPP
+#define _dateTime_HPP
+    #include "mbed.h"
+    #include "General.hpp"
+    #include "Pins.h"
+    //dateTime(PinName GREEN, PinName YELLOW, PinName RED);
+    
+    //TEMPORARY FOR DEBUGGING//
+    //void errorReport(char* message);
+    
+    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