Wolfgang Praschk
/
rtc_class2
rtc_class2
Fork of rtc_class by
Diff: Date.cpp
- Revision:
- 11:83c6939656e5
- Parent:
- 10:83be0e4edb52
diff -r 83be0e4edb52 -r 83c6939656e5 Date.cpp --- a/Date.cpp Thu Apr 23 10:44:24 2015 +0000 +++ b/Date.cpp Thu Apr 30 10:54:02 2015 +0000 @@ -1,21 +1,6 @@ -/*********************************** -name: date.cpp Version: 0.5 -author: PE HTL BULME -email: pe@bulme.at -description: - Real Time Clock (RTC8563) on HIMBED M0 - LPC11U24 - class Date inherited from class RTC8563 - Example methode GetDay implemented -ToDo: - implement GetYear, GetMonth; - Constructor to initialize Date on RTC - Alarm methode -***********************************/ - #include "mbed.h" #include "Date.h" -// https://developer.mbed.org/teams/HIMBED_3AHELI/code/rtc_func/wiki/Klasse-Date-von-RTC8563-ableiten uint8_t Date::bcdToUint(uint8_t const nybbles) { uint8_t result; @@ -25,9 +10,8 @@ string Date::toString(uint8_t value) { - //return std::to_string(value); // ab C++ version 11 char buffer[2]; - sprintf (buffer, "%d", value); // ToString() + sprintf (buffer, "%d", value); return buffer; } @@ -36,7 +20,6 @@ uint8_t day = rtc_read(DAYS); return bcdToUint(day & 0x3F); } -// ueberladene Methoden von GetDay uint8_t Date::GetDay(int value) { return value;