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

<DESCRIPTIOM> More...

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

Go to the source code of this file.

Typedefs

typedef struct _IAppPowerModeHelper IAppPowerModeHelper
 

Functions

static sys_error_code_t IapmhInit (IAppPowerModeHelper *_this)
 
static EPowerMode IapmhComputeNewPowerMode (IAppPowerModeHelper *_this, const SysEvent xEvent)
 
static boolean_t IapmhCheckPowerModeTransaction (IAppPowerModeHelper *_this, const EPowerMode eActivePowerMode, const EPowerMode eNewPowerMode)
 
static sys_error_code_t IapmhDidEnterPowerMode (IAppPowerModeHelper *_this, EPowerMode ePowerMode)
 
static EPowerMode IapmhGetActivePowerMode (IAppPowerModeHelper *_this)
 
static SysPowerStatus IapmhGetPowerStatus (IAppPowerModeHelper *_this)
 
static boolean_t IapmhIsLowPowerMode (IAppPowerModeHelper *_this, const EPowerMode ePowerMode)
 

Detailed Description

<DESCRIPTIOM>

Author
STMicroelectronics - ST-Korea - MCD Team
Version
3.0.0
Date
Oct 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

◆ IAppPowerModeHelper

Create type name for _IAppPowerModeHelper.

Function Documentation

◆ IapmhCheckPowerModeTransaction()

static boolean_t IapmhCheckPowerModeTransaction ( IAppPowerModeHelper _this,
const EPowerMode  eActivePowerMode,
const EPowerMode  eNewPowerMode 
)
inlinestatic

Used mainly for debug purpose. It checks if a request power mode transaction is valid.

Parameters
_this[IN] specifies a pointer to the object.
eActivePowerMode[IN] species the actual power mode.
eNewPowerMode[IN] specifies a new power mode.
Returns
TRUE if the transaction is valid. If the transaction is not valid the program execution is stopped.

◆ IapmhComputeNewPowerMode()

static EPowerMode IapmhComputeNewPowerMode ( IAppPowerModeHelper _this,
const SysEvent  xEvent 
)
inlinestatic

Compute the new power mode depending on the input event.

Parameters
_this[IN] specifies a pointer to the object.
xEvent[IN] an power mode input event.
Returns
the power mode that the system should enter due to the event.

◆ IapmhDidEnterPowerMode()

static sys_error_code_t IapmhDidEnterPowerMode ( IAppPowerModeHelper _this,
EPowerMode  ePowerMode 
)
inlinestatic

Used by the system to enter the new power mode. It is called after all application task are ready for the new power mode.

Parameters
_this[IN] specifies a pointer to the object.
ePowerMode[IN] specifies a new power mode.

◆ IapmhGetActivePowerMode()

static EPowerMode IapmhGetActivePowerMode ( IAppPowerModeHelper _this)
inlinestatic

Get the active power mode.

Parameters
_this[IN] specifies a pointer to the object.
Returns
the active power mode.

◆ IapmhGetPowerStatus()

static SysPowerStatus IapmhGetPowerStatus ( IAppPowerModeHelper _this)
inlinestatic

Get a copy of the actual power status.

Parameters
_this[IN] specifies a pointer to the object.
Returns
a copy of the actual power status.

◆ IapmhInit()

static sys_error_code_t IapmhInit ( IAppPowerModeHelper _this)
inlinestatic

Initialize the interface IAppPowerModeHelper. It should be called after the object allocation and before using the object.

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

◆ IapmhIsLowPowerMode()

static boolean_t IapmhIsLowPowerMode ( IAppPowerModeHelper _this,
const EPowerMode  ePowerMode 
)
inlinestatic

Check if a power mode is a low power mode that put the MCU in STOPx mode or higher power efficient mode.

Parameters
_this[IN] specifies a pointer to the object.
ePowerMode[IN] species a power mode.
Returns
TRUE if ePowerMode is a low power mode, ‘FALSE’ otherwise.