34 #include "modulesettings.h"
35 #include "faultsettings.h"
43 #ifdef MODULE_Fault_BUILTIN
46 uint8_t module_state[MODULESETTINGS_ADMINSTATE_NUMELEM];
47 ModuleSettingsAdminStateGet(module_state);
48 if (module_state[MODULESETTINGS_ADMINSTATE_FAULT] == MODULESETTINGS_ADMINSTATE_ENABLED) {
61 if (FaultSettingsInitialize() == -1) {
70 case FAULTSETTINGS_ACTIVATEFAULT_MODULEINITASSERT:
74 case FAULTSETTINGS_ACTIVATEFAULT_INITOUTOFMEMORY:
78 case FAULTSETTINGS_ACTIVATEFAULT_INITBUSERROR:
81 uint32_t * bad_ptr = (uint32_t *)0xFFFFFFFF;
82 *bad_ptr = 0xAA55AA55;
95 struct pios_thread *fault_task_handle;
99 case FAULTSETTINGS_ACTIVATEFAULT_RUNAWAYTASK:
100 case FAULTSETTINGS_ACTIVATEFAULT_TASKOUTOFMEMORY:
102 (void) fault_task_handle;
115 case FAULTSETTINGS_ACTIVATEFAULT_RUNAWAYTASK:
119 case FAULTSETTINGS_ACTIVATEFAULT_TASKOUTOFMEMORY:
static uint8_t active_fault
static void fault_task(void *parameters)
void * PIOS_malloc(size_t size)
#define PIOS_THREAD_STACK_SIZE_MIN
#define MODULE_INITCALL(ifn, sfn)
struct pios_thread * PIOS_Thread_Create(void(*fp)(void *), const char *namep, size_t stack_bytes, void *argp, enum pios_thread_prio_e prio)
static int32_t fault_initialize(void)
void PIOS_Thread_Sleep(uint32_t time_ms)
Includes PiOS and core architecture components.
static int32_t fault_start(void)
static bool module_enabled
#define PIOS_Assert(test)