![](/media/cache/group/HIMBED0.jpg.50x50_q85.jpg)
functions from rtc_func transferred to class RTC8563
Fork of rtc_func by
Goto Inhalt
Diff: main.cpp
- Revision:
- 10:83960ae8a0ee
- Parent:
- 5:fc8c66a7c87a
--- a/main.cpp Thu Apr 23 09:02:20 2015 +0000 +++ b/main.cpp Thu Apr 30 10:48:18 2015 +0000 @@ -3,11 +3,11 @@ author: PE HTL BULME email: pe@bulme.at description: - Real Time Clock (RTC8563) - on HIMBED M0 - LPC11U24 + Real Time Clock (RTC8563) + on HIMBED M0 - LPC11U24 class Date inherited from class RTC8563 - Example methode GetDay implemented -ToDo: + Example methode GetDay implemented +ToDo: implement year, month; ***********************************/ #include "mbed.h" @@ -15,17 +15,25 @@ #include "RTC8563.h" #include "string" #include "Date.h" - +#include "DateString.h" + Serial pc(USBTX, USBRX); - + uint8_t year, month, day; int main() { - Date rtc; // instanziieren des Objektes rtc - + Date *pBoth; + DateString ds; // instanziieren des Objektes rtc + Date d; + while(1) { - pc.printf("Date.Day: %i\n", rtc.GetDay()); + pBoth = &d; + pc.printf("DateString.Day: %i\n", pBoth->GetDay()); + pc.printf("Ueberladen Day: %s\n", pBoth->GetDay("where am I?")); + pBoth=&ds + pc.printf("DateString.NextDay: %i\n", pBoth->GetNextDay()); + pc.printf("Ueberladen Day: %s\n", pBoth->GetDay("where am I?")); wait(1); } } \ No newline at end of file