functions from rtc_func transferred to class RTC8563

Dependencies:   RTC8563 mbed

Fork of rtc_func by HIMBED_3AHELI

Goto Inhalt

main.cpp

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

File content as of revision 8:54a6f83a2339:

/***********************************
name:   main.cpp    Version: 0.3
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 year, month;
***********************************/
#include "mbed.h"
#include "const.h"
#include "RTC8563.h"
#include "string"
#include "Date.h"
#include "DateString.h"

Serial pc(USBTX, USBRX);
 
uint8_t year, month, day;

int main()
{
    DateString rtc;  // instanziieren des Objektes rtc
 
    while(1) {
        pc.printf("DateString.Day: %i\n", rtc.GetDay());
        pc.printf("DateString.NextDay: %i\n", rtc.GetNextDay());
        pc.printf("Ueberladen GetDay: %s\n", rtc.GetDay("Where am I?"));
        wait(1);
    }
}