FuSa 8-Bit Libraries Safety Framework
Loading...
Searching...
No Matches
main_example.h
Go to the documentation of this file.
1
26
27#ifndef MAIN_EXAMPLE_H
28#define MAIN_EXAMPLE_H
29
30// Standard Library Includes
31#include <stdbool.h>
32#include <stddef.h>
33
34// Framework Includes
36#include <tasks_config.h>
37#include <tasks_scheduler.h>
38#include <tasks_shared.h>
39#include <tasks_startup.h>
40
45#define STARTUP_SCHEDULE_LEN 3U
46
51#define SCHEDULE_LEN 3U
52
72#define DUR_UNTIL_NEXT_SCHEDULE 200UL
73
101 [0U] = { &T_HandleResetReason, DUR_HANDLE_RESET_REASON }, // Optional Task
103 [2U] = { NULL, 0U } // TODO: Add application-specific Tasks to the Startup Schedule
104};
105
134 [1U] = { &T_RunNextLatentFaultDiag, DUR_RUN_NEXT_LATENT_FAULT_DIAG }, // Optional Task
135 [2U] = { NULL, 0U } // TODO: Add application-specific Tasks to the Schedule
136};
137
156 NULL, 0U // TODO: Add application-specific Task to Shutdown procedure
157};
158
159#endif // MAIN_EXAMPLE_H
Defines type for Task scheduling.
static const scheduleEntry_t appSchedule[SCHEDULE_LEN]
Defines an example Application Schedule with optional Tasks.
static const scheduleEntry_t appStartupSchedule[STARTUP_SCHEDULE_LEN]
Defines an example Application Startup Schedule with optional Tasks.
static const scheduleEntry_t appShutdownTask
Defines an example Application Shutdown Task schedule entry.
#define SCHEDULE_LEN
Configures the schedule length of the example Application Schedule.
#define STARTUP_SCHEDULE_LEN
Configures the schedule length of the example Application Startup Schedule.
void T_RunNextLatentFaultDiag(void)
Runs a different latent fault diagnostic function each time it is called.
void T_HandleNotificationErrors(void)
Ensures Error IDs with 'NOTIFICATION' criticality are handled.
void T_HandleResetReason(void)
Retrieves and validates stored reset info from persistent memory and issues configurable callback for...
#define DUR_HANDLE_NOTIFICATION_ERRORS
Configures the run-time duration for T_HandleNotificationErrors in system clock cycles.
#define DUR_HANDLE_RESET_REASON
Configures the run-time duration for T_HandleResetReason in system clock cycles.
#define DUR_RUN_NEXT_LATENT_FAULT_DIAG
Configures the run-time duration for T_RunNextLatentFaultDiag in system clock cycles.
Defines a schedule entry containing a task function pointer and its duration.