FreeRTOS C++ Wrappers
1.6.0
C++ interface to FreeRTOS
|
#include <tickhook.hpp>
Public Member Functions | |
TickHook () | |
virtual | ~TickHook () |
void | Register () |
void | Disable () |
void | Enable () |
Protected Member Functions | |
virtual void | Run ()=0 |
Private Member Functions | |
friend | void ::vApplicationTickHook () |
Private Attributes | |
bool | Enabled |
Static Private Attributes | |
static std::list< TickHook * > | Callbacks |
Wrapper class for Tick hooks, functions you want to run within the tick ISR.
This is an abstract base class. To use this, you need to subclass it. All of your tick functions should be derived from this class. Then implement the virtual Run function.
You can register multiple hooks with this class. The order of execution should not be assumed. All tick hooks will execute every tick.
Definition at line 70 of file tickhook.hpp.
TickHook::TickHook | ( | ) |
Constructor.
Definition at line 51 of file ctickhook.cpp.
|
virtual |
Destructor
Definition at line 57 of file ctickhook.cpp.
void TickHook::Disable | ( | ) |
Disable the tick hook from running, without removing it from the tick hook list.
Definition at line 73 of file ctickhook.cpp.
void TickHook::Enable | ( | ) |
Enable this Idle Hook to run. This call is not necessary if you haven't called Disable.
Definition at line 81 of file ctickhook.cpp.
void TickHook::Register | ( | ) |
After this is called your Run routine will execute in the Tick ISR. This registration cannot be done in the base class constructor. Once your object is fully constructed, you "may" call this in your derived class's constructor.
Definition at line 65 of file ctickhook.cpp.
|
protectedpure virtual |
Implementation of your actual Tick Hook code. You must override this function.
|
private |
Allow the global vApplicationTickHook() function access to the internals of this class. This simplifies the overall design.
|
staticprivate |
List of Tick Hook callbacks that are executed in the Tick ISR.
Definition at line 137 of file tickhook.hpp.
|
private |
Should the tick hook run?
Definition at line 142 of file tickhook.hpp.