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: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
Diff: src/ConfigurationHandler/Controls/TimerControl.h
- Revision:
- 157:0d79678ed00f
- Parent:
- 156:44f87c5a83ae
- Child:
- 217:d5a2ff093319
diff -r 44f87c5a83ae -r 0d79678ed00f src/ConfigurationHandler/Controls/TimerControl.h
--- a/src/ConfigurationHandler/Controls/TimerControl.h Fri Sep 30 13:37:47 2016 +0000
+++ b/src/ConfigurationHandler/Controls/TimerControl.h Fri Sep 30 13:57:45 2016 +0000
@@ -11,6 +11,12 @@
#include <stdio.h>
#include <vector>
+typedef enum {
+ TIMER_CONTROL_OK,
+ TIMER_CONTROL_ERROR,
+ TIMER_CONTROL_DESTROY
+} TimerError_t;
+
class TimerControl
{
private:
@@ -21,7 +27,7 @@
unsigned long startTime;
unsigned int duration;
unsigned long actualStartTime;
-
+
enum State {
STATE_OFF,
STATE_RUNNING,
@@ -42,26 +48,26 @@
std::string getControlFile(void) const {
return controlFile;
}
-
+
std::string getOutput(void) const {
return output;
}
-
+
unsigned long getStartTime() const {
return startTime;
}
bool timerStart(void);
bool timerStop(void);
-
+
void startFeed(void);
void stopFeed(void);
-
+
void start(void);
- void update(void);
-
+ TimerError_t update(void);
+
void cleanup(void);
-
+
// unregister the control with the output task
void unregisterControl(void);
