Original programm

Dependencies:   RTC8563 mbed

Fork of rtc_class by HIMBED_3AHELI

DateString.cpp

Committer:
bulmecisco
Date:
2015-04-23
Revision:
9:83be0e4edb52
Parent:
8:54a6f83a2339

File content as of revision 9:83be0e4edb52:

#include "DateString.h"
#include "RTC8563.h"
// https://developer.mbed.org/teams/HIMBED_3AHELI/code/rtc_func/wiki/Klasse-DateString-von-Date-ableiten

// 2. Methode ueberschreiben
uint8_t DateString::GetDay()
{
    //uint8_t day = rtc_read(DAYS);
    //return bcdToUint(day & 0x3F);
    
    uint8_t day = Date::GetDay();  // Aufruf der GetDay-Methode aus Basisklasse Date mit Scope-Operator
    // 3. Erweitern von Methoden der Basisklasse
    day = day-5;
    return day;
} 

// 4. Definieren neuer Methoden 
uint8_t DateString::GetNextDay()  
{
    uint8_t day = GetDay();
    return ++day;
}