Class that makes for easy scheduling of regular tasks in a soft real-time context.
Diff: BooleanTicker.h
- Revision:
- 0:9015010b5125
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BooleanTicker.h Mon May 26 17:09:32 2014 +0000 @@ -0,0 +1,27 @@ +/** + Generic Ticker implementation that sets a boolean flag at a regular interval + + 9/12/13 Andrew H. Fagg Original + +*/ + + +#ifndef BOOLEAN_TICKER_H +#define BOOLEAN_TICKER_H +#include "mbed.h" + +class BooleanTicker { + public: + BooleanTicker(float interval); + ~BooleanTicker(); + void clear(); + void set(); + bool getValue(); + private: + void BooleanTickerCallback(); + Ticker ticker; + bool value; + +}; + +#endif \ No newline at end of file