Pseudo real-time clock using Ticker interruption

Files at this revision

API Documentation at this revision

Comitter:
s_inoue_mbed
Date:
Sat Sep 20 14:25:38 2014 +0000
Parent:
0:9ab044e24d20
Commit message:
Documentation fixed.

Changed in this revision

PseudoRTC.h Show annotated file Show diff for this revision Revisions of this file
--- a/PseudoRTC.h	Sat Sep 20 14:18:46 2014 +0000
+++ b/PseudoRTC.h	Sat Sep 20 14:25:38 2014 +0000
@@ -21,6 +21,26 @@
 
 #include "mbed.h"
 
+/**  Example:
+ * @code
+ * #include "mbed.h"
+ * #include "PseudoRTC.h"
+ *
+ * PseudoRTC c;
+ *
+ * main()
+ * {
+ *     /* Example: September 20, 2014, 21:05:30
+ *     c.setTime(2014, 09, 20, 21, 05, 30);
+ * 
+ *     while(true) {
+ *         printf("%04d/%02d/%02d %02d:%02d:%02d\r\m", c.getYear(), c.getMonth(), c.getDay(), c.getHour(), c.getMinute(), c.getSecond());
+ *         wait(1);
+ *     }
+ * }
+ * @endcode
+ */
+
 class PseudoRTC
 {
 public: