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.
extras/EASettings.h
- Committer:
- richardparker
- Date:
- 2010-03-31
- Revision:
- 3:24fbf4dbd7e5
- Child:
- 4:f8f7f4f9c58d
File content as of revision 3:24fbf4dbd7e5:
// Copyright 2010 Richard Parker #ifndef MBED_EASETTINGS_H #define MBED_EASETTINGS_H #include "mbed.h" #include "../manager/EAHitHandler.h" class EALCD; class EATouchManager; class EAButton; class EATouch; /** * Class to handle setting up the peripherals on the EA star gazer board. * @author Richard Parker */ class EASettings: public EAHitHandler { public: enum State { STATE_IDLE, STATE_ENDED, STATE_PORTAL, STATE_DATE_DAY, STATE_DATE_MONTH, STATE_DATE_YEAR, STATE_DATE_HOUR, STATE_DATE_MINUTE, STATE_DATE_SECOND }; EASettings(EALCD& lcd, EATouch& touch, EATouchManager& manager); ~EASettings(); void start(); inline unsigned short size() { return 40; } virtual void actionHandler(EAHitBox* box, short x, short y); inline EASettings::State state() { return _state; } private: EALCD& _lcd; EATouch& _touch; EATouchManager& _manager; struct tm* _time; EAButton* _launchBox; EAButton* _returnBox; EAButton* _touchBox; EAButton* _dateBox; EAButton* _compassBox; EAButton* _nextBox; EAButton* _prevBox; EAButton* _incBox; EAButton* _decBox; EASettings::State _state; void _disableHitBoxs(); void _drawLaunchButton(); void _drawPortal(); void _drawDate(); EASettings::State _incDate(); EASettings::State _decDate(); EASettings::State _nextDate(); EASettings::State _prevDate(); void _enableDateButtons(); }; #endif