PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 3 gadiem
123456789101112131415161718192021222324252627
  1. #ifndef FlexiTimer2_h
  2. #define FlexiTimer2_h
  3. #ifdef __AVR__
  4. #include <avr/interrupt.h>
  5. #elif defined(__arm__) && defined(TEENSYDUINO)
  6. #include <Arduino.h>
  7. #else
  8. #error FlexiTimer2 library only works on AVR architecture
  9. #endif
  10. namespace FlexiTimer2 {
  11. extern unsigned long time_units;
  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 set(unsigned long units, double resolution, void (*f)());
  18. void start();
  19. void stop();
  20. void _overflow();
  21. }
  22. #endif