PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223242526
  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