Original programm

Dependencies:   RTC8563 mbed

Fork of rtc_class by HIMBED_3AHELI

Committer:
bulmecisco
Date:
Thu Apr 23 10:14:42 2015 +0000
Revision:
7:1e1e0af5d32e
Parent:
6:ebe2350041f1
Child:
8:54a6f83a2339
Punkt 1 bis 3: Methoden verwenden, ueberschreiben und erweitern in Klasse DateString

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bulmecisco 6:ebe2350041f1 1 #include "DateString.h"
bulmecisco 6:ebe2350041f1 2 #include "RTC8563.h"
bulmecisco 7:1e1e0af5d32e 3 // https://developer.mbed.org/teams/HIMBED_3AHELI/code/rtc_func/wiki/Klasse-DateString-von-Date-ableiten
bulmecisco 6:ebe2350041f1 4
bulmecisco 6:ebe2350041f1 5 // 2. Methode ueberschreiben
bulmecisco 6:ebe2350041f1 6 uint8_t DateString::GetDay()
bulmecisco 6:ebe2350041f1 7 {
bulmecisco 6:ebe2350041f1 8 //uint8_t day = rtc_read(DAYS);
bulmecisco 6:ebe2350041f1 9 //return bcdToUint(day & 0x3F);
bulmecisco 6:ebe2350041f1 10
bulmecisco 6:ebe2350041f1 11 uint8_t day = Date::GetDay(); // Aufruf der GetDay-Methode aus Basisklasse Date mit Scope-Operator
bulmecisco 6:ebe2350041f1 12 // 3. Erweitern von Methoden der Basisklasse
bulmecisco 6:ebe2350041f1 13 day = day-5;
bulmecisco 6:ebe2350041f1 14 return day;
bulmecisco 6:ebe2350041f1 15 }