FreeRTOSTimer Class Reference
#include <freertos_timer.hpp>
Public Member Functions | |
FreeRTOSTimer (TimerCallbackFunction_t pFunction, timeMs_t t, TimerType type=TimerPeriodic) | |
~FreeRTOSTimer () | |
Destructor to delete the timer. More... | |
void | start () |
Starts the timer, and calls reset() if timer is already started. More... | |
void | stop () |
Stops the timer. More... | |
void | reset () |
Resets(restarts) the timer. More... | |
void | changePeriod (timeMs_t t) |
Changes the timer's time. More... | |
bool | isRunning () |
TimerHandle_t | getTimerHandle () |
Timer functions to be used from within an ISR. | |
These will automatically call FreeRTOS YIELD function if required. | |
void | startFromISR () |
Restarts the timer from an ISR. More... | |
void | stopFromISR () |
Stops the timer from an ISR. More... | |
void | resetFromISR () |
Resets the timer from an ISR. More... | |
void | changePeriodFromISR (timeMs_t t) |
Changes the timer's time from an ISR. More... | |
Detailed Description
Timer class to attach C-Functions to timers, but use C++ class structure to easily control the timers.
This is C++ wrapper around FreeRTOS timers. configUSE_TIMERS @ FreeRtosConfig.h must be set to 1 to use this class.
Constructor & Destructor Documentation
FreeRTOSTimer::FreeRTOSTimer | ( | TimerCallbackFunction_t | pFunction, |
timeMs_t | t, | ||
TimerType | type = TimerPeriodic |
||
) |
Constructor to create the timer.
- Parameters
-
pFunction The pointer to C-Function t The timer expiration in milliseconds type Timer type, either one shot or periodic, defaults to periodic
FreeRTOSTimer::~FreeRTOSTimer | ( | ) |
Destructor to delete the timer.
Member Function Documentation
void FreeRTOSTimer::changePeriod | ( | timeMs_t | t | ) |
Changes the timer's time.
void FreeRTOSTimer::changePeriodFromISR | ( | timeMs_t | t | ) |
Changes the timer's time from an ISR.
|
inline |
- Returns
- The FreeRTOS Timer Handle for this timer.
bool FreeRTOSTimer::isRunning | ( | ) |
- Returns
- TRUE if the timer is active
void FreeRTOSTimer::reset | ( | ) |
Resets(restarts) the timer.
void FreeRTOSTimer::resetFromISR | ( | ) |
Resets the timer from an ISR.
void FreeRTOSTimer::start | ( | ) |
Starts the timer, and calls reset() if timer is already started.
void FreeRTOSTimer::startFromISR | ( | ) |
Restarts the timer from an ISR.
void FreeRTOSTimer::stop | ( | ) |
Stops the timer.
void FreeRTOSTimer::stopFromISR | ( | ) |
Stops the timer from an ISR.
The documentation for this class was generated from the following file:
- /var/www/html/SJSU-DEV-Linux/firmware/default/lib/L3_Utils/freertos_timer.hpp