Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of rtc_func by
Date.h@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 | 3:c6081814064d | 1 | #include "mbed.h" |
bulmecisco | 3:c6081814064d | 2 | #include "const.h" |
bulmecisco | 3:c6081814064d | 3 | #include "RTC8563.h" |
bulmecisco | 4:a4d39c018c65 | 4 | #include "string" |
bulmecisco | 3:c6081814064d | 5 | |
bulmecisco | 3:c6081814064d | 6 | #ifndef DATE_H |
bulmecisco | 3:c6081814064d | 7 | #define DATE_H |
Gm_070 | 11:83c6939656e5 | 8 | class Date : public RTC8563 |
bulmecisco | 3:c6081814064d | 9 | { |
bulmecisco | 5:fc8c66a7c87a | 10 | protected: |
Gm_070 | 11:83c6939656e5 | 11 | uint8_t bcdToUint(uint8_t const nybbles); |
bulmecisco | 4:a4d39c018c65 | 12 | string toString(uint8_t value); |
bulmecisco | 4:a4d39c018c65 | 13 | |
bulmecisco | 3:c6081814064d | 14 | public: |
Gm_070 | 11:83c6939656e5 | 15 | Date() |
bulmecisco | 5:fc8c66a7c87a | 16 | { |
bulmecisco | 5:fc8c66a7c87a | 17 | } |
Gm_070 | 11:83c6939656e5 | 18 | uint8_t GetDay(); |
Gm_070 | 11:83c6939656e5 | 19 | uint8_t GetDay(int value); |
Gm_070 | 11:83c6939656e5 | 20 | string GetDay(string str); |
bulmecisco | 3:c6081814064d | 21 | }; |
bulmecisco | 3:c6081814064d | 22 | #endif |