eLooM for STM32 application
v3.3.0
|
This file declare the Managed task Interface. More...
#include "services/AManagedTask.h"
Go to the source code of this file.
Typedefs | |
typedef struct _AManagedTaskEx | AManagedTaskEx |
typedef enum _EPMClass | EPMClass |
Enumerations | |
enum | _EPMClass { E_PM_CLASS_0 = 0 , E_PM_CLASS_1 = 1 , E_PM_CLASS_2 = 2 } |
Functions | |
static sys_error_code_t | AMTInitEx (AManagedTaskEx *_this) |
static sys_error_code_t | AMTExForceExecuteStep (AManagedTaskEx *_this, EPowerMode eActivePowerMode) |
static sys_error_code_t | AMTExOnEnterPowerMode (AManagedTaskEx *_this, const EPowerMode eActivePowerMode, const EPowerMode eNewPowerMode) |
static sys_error_code_t | AMTExSetInactiveState (AManagedTaskEx *_this, boolean_t bBlockedSuspended) |
static boolean_t | AMTExIsTaskInactive (AManagedTaskEx *_this) |
static sys_error_code_t | AMTExSetPMClass (AManagedTaskEx *_this, EPMClass eNewPMClass) |
static EPMClass | AMTExGetPMClass (AManagedTaskEx *_this) |
VOID | AMTExRun (ULONG nParam) |
This file declare the Managed task Interface.
<DESCRIPTIOM>
Copyright (c) 2018 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
typedef struct _AManagedTaskEx AManagedTaskEx |
Create type name for _AManagedTaskEx.
Power mode classes. An AManagedTaskEx can belong to only one power mode class. An AManagedTask belong, by default, to E_PM_CLASS_0.
enum _EPMClass |
Power mode classes. An AManagedTaskEx can belong to only one power mode class. An AManagedTask belong, by default, to E_PM_CLASS_0.
|
inlinestatic |
Called by the framework to force the step execution. During a step execution a task can be suspended waiting for an event or for other reason. The In this situation the INIT task cannot complete the power mode switch, so it calls this method in order to force the task to be ready for the power mode switch.
_this | [IN] specifies a pointer to the object. |
eActivePowerMode | [IN] specifies the actual power mode |
|
inlinestatic |
Get the Power Mode Class of the managed task.
_this | [IN] specifies a pointer to the object. |
|
inlinestatic |
Check if the a managed task is inactive. A managed task is inactive when:
For more information about the task state see https://freertos.org/RTOS-task-states.html
_this | [IN] specifies a pointer to the object. |
TRUE
if the task is in inactive state, FALSE
otherwise.
|
inlinestatic |
Task specific function called by the framework just before the system starts the sequence to enter a new specific power mode. Trough this function the system gives a task the option for an early preparation for the transaction in the power mode state machine. This function is executed in the INIT task execution flow. Note that this is different from the AMTDoEnterPowerMode() and a task shall assume that a step in the current power mode is still possible after executing this function.
_this | [IN] specifies a task object pointer. |
eActivePowerMode | [IN] specifies the current power mode of the system. |
eNewPowerMode | [IN] specifies the new power mode that is to be activated by the system. |
VOID AMTExRun | ( | ULONG | nParam | ) |
This is the default control loop of a managed task.
nParams | [IN] specify a pointer to the task object: AManagedTaskEx pTask = (AManagedTaskEx)pParams; |
|
inlinestatic |
A task must use this method to notify the framework when it is entering the suspend state or when is blocking on a event without a timeout. This state is called "inactive". This information is used to the AED to resetting the system because it thinks that the task is not responding.
_this | [IN] specifies a pointer to the object. |
bBlockedSuspended | [IN] TRUE if a the task is entering the inactive state, FALSE if a task is leaving the inactive state. |
|
inlinestatic |
Set the PM class for the managed task. During a PM transaction, all tasks belonging to E_PM_CLASS_0 will execute the DoEnterPowerMode() before the managed tasks belonging to E_PM_CLASS_1. The application, for example, can use the AMTExOnEnterPowerMode() function in order to dynamically set the PM Class for the application task. In this way it is possible to control the of the task executing the transaction during a power mode switch.
_this | [IN] specifies a pointer to the object. |
eNewPMClass | [IN] specifies the new PM class for the task. |
|
inlinestatic |
Initialize a managed task structure. The application is responsible to allocate a managed task in memory. This method must be called after the allocation.
_this | [IN] specifies a task object pointer. |