![](/media/cache/profiles/4cd5a0b6bc293f1e306e0d23170d649c.jpg.50x50_q85.jpg)
rtc class
Fork of rtc_class by
Diff: Date.cpp
- Revision:
- 4:a4d39c018c65
- Parent:
- 3:c6081814064d
- Child:
- 5:fc8c66a7c87a
diff -r c6081814064d -r a4d39c018c65 Date.cpp --- a/Date.cpp Mon Apr 20 05:53:40 2015 +0000 +++ b/Date.cpp Mon Apr 20 08:35:58 2015 +0000 @@ -1,5 +1,4 @@ #include "mbed.h" -#include "const.h" #include "Date.h" // http://developer.mbed.org/teams/HIMBED_3AHELI/code/rtc_func/wiki/Homepage @@ -10,6 +9,14 @@ return result; } +string Date::toString(uint8_t value) +{ + //return std::to_string(value); // ab C++ version 11 + char buffer[2]; + sprintf (buffer, "%d", value); // ToString() + return buffer; +} + uint8_t Date::GetDay() { uint8_t day = rtc_read(DAYS);