![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Rtc class
Fork of rtc_class by
DateString.cpp@6:a52551f2f398, 2015-04-30 (annotated)
- Committer:
- Andi104
- Date:
- Thu Apr 30 10:48:30 2015 +0000
- Revision:
- 6:a52551f2f398
RTC Class
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Andi104 | 6:a52551f2f398 | 1 | #include "DateString.h" |
Andi104 | 6:a52551f2f398 | 2 | #include "RTC8563.h" |
Andi104 | 6:a52551f2f398 | 3 | // 2. Methode überschreiben |
Andi104 | 6:a52551f2f398 | 4 | uint8_t DateString::GetDay() |
Andi104 | 6:a52551f2f398 | 5 | { |
Andi104 | 6:a52551f2f398 | 6 | //uint8_t day = rtc_read(DAYS); |
Andi104 | 6:a52551f2f398 | 7 | //return bcdToUint(day & 0x3F); |
Andi104 | 6:a52551f2f398 | 8 | uint8_t day = Date::GetDay(); //Aufruf der GetDay-Methode aus basisklasse Date mit Scope-Op |
Andi104 | 6:a52551f2f398 | 9 | //3. Erweitern von Methoden der Basisklasse |
Andi104 | 6:a52551f2f398 | 10 | day = day -5; |
Andi104 | 6:a52551f2f398 | 11 | return day; |
Andi104 | 6:a52551f2f398 | 12 | } |
Andi104 | 6:a52551f2f398 | 13 | |
Andi104 | 6:a52551f2f398 | 14 | uint8_t DateString::GetNextDay() |
Andi104 | 6:a52551f2f398 | 15 | { |
Andi104 | 6:a52551f2f398 | 16 | uint8_t day = GetDay(); |
Andi104 | 6:a52551f2f398 | 17 | return ++day; |
Andi104 | 6:a52551f2f398 | 18 | } |
Andi104 | 6:a52551f2f398 | 19 | |
Andi104 | 6:a52551f2f398 | 20 | string DateString::GetDay(string str) |
Andi104 | 6:a52551f2f398 | 21 | { |
Andi104 | 6:a52551f2f398 | 22 | string day = str + " In Date Day: " + toString(GetDay()); |
Andi104 | 6:a52551f2f398 | 23 | return day; |
Andi104 | 6:a52551f2f398 | 24 | } |
Andi104 | 6:a52551f2f398 | 25 |