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.
Dependencies: DebouncedEdgeIn I2cLCD_cursor Rtc8564 mbed beep
ClockViewModel.h
00001 #ifndef CLOCK_VIEW_MODEL_H 00002 #define CLOCK_VIEW_MODEL_H 00003 00004 #include "mbed.h" 00005 #include "Model/Clock.h" 00006 #include "I2cLCD/I2cLCD.h" 00007 #include "Model/I_NotifyUpdate.h" 00008 #include "DebouncedEdgeIn/DebouncedEdgeIn.h" 00009 #include "beep.h" 00010 00011 namespace ViewModel 00012 { 00013 class ClockViewModel : public Model::I_NotifyUpdate, public Model::I_SetMode 00014 { 00015 public: 00016 ClockViewModel(I2cLCD& i2clcd, PinName set, PinName increment, PinName decrement, PinName sound1, PinName Sound2); 00017 void setClock(Model::Clock* clock); 00018 void initialize(); 00019 00020 virtual void dateTimeUpdated(); 00021 virtual void mode(Model::OperationMode mode); 00022 00023 private: 00024 I2cLCD& m_i2clcd; 00025 DebouncedEdgeIn m_set; 00026 DebouncedEdgeIn m_increment; 00027 DebouncedEdgeIn m_decrement; 00028 Beep m_beep; 00029 DigitalOut m_beepGnd; 00030 Model::Clock* m_clock; 00031 struct tm* m_dateTime; 00032 Model::OperationMode m_mode; 00033 static const char* WEEKDAYS[]; 00034 00035 void modeButtonOn(); 00036 void incrementButtonOn(); 00037 void decrementButtonOn(); 00038 void setCurSor(); 00039 }; 00040 } 00041 00042 #endif // CLOCK_VIEW_MODEL_H
Generated on Wed Jul 13 2022 02:25:45 by
1.7.2