![](/media/cache/profiles/142c65e00f4f7cf2e6c4c996e34005df.50x50_q85.jpg)
Clock with Real-Time Clock (RTC-8564) and I2C LCD module(SB1062B).
Dependencies: DebouncedEdgeIn I2cLCD_cursor Rtc8564 mbed beep
Model/Clock.h
- Committer:
- togayan
- Date:
- 2014-02-22
- Revision:
- 3:061cccf4093a
- Parent:
- 2:6f0158399eff
- Child:
- 4:75ed86b78045
File content as of revision 3:061cccf4093a:
#ifndef CLOCK_H #define CLOCK_H #include "mbed.h" #include <vector> #include "I_NotifyUpdate.h" #include "I_SetPresentTime.h" #include "I_SetMode.h" #include "OperationMode.h" namespace Model { class Clock { public: Clock(I_NotifyUpdate* notifyUpdate, I_SetPresentTime* setPresentTime); void addSetMode(I_SetMode* setMode); void initialize(); void renew(); struct tm* getDateTime(); void informHalfSec(); void requestModeChange(); void requestIncrementValue(); void requestDecrementValue(); private: I_NotifyUpdate* m_notifyUpdate; I_SetPresentTime* m_setPresentTime; struct tm m_dateTime; OperationMode m_mode; std::vector<I_SetMode*> m_setModes; void notifyMode(); int getDays(); void decideDayOfMonth(); void decideDayOfWeek(); }; } #endif // CLOCK_H