FreeRTOS Addons
|
#include <tickhook.hpp>
Public Member Functions | |
TickHook () | |
virtual | ~TickHook () |
void | Disable () |
void | Enable () |
void | Register () |
Protected Member Functions | |
virtual void | Run ()=0 |
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.
cpp_freertos::TickHook::TickHook | ( | ) |
Constructor.
|
virtual |
Destructor
void cpp_freertos::TickHook::Disable | ( | ) |
Disable the tick hook from running, without removing it from the tick hook list.
void cpp_freertos::TickHook::Enable | ( | ) |
Enable this Idle Hook to run. This call is not necessary if you haven't called Disable.
void cpp_freertos::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.
|
protectedpure virtual |
Implementation of your actual Tick Hook code. You must override this function.