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.

26 line
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