PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 line
357B

  1. #ifndef Metro_h
  2. #define Metro_h
  3. #include <inttypes.h>
  4. class Metro
  5. {
  6. public:
  7. Metro(unsigned long interval_millis);
  8. Metro(unsigned long interval_millis, uint8_t autoreset);
  9. void interval(unsigned long interval_millis);
  10. char check();
  11. void reset();
  12. private:
  13. uint8_t autoreset;
  14. unsigned long previous_millis, interval_millis;
  15. };
  16. #endif