#include <M5Timer.h>
Definition at line 13 of file M5Timer.h.
◆ M5Timer()
M5Timer::M5Timer |
( |
void |
| ) |
|
◆ deleteTimer()
void M5Timer::deleteTimer |
( |
int_fast8_t |
id | ) |
|
Destroy the specified timer.
- Parameters
-
Definition at line 69 of file M5Timer.cpp.
◆ disable()
void M5Timer::disable |
( |
int_fast8_t |
id | ) |
|
|
inline |
Disables the specified timer.
- Parameters
-
Definition at line 64 of file M5Timer.h.
◆ enable()
void M5Timer::enable |
( |
int_fast8_t |
id | ) |
|
|
inline |
Enables the specified timer.
- Parameters
-
Definition at line 56 of file M5Timer.h.
◆ getNumAvailableTimers()
uint_fast8_t M5Timer::getNumAvailableTimers |
( |
void |
| ) |
const |
|
inline |
gets the number of available timers.
- Returns
- number of available timers.
Definition at line 93 of file M5Timer.h.
◆ getNumTimers()
uint_fast8_t M5Timer::getNumTimers |
( |
void |
| ) |
const |
|
inline |
gets the number of used timers.
- Returns
- number of used timers.
Definition at line 87 of file M5Timer.h.
◆ isEnabled()
bool M5Timer::isEnabled |
( |
int_fast8_t |
id | ) |
const |
|
inline |
gets true if the specified timer is enabled
- Parameters
-
- Returns
- false=disabled / true=enabled.
Definition at line 81 of file M5Timer.h.
◆ restartTimer()
void M5Timer::restartTimer |
( |
int_fast8_t |
id | ) |
|
Restart the specified timer.
- Parameters
-
Definition at line 76 of file M5Timer.cpp.
◆ run()
void M5Timer::run |
( |
void |
| ) |
|
◆ setInterval()
int_fast8_t M5Timer::setInterval |
( |
uint32_t |
interval_msec, |
|
|
timer_callback |
function |
|
) |
| |
|
inline |
Call function every interval [msec].
- Parameters
-
interval_msec | interval [msec] |
function | target function. |
- Returns
- -1 = failed / 0 or more = target timer id.
Definition at line 34 of file M5Timer.h.
◆ setTimeout()
int_fast8_t M5Timer::setTimeout |
( |
uint32_t |
interval_msec, |
|
|
timer_callback |
function |
|
) |
| |
|
inline |
Call function once after interval [msec].
- Parameters
-
interval_msec | interval [msec] |
function | target function. |
- Returns
- -1 = failed / 0 or more = target timer id.
Definition at line 42 of file M5Timer.h.
◆ setTimer()
int_fast8_t M5Timer::setTimer |
( |
uint32_t |
interval_msec, |
|
|
timer_callback |
function, |
|
|
uint32_t |
times |
|
) |
| |
Call function every interval [msec] for specified times.
- Parameters
-
interval_msec | interval [msec] |
function | target function. |
- Returns
- -1 = failed / 0 or more = target timer id.
Definition at line 56 of file M5Timer.cpp.
◆ toggle()
void M5Timer::toggle |
( |
int_fast8_t |
id | ) |
|
|
inline |
Enables the specified timer if it is currently disabled, and vice versa.
- Parameters
-
Definition at line 72 of file M5Timer.h.
◆ MAX_TIMERS
constexpr const uint32_t M5Timer::MAX_TIMERS = 10 |
|
staticconstexpr |
maximum number of timers
Definition at line 16 of file M5Timer.h.
The documentation for this class was generated from the following files: