![](/media/cache/group/HIMBED0.jpg.50x50_q85.jpg)
functions from rtc_func transferred to class RTC8563
Fork of rtc_func by
Goto Inhalt
main.cpp@11:83c6939656e5, 2015-04-30 (annotated)
- Committer:
- Gm_070
- Date:
- Thu Apr 30 10:54:02 2015 +0000
- Revision:
- 11:83c6939656e5
- Parent:
- 9:83be0e4edb52
1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bulmecisco | 0:32ae5fd83722 | 1 | #include "mbed.h" |
bulmecisco | 2:f75062350241 | 2 | #include "const.h" |
bulmecisco | 2:f75062350241 | 3 | #include "RTC8563.h" |
bulmecisco | 2:f75062350241 | 4 | #include "string" |
bulmecisco | 3:c6081814064d | 5 | #include "Date.h" |
bulmecisco | 6:ebe2350041f1 | 6 | #include "DateString.h" |
bulmecisco | 6:ebe2350041f1 | 7 | |
bulmecisco | 0:32ae5fd83722 | 8 | Serial pc(USBTX, USBRX); |
bulmecisco | 2:f75062350241 | 9 | |
bulmecisco | 3:c6081814064d | 10 | uint8_t year, month, day; |
bulmecisco | 3:c6081814064d | 11 | |
bulmecisco | 0:32ae5fd83722 | 12 | int main() |
bulmecisco | 0:32ae5fd83722 | 13 | { |
Gm_070 | 11:83c6939656e5 | 14 | DateString rtc; |
bulmecisco | 2:f75062350241 | 15 | |
bulmecisco | 0:32ae5fd83722 | 16 | while(1) { |
bulmecisco | 8:54a6f83a2339 | 17 | pc.printf("DateString.Day: %i\n", rtc.GetDay()); |
bulmecisco | 8:54a6f83a2339 | 18 | pc.printf("DateString.NextDay: %i\n", rtc.GetNextDay()); |
bulmecisco | 8:54a6f83a2339 | 19 | pc.printf("Ueberladen GetDay: %s\n", rtc.GetDay("Where am I?")); |
bulmecisco | 0:32ae5fd83722 | 20 | wait(1); |
bulmecisco | 0:32ae5fd83722 | 21 | } |
bulmecisco | 8:54a6f83a2339 | 22 | } |
bulmecisco | 8:54a6f83a2339 | 23 | |
bulmecisco | 8:54a6f83a2339 | 24 | |
bulmecisco | 8:54a6f83a2339 | 25 | |
bulmecisco | 8:54a6f83a2339 | 26 | |
bulmecisco | 8:54a6f83a2339 | 27 |