TRC

Dependents:   RTC_terminal HorlogeSimple

Revision:
1:b85409cf9f7b
Parent:
0:f17b3622fae1
Child:
2:1a77823cf4c9
--- a/RTC_IUT.h	Fri May 29 16:45:33 2020 +0000
+++ b/RTC_IUT.h	Sat May 30 16:09:00 2020 +0000
@@ -32,18 +32,29 @@
 ///
 /// Example:
 /// @code
-/// RTC rtc;
+#include "mbed.h"
+#include "RTC_IUT.h"
+Rtc rtc;
 ///
-/// void main() {
-///     bool success;
-///     char TimeTest[] = "05/29/2011 14:15:18 (-6:00)";
-///     char buf[50];
-///     success = rtc.SetTime(TimeTest);
-///     rtc.GetTimeString(buf);
-///     printf("success: %i, time: %s\n", success, buf);
-/// }
-/// prints the following:
-/// success: 1, time: Sun May 29 14:15:18 2011 (tzo: -6:00)
+///int main()
+///{
+///    //char TimeTest[] = "31/12/1999 23:59:50";
+///    //char TimeTest[] = "19/01/2038 03:13:50";
+///    char TimeTest[] = "03/06/1970 10:00:00";
+///    time_t epoc;
+///    char buf[50];
+///    rtc.SetTimeString(TimeTest);
+///    rtc.GetTimeString(buf);
+///    epoc =rtc.GetTimeValue();
+///    printf("epoc: %8X, time: %s\r\n", epoc, buf);
+///    while(1) {
+///        rtc.SetYear(2020);   // Set the year
+ ///       rtc.GetTimeString(buf);  // read date time string DD:MM:YYY hh:mm:ss
+///        epoc =rtc.GetTimeValue();  // Read second since 01/01/1970
+///        printf("epoc: %8X, time: %s\r\n", epoc, buf);
+///        wait(0.9999);
+///    }
+///}
 /// @endcode
 ///
 class Rtc