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

26 行
504B

  1. #ifndef MsTimer2_h
  2. #define MsTimer2_h
  3. #ifdef __AVR__
  4. #include <avr/interrupt.h>
  5. #elif defined(__arm__) && defined(TEENSYDUINO)
  6. #include <Arduino.h>
  7. #else
  8. #error MsTimer2 library only works on AVR architecture
  9. #endif
  10. namespace MsTimer2 {
  11. extern unsigned long msecs;
  12. extern void (*func)();
  13. extern volatile unsigned long count;
  14. extern volatile char overflowing;
  15. extern volatile unsigned int tcnt2;
  16. void set(unsigned long ms, void (*f)());
  17. void start();
  18. void stop();
  19. void _overflow();
  20. }
  21. #endif