mbed-drivers
|
#include <Ticker.h>
Public Member Functions | |
Ticker (const ticker_data_t *const data) | |
void | attach (void(*fptr)(void), float t) |
template<typename T > | |
void | attach (T *tptr, void(T::*mptr)(void), float t) |
void | attach_us (void(*fptr)(void), timestamp_t t) |
template<typename T > | |
void | attach_us (T *tptr, void(T::*mptr)(void), timestamp_t t) |
void | detach () |
![]() | |
TimerEvent (const ticker_data_t *data) | |
virtual | ~TimerEvent () |
Protected Member Functions | |
void | setup (timestamp_t t) |
virtual void | handler () |
![]() | |
void | insert (timestamp_t timestamp) |
void | remove () |
Protected Attributes | |
timestamp_t | _delay |
mbed::util::FunctionPointer | _function |
![]() | |
ticker_event_t | event |
const ticker_data_t *const | _ticker_data |
Additional Inherited Members | |
![]() | |
static void | irq (uint32_t id) |
A Ticker is used to call a function at a recurring interval
You can use as many seperate Ticker objects as you require.
Example:
|
inline |
Attach a function to be called by the Ticker, specifiying the interval in seconds
fptr | pointer to the function to be called |
t | the time between calls in seconds |
|
inline |
Attach a member function to be called by the Ticker, specifiying the interval in seconds
tptr | pointer to the object to call the member function on |
mptr | pointer to the member function to be called |
t | the time between calls in seconds |
|
inline |
Attach a function to be called by the Ticker, specifiying the interval in micro-seconds
fptr | pointer to the function to be called |
t | the time between calls in micro-seconds |
|
inline |
Attach a member function to be called by the Ticker, specifiying the interval in micro-seconds
tptr | pointer to the object to call the member function on |
mptr | pointer to the member function to be called |
t | the time between calls in micro-seconds |
void mbed::Ticker::detach | ( | ) |
Detach the function
|
protected |
Time delay (in microseconds) for re-setting the multi-shot callback.
|
protected |
Callback.