Ticker.h 864 B

12345678910111213141516171819202122232425262728
  1. #ifndef _TICKER_H
  2. #define _TICKER_H
  3. #include "Arduino.h"
  4. #define _TASK_SLEEP_ON_IDLE_RUN // Enable 1 ms SLEEP_IDLE powerdowns between tasks if no callback methods were invoked during the pass
  5. #define _TASK_STATUS_REQUEST // Compile with support for StatusRequest functionality - triggering tasks on status change events in addition to time only
  6. #define _TASK_WDT_IDS // Compile with support for wdt control points and task ids
  7. #define _TASK_PRIORITY // Support for layered scheduling priority
  8. #define _TASK_TIMEOUT // Support for overall task timeout
  9. #define _TASK_OO_CALLBACKS
  10. #include <TaskSchedulerDeclarations.h>
  11. class Ticker : public Task {
  12. public:
  13. Ticker(Scheduler* aS, Task* aCalc, StatusRequest* aM);
  14. ~Ticker() {};
  15. bool Callback();
  16. private:
  17. Task *iCalc;
  18. StatusRequest* iMeasure;
  19. };
  20. #endif