arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
Task Class Reference

FreeRTOS task. More...

#include <Task.h>

Public Member Functions

 Task ()=default
 
 Task (const char *name, int stackSize, int priority=1, int core=-1)
 Defines and creates a FreeRTOS task.
 
 ~Task ()
 
bool begin (std::function< void()> process)
 
bool create (const char *name, int stackSize, int priority=1, int core=-1)
 If you used the empty constructor, you need to call create!
 
void end ()
 suspends the task
 
int getCoreID ()
 
voidgetReference ()
 
TaskHandle_tgetTaskHandle ()
 
void remove ()
 deletes the FreeRTOS task
 
void resume ()
 
void setReference (void *r)
 
void suspend ()
 

Static Protected Member Functions

static void nop ()
 
static void task_loop (void *arg)
 

Protected Attributes

std::function< void()> loop_code = nop
 
voidref
 
TaskHandle_t xHandle = nullptr
 

Detailed Description

FreeRTOS task.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ Task() [1/2]

Task ( const char name,
int  stackSize,
int  priority = 1,
int  core = -1 
)
inline

Defines and creates a FreeRTOS task.

◆ Task() [2/2]

Task ( )
default

◆ ~Task()

~Task ( )
inline

Member Function Documentation

◆ begin()

bool begin ( std::function< void()>  process)
inline

◆ create()

bool create ( const char name,
int  stackSize,
int  priority = 1,
int  core = -1 
)
inline

If you used the empty constructor, you need to call create!

◆ end()

void end ( )
inline

suspends the task

◆ getCoreID()

int getCoreID ( )
inline

◆ getReference()

void * getReference ( )
inline

◆ getTaskHandle()

TaskHandle_t & getTaskHandle ( )
inline

◆ nop()

static void nop ( )
inlinestaticprotected

◆ remove()

void remove ( )
inline

deletes the FreeRTOS task

◆ resume()

void resume ( )
inline

◆ setReference()

void setReference ( void r)
inline

◆ suspend()

void suspend ( )
inline

◆ task_loop()

static void task_loop ( void arg)
inlinestaticprotected

Member Data Documentation

◆ loop_code

std::function<void()> loop_code = nop
protected

◆ ref

void* ref
protected

◆ xHandle

TaskHandle_t xHandle = nullptr
protected

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