40 #if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32) 47 #define UTIMERLIB_TYPE_OFF 0 51 #define UTIMERLIB_TYPE_TIMEOUT 1 55 #define UTIMERLIB_TYPE_INTERVAL 2 57 #ifdef _VARIANT_ARDUINO_STM32_ 58 #include "HardwareTimer.h" 59 extern HardwareTimer Timer3;
72 #ifdef _VARIANT_ARDUINO_STM32_ 73 static void interrupt();
76 #if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32) 77 #pragma message "ESP8266 / ESP32 can only reach a ms resolution so any ms interrupt will be rounded to that" 78 static void interrupt();
82 #pragma message "SAMD21 support is still experimental" 83 TcCount16* _TC = (TcCount16*) TC3;
87 #pragma message "SAMD51 support is still experimental" 93 unsigned long int _overflows = 0;
94 unsigned long int __overflows = 0;
95 #ifdef ARDUINO_ARCH_AVR 96 unsigned char _remaining = 0;
97 unsigned char __remaining = 0;
99 unsigned long int _remaining = 0;
100 unsigned long int __remaining = 0;
102 void (*_cb)() = NULL;
105 void _loadRemaining();
107 void _attachInterrupt_us(
unsigned long int);
108 void _attachInterrupt_s(
unsigned long int);
110 #ifdef _VARIANT_ARDUINO_STM32_ 114 #if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32) void clearTimer()
Clear timer interrupts.
Definition: uTimerLib.cpp:765
void setInterval_us(void(*)(), unsigned long int)
Attaches a callback function to be executed each us microseconds.
Definition: uTimerLib.cpp:54
#define UTIMERLIB_TYPE_OFF
Internal status.
Definition: uTimerLib.h:47
void setInterval_s(void(*)(), unsigned long int)
Attaches a callback function to be executed each s seconds.
Definition: uTimerLib.cpp:82
void _interrupt()
Internal intermediate function to control timer interrupts.
Definition: uTimerLib.cpp:813
int setTimeout_s(void(*)(), unsigned long int)
Attaches a callback function to be executed once when s seconds have passed.
Definition: uTimerLib.cpp:96
Arduino tiny and cross-device compatible timer library.
Definition: uTimerLib.h:62
uTimerLib()
Constructor.
Definition: uTimerLib.cpp:41
uTimerLib TimerLib
Preinstantiate Object.
Definition: uTimerLib.cpp:909
int setTimeout_us(void(*)(), unsigned long int)
Attaches a callback function to be executed once when us microseconds have passed.
Definition: uTimerLib.cpp:68