#include <HardwareTimer.h>
__forceinline void IRAM_ATTR HardwareTimer::call |
( |
| ) |
|
|
inlineinherited |
Call timer callback.
- Note
- Calls the timer callback function
uint32_t HardwareTimer::getIntervalMs |
( |
| ) |
|
|
inlineinherited |
Get timer interval.
- Return values
-
uint32_t | Timer interval in milliseconds |
uint32_t HardwareTimer::getIntervalUs |
( |
| ) |
|
|
inlineinherited |
Get timer interval.
- Return values
-
uint32_t | Timer interval in microseconds |
HardwareTimer& IRAM_ATTR HardwareTimer::initializeMs |
( |
uint32_t |
milliseconds, |
|
|
InterruptCallback |
callback = nullptr |
|
) |
| |
|
inherited |
Initialise hardware timer.
- Parameters
-
milliseconds | Timer interval in milliseconds |
callback | Callback function to call when timer triggers (Default: none) |
- Return values
-
HardwareTimer& | Reference to timer |
HardwareTimer& IRAM_ATTR HardwareTimer::initializeUs |
( |
uint32_t |
microseconds, |
|
|
InterruptCallback |
callback = nullptr |
|
) |
| |
|
inherited |
Initialise hardware timer.
- Parameters
-
microseconds | Timer interval in microseconds |
callback | Callback function to call when timer triggers (Default: none) |
- Return values
-
HardwareTimer& | Reference to timer |
bool HardwareTimer::isStarted |
( |
| ) |
|
|
inlineinherited |
Check if timer is started.
- Return values
-
bool IRAM_ATTR HardwareTimer::restart |
( |
| ) |
|
|
inherited |
Restart timer.
- Return values
-
bool | True if timer started |
- Note
- Timer is stopped then started with current configuration
void IRAM_ATTR HardwareTimer::setCallback |
( |
InterruptCallback |
callback | ) |
|
|
inherited |
Set timer trigger callback.
- Parameters
-
callback | Function to call when timer triggers |
__forceinline bool IRAM_ATTR HardwareTimer::setIntervalMs |
( |
uint32_t |
milliseconds | ) |
|
|
inlineinherited |
Set timer interval.
- Parameters
-
milliseconds | Interval time in milliseconds |
bool IRAM_ATTR HardwareTimer::setIntervalUs |
( |
uint32_t |
microseconds | ) |
|
|
inherited |
Set timer interval.
- Parameters
-
microseconds | Interval time in microseconds (Default: 1ms) |
bool IRAM_ATTR HardwareTimer::start |
( |
bool |
repeating = true | ) |
|
|
inherited |
Start timer running.
- Parameters
-
repeating | True to restart timer when it triggers, false for one-shot (Default: true) |
- Return values
-
bool | True if timer started |
__forceinline bool IRAM_ATTR HardwareTimer::startOnce |
( |
| ) |
|
|
inlineinherited |
Start one-shot timer.
- Return values
-
bool | True if timer started |
- Note
- Timer starts and will run for configured period then stop
void IRAM_ATTR HardwareTimer::stop |
( |
| ) |
|
|
inherited |