Class that makes for easy scheduling of regular tasks in a soft real-time context.
Embed:
(wiki syntax)
Show/hide line numbers
BooleanTicker.h
00001 /** 00002 Generic Ticker implementation that sets a boolean flag at a regular interval 00003 00004 9/12/13 Andrew H. Fagg Original 00005 00006 */ 00007 00008 00009 #ifndef BOOLEAN_TICKER_H 00010 #define BOOLEAN_TICKER_H 00011 #include "mbed.h" 00012 00013 class BooleanTicker { 00014 public: 00015 BooleanTicker(float interval); 00016 ~BooleanTicker(); 00017 void clear(); 00018 void set(); 00019 bool getValue(); 00020 private: 00021 void BooleanTickerCallback(); 00022 Ticker ticker; 00023 bool value; 00024 00025 }; 00026 00027 #endif
Generated on Tue Sep 6 2022 22:49:04 by
1.7.2