Clock with Real-Time Clock (RTC-8564) and I2C LCD module(SB1062B).

Dependencies:   DebouncedEdgeIn I2cLCD_cursor Rtc8564 mbed beep

/media/uploads/togayan/imgp0004s.jpg /media/uploads/togayan/lcdclock_circuit_rev4.png

Committer:
togayan
Date:
Mon Feb 17 08:13:21 2014 +0000
Revision:
2:6f0158399eff
Parent:
1:f8713c387a68
Child:
3:061cccf4093a
test

Who changed what in which revision?

UserRevisionLine numberNew contents of line
togayan 1:f8713c387a68 1 #ifndef CLOCK_H
togayan 1:f8713c387a68 2 #define CLOCK_H
togayan 1:f8713c387a68 3
togayan 1:f8713c387a68 4 #include "mbed.h"
togayan 1:f8713c387a68 5 #include "I_NotifyUpdate.h"
togayan 1:f8713c387a68 6 #include "I_SetPresentTime.h"
togayan 1:f8713c387a68 7 #include "DateTime.h"
togayan 2:6f0158399eff 8 #include "OperationMode.h"
togayan 1:f8713c387a68 9
togayan 1:f8713c387a68 10 namespace Model
togayan 1:f8713c387a68 11 {
togayan 1:f8713c387a68 12 class Clock
togayan 1:f8713c387a68 13 {
togayan 1:f8713c387a68 14 public:
togayan 1:f8713c387a68 15 Clock(I_NotifyUpdate* notifyUpdate, I_SetPresentTime* setPresentTime);
togayan 1:f8713c387a68 16
togayan 1:f8713c387a68 17 void initialize();
togayan 1:f8713c387a68 18 void renew();
togayan 2:6f0158399eff 19 struct tm* getDateTime();
togayan 1:f8713c387a68 20 void informHalfSec();
togayan 2:6f0158399eff 21 void requestModeChange();
togayan 2:6f0158399eff 22 void requestIncrementValue();
togayan 2:6f0158399eff 23 void requestDecrementValue();
togayan 1:f8713c387a68 24
togayan 1:f8713c387a68 25 private:
togayan 1:f8713c387a68 26 I_NotifyUpdate* m_notifyUpdate;
togayan 1:f8713c387a68 27 I_SetPresentTime* m_setPresentTime;
togayan 2:6f0158399eff 28 struct tm m_dateTime;
togayan 2:6f0158399eff 29 OperationMode m_mode;
togayan 2:6f0158399eff 30
togayan 2:6f0158399eff 31 void notifyMode();
togayan 2:6f0158399eff 32 int getDays();
togayan 2:6f0158399eff 33 void decideDayOfMonth();
togayan 2:6f0158399eff 34 void decideDayOfWeek();
togayan 1:f8713c387a68 35 };
togayan 1:f8713c387a68 36 }
togayan 1:f8713c387a68 37
togayan 1:f8713c387a68 38 #endif // CLOCK_H