Pseudo real-time clock using Ticker interruption
Revision 1:fb8fd750e935, committed 2014-09-20
- 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 |
diff -r 9ab044e24d20 -r fb8fd750e935 PseudoRTC.h --- 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: