ODeV framework  v2
AManagedTask.h
Go to the documentation of this file.
1 
31 #ifndef INCLUDE_SERVICES_AMANAGEDTASK_H_
32 #define INCLUDE_SERVICES_AMANAGEDTASK_H_
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #include "syslowpower.h"
39 #include "FreeRTOS.h"
40 
44 #define MT_MAX_ERROR_COUNT 0x7
45 
46 #ifndef MT_ALLOWED_ERROR_COUNT
47 
51 #define MT_ALLOWED_ERROR_COUNT 0x2
52 #endif
53 
54 
58 typedef struct _AManagedTask AManagedTask;
59 
60 
61 // Public API declaration
62 //***********************
63 
74 inline sys_error_code_t AMTHardwareInit(AManagedTask *this, void *pParams);
75 
90 inline sys_error_code_t AMTOnCreateTask(AManagedTask *this, TaskFunction_t *pvTaskCode, const char **pcName, unsigned short *pnStackDepth, void **pParams, UBaseType_t *pxPriority);
91 
102 inline sys_error_code_t AMTDoEnterPowerMode(AManagedTask *this, const EPowerMode eActivePowerMode, const EPowerMode eNewPowerMode);
103 
112 
121 
127 inline EPowerMode AMTGetSystemPowerMode();
128 
138 
157 inline void AMTReportErrOnStepExecution(AManagedTask *this, sys_error_code_t nStepError);
158 
164 inline void AMTResetAEDCounter(AManagedTask *this);
165 
172 inline boolean_t AMTIsPowerModeSwitchPending(AManagedTask *this);
173 
174 #ifdef __cplusplus
175 }
176 #endif
177 
178 
179 #endif /* INCLUDE_SERVICES_AMANAGEDTASK_H_ */
Definition: sysevent.h:44
void AMTResetAEDCounter(AManagedTask *this)
Definition: AManagedTaskVtbl.h:176
void AMTReportErrOnStepExecution(AManagedTask *this, sys_error_code_t nStepError)
Definition: AManagedTaskVtbl.h:186
Definition: AManagedTaskVtbl.h:95
sys_error_code_t AMTOnCreateTask(AManagedTask *this, TaskFunction_t *pvTaskCode, const char **pcName, unsigned short *pnStackDepth, void **pParams, UBaseType_t *pxPriority)
Definition: AManagedTaskVtbl.h:129
sys_error_code_t AMTHandleError(AManagedTask *this, SysEvent xError)
Definition: AManagedTaskVtbl.h:139
boolean_t AMTIsPowerModeSwitchPending(AManagedTask *this)
Definition: AManagedTaskVtbl.h:181
sys_error_code_t AMTHardwareInit(AManagedTask *this, void *pParams)
Definition: AManagedTaskVtbl.h:124
sys_error_code_t AMTInit(AManagedTask *this)
Definition: AManagedTaskVtbl.h:144
This file declares the public API related to the power management.
sys_error_code_t AMTDoEnterPowerMode(AManagedTask *this, const EPowerMode eActivePowerMode, const EPowerMode eNewPowerMode)
Definition: AManagedTaskVtbl.h:134
EPowerMode AMTGetSystemPowerMode()
Definition: AManagedTaskVtbl.h:158
unsigned short sys_error_code_t
Definition: syserror.h:45
sys_error_code_t AMTNotifyIsStillRunning(AManagedTask *this, sys_error_code_t nStepError)
Definition: AManagedTaskVtbl.h:163