John Mitchell / lpc4088_displaymodule_GC500_2_5inch

Dependencies:   DMBasicGUI DMSupport

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GCRealTimeClock.h Source File

GCRealTimeClock.h

00001 #ifndef GCREALTIMECLOCK_H
00002 #define GCREALTIMECLOCK_H
00003 
00004 #include "mbed.h"
00005 #include "DMBoard.h"
00006 
00007 #include "USBHostGC.h"
00008 
00009 /*
00010     This class contains functions that deal with the real time clock [RTC] 
00011     in the GC. All the functions are static, and this class cannot be instantiated.
00012 */
00013 
00014 class GCRealTimeClock {
00015 public: 
00016     static bool GetGCClockTime(USBDeviceConnected* usbDevice, USBHostGC* usbHostGC, time_t *clockTime);
00017     static bool SetLPC4088RealTimeClockToMatchGC(USBDeviceConnected* usbDevice, USBHostGC* usbHostGC);
00018 
00019 private:
00020     // Private constructor - so this class cannot be instantiated
00021     GCRealTimeClock();
00022     
00023     static bool GetTimeFieldsFromGC(USBDeviceConnected* usbDevice, 
00024                                     USBHostGC* usbHostGC, 
00025                                     char *gcSecondsResponse, 
00026                                     char *gcMinutesResponse, 
00027                                     char *gcHoursResponse, 
00028                                     char *gcDateResponse, 
00029                                     char *gcMonthResponse, 
00030                                     char *gcYearResponse);
00031                                     
00032     static void MakeTimeValueFromGCTimeFields(struct tm *timeValue,
00033                                               char *gcSecondsResponse, 
00034                                               char *gcMinutesResponse, 
00035                                               char *gcHoursResponse, 
00036                                               char *gcDateResponse, 
00037                                               char *gcMonthResponse, 
00038                                               char *gcYearResponse);
00039 
00040 };
00041 
00042 #endif // GCREALTIMECLOCK_H