Midnight Sun Firmware
Loading...
Searching...
No Matches
master_tasks.h
1#pragma once
2
3/************************************************************************************************
4 * @file master_tasks.h
5 *
6 * @brief Header file for Master Tasks API. Supports 1KHz, 100Hz and 3HZ scheduling
7 *
8 * @date 2024-11-04
9 * @author Midnight Sun Team #24 - MSXVI
10 ************************************************************************************************/
11
12/* Standard library Headers */
13
14/* Inter-component Headers */
15#include "log.h"
16#include "tasks.h"
17
18/* Intra-component Headers */
19
26#ifndef MASTER_TASK_50HZ_SIZE
28#define MASTER_TASK_50HZ_SIZE (TASK_STACK_512)
29#endif
30
31#ifndef MASTER_TASK_3HZ_SIZE
33#define MASTER_TASK_3HZ_SIZE (TASK_STACK_512)
34#endif
35
36#ifndef MASTER_TASK_1HZ_SIZE
38#define MASTER_TASK_1HZ_SIZE (TASK_STACK_256)
39#endif
40
41#define MASTER_50HZ_TO_MS 20U
42#define MASTER_3HZ_TO_MS 300U
43#define MASTER_1HZ_TO_MS 1000U
44
50void run_1000hz_cycle();
51
57void run_10hz_cycle();
58
64void run_1hz_cycle();
65
69void pre_loop_init();
70
78
84
90
96
Task * get_10hz_task()
Fetch the memory address of the 3hz task.
Definition: master_tasks.c:85
void pre_loop_init()
Initialize the master tasks before the scheduler begins.
Definition: main.c:44
StatusCode init_master_tasks()
Initialize all 3 master tasks.
Definition: master_tasks.c:72
Task * get_1000hz_task()
Fetch the memory address of the 50hz task.
Definition: master_tasks.c:81
Task * get_1hz_task()
Fetch the memory address of the 1hz task.
Definition: master_tasks.c:89
void run_1hz_cycle()
Run the 1hz cycle.
Definition: main.c:64
void run_1000hz_cycle()
Run the 50hz cycle.
Definition: main.c:46
void run_10hz_cycle()
Run the 3hz cycle.
Definition: main.c:58
StatusCode
StatusCodes for various errors.
Definition: status.h:27
Definition: tasks.h:83