eLooM for STM32 application  v3.3.0
A framework for multitasking low power embedded applications powerd by STM32
Loading...
Searching...
No Matches
AManagedTaskEx_vtbl.h File Reference

TODO - insert here the file description. More...

+ Include dependency graph for AManagedTaskEx_vtbl.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _AMTStatusEx
 
struct  _AManagedTaskEx
 

Typedefs

typedef struct _AManagedTaskEx_vtbl AManagedTaskEx_vtbl
 
typedef struct _AMTStatusEx AMTStatusEx
 

Functions

SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTExForceExecuteStep (AManagedTaskEx *_this, EPowerMode eActivePowerMode)
 
SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTExOnEnterPowerMode (AManagedTaskEx *_this, const EPowerMode eActivePowerMode, const EPowerMode eNewPowerMode)
 
SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTInitEx (AManagedTaskEx *_this)
 
SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTExSetInactiveState (AManagedTaskEx *_this, boolean_t bBlockedSuspended)
 
SYS_DEFINE_STATIC_INLINE boolean_t AMTExIsTaskInactive (AManagedTaskEx *_this)
 
SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTExSetPMClass (AManagedTaskEx *_this, EPMClass eNewPMClass)
 
SYS_DEFINE_STATIC_INLINE EPMClass AMTExGetPMClass (AManagedTaskEx *_this)
 

Detailed Description

TODO - insert here the file description.

Author
STMicroelectronics - ST-Korea - MCD Team
Version
3.0.0
Date
Jul 30, 2018
Attention

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 Documentation

◆ AManagedTaskEx_vtbl

typedef struct _AManagedTaskEx_vtbl AManagedTaskEx_vtbl

Create type name for _IManagedTask_vtb.

◆ AMTStatusEx

typedef struct _AMTStatusEx AMTStatusEx

Managed Task extended status field. This data is used to coordinate the power mode switch between the INIT task and the application managed tasks.

Function Documentation

◆ AMTExForceExecuteStep()

SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTExForceExecuteStep ( AManagedTaskEx _this,
EPowerMode  eActivePowerMode 
)
inline

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.

Parameters
_this[IN] specifies a pointer to the object.
eActivePowerMode[IN] specifies the actual power mode
Returns
SYS_NO_ERROR_CODE if success, an error code otherwise.

◆ AMTExGetPMClass()

SYS_DEFINE_STATIC_INLINE EPMClass AMTExGetPMClass ( AManagedTaskEx _this)
inline

Get the Power Mode Class of the managed task.

Parameters
_this[IN] specifies a pointer to the object.
Returns
the Power Mode Class of the managed task

◆ AMTExIsTaskInactive()

SYS_DEFINE_STATIC_INLINE boolean_t AMTExIsTaskInactive ( AManagedTaskEx _this)
inline

Check if the a managed task is inactive. A managed task is inactive when:

  • it is in suspend state
  • it is in blocked state without a timeout

For more information about the task state see https://freertos.org/RTOS-task-states.html

Parameters
_this[IN] specifies a pointer to the object.
Returns
TRUE if the task is in inactive state, FALSE otherwise.

◆ AMTExOnEnterPowerMode()

SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTExOnEnterPowerMode ( AManagedTaskEx _this,
const EPowerMode  eActivePowerMode,
const EPowerMode  eNewPowerMode 
)
inline

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.

Parameters
_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.
Returns
SYS_NO_ERROR_CODE if success, a task specific error code otherwise that stops the power mode switch.

◆ AMTExSetInactiveState()

SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTExSetInactiveState ( AManagedTaskEx _this,
boolean_t  bBlockedSuspended 
)
inline

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.

Parameters
_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.
Returns
SYS_NO_ERROR_CODE if success, an error code otherwise.

◆ AMTExSetPMClass()

SYS_DEFINE_STATIC_INLINE sys_error_code_t AMTExSetPMClass ( AManagedTaskEx _this,
EPMClass  eNewPMClass 
)
inline

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.

Parameters
_this[IN] specifies a pointer to the object.
eNewPMClass[IN] specifies the new PM class for the task.
Returns
SYS_NO_ERROR_CODE

◆ AMTInitEx()

Initialize a managed task structure. The application is responsible to allocate a managed task in memory. This method must be called after the allocation.

Parameters
_this[IN] specifies a task object pointer.
Returns
SYS_NO_ERROR_CODE