FreeRTOS Addons
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
cpp_freertos::TickHook Class Referenceabstract

#include <tickhook.hpp>

Public Member Functions

 TickHook ()
 
virtual ~TickHook ()
 
void Disable ()
 
void Enable ()
 
void Register ()
 

Protected Member Functions

virtual void Run ()=0
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TickHook()

cpp_freertos::TickHook::TickHook ( )

Constructor.

◆ ~TickHook()

virtual cpp_freertos::TickHook::~TickHook ( )
virtual

Destructor

Member Function Documentation

◆ Disable()

void cpp_freertos::TickHook::Disable ( )

Disable the tick hook from running, without removing it from the tick hook list.

◆ Enable()

void cpp_freertos::TickHook::Enable ( )

Enable this Idle Hook to run. This call is not necessary if you haven't called Disable.

◆ Register()

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.

Note
Immedately after you call this function, your TickHook Run() method will run, perhaps before you even return from this call. You "must" be ready to run before you call Register().

◆ Run()

virtual void cpp_freertos::TickHook::Run ( )
protectedpure virtual

Implementation of your actual Tick Hook code. You must override this function.


The documentation for this class was generated from the following file: