Midnight Sun Firmware
Loading...
Searching...
No Matches
Master_Tasks

Master Tasks Library. More...

Macros

#define MASTER_TASK_1000HZ_SIZE   (TASK_STACK_256)
 Number of bytes statically allocated for 1000hz task.
 
#define MASTER_TASK_10HZ_SIZE   (TASK_STACK_256)
 Number of bytes statically allocated for 10hz task.
 
#define MASTER_TASK_1HZ_SIZE   (TASK_STACK_256)
 Number of bytes statically allocated for 1hz task.
 

Functions

void run_1000hz_cycle ()
 Run the 1000hz cycle. More...
 
void run_10hz_cycle ()
 Run the 10hz cycle. More...
 
void run_1hz_cycle ()
 Run the 1hz cycle. More...
 
void pre_loop_init ()
 Initialize the master tasks before the scheduler begins.
 
StatusCode init_master_tasks ()
 Initialize all 3 master tasks. More...
 
Taskget_1000hz_task ()
 Fetch the memory address of the 1000hz task. More...
 
Taskget_10hz_task ()
 Fetch the memory address of the 10hz task. More...
 
Taskget_1hz_task ()
 Fetch the memory address of the 1hz task. More...
 

Detailed Description

Master Tasks Library.

Function Documentation

◆ get_1000hz_task()

Task * get_1000hz_task ( )

Fetch the memory address of the 1000hz task.

Returns
Pointer to the 1000hz task

◆ get_10hz_task()

Task * get_10hz_task ( )

Fetch the memory address of the 10hz task.

Returns
Pointer to the 10hz task

◆ get_1hz_task()

Task * get_1hz_task ( )

Fetch the memory address of the 1hz task.

Returns
Pointer to the 1hz task

◆ init_master_tasks()

StatusCode init_master_tasks ( )

Initialize all 3 master tasks.

The three tasks run at 1000hz (1ms), 10hz (100ms) and 1hz (1s)

Returns
STATUS_CODE_OK if initialization succeeded for all 3 tasks STATUS_CODE_INVALID_ARGS if initialization failed for atleast 1 of the 3 tasks

◆ run_1000hz_cycle()

void run_1000hz_cycle ( )

Run the 1000hz cycle.

If this cycle takes longer than 1ms it will throw a warning If this cycle takes longer than 1ms 5 times in a row, the scheduler will stop

◆ run_10hz_cycle()

void run_10hz_cycle ( )

Run the 10hz cycle.

If this cycle takes longer than 100ms it will throw a warning If this cycle takes longer than 1100ms 5 times in a row, the scheduler will stop

◆ run_1hz_cycle()

void run_1hz_cycle ( )

Run the 1hz cycle.

If this cycle takes longer than 1s it will throw a warning If this cycle takes longer than 1s 5 times in a row, the scheduler will stop