ODeV framework  v2
Data Structures | Typedefs | Functions
IAppPowerModeHelper_vtbl.h File Reference

<DESCRIPTIOM> More...

#include "systp.h"
#include "systypes.h"
#include "syserror.h"
+ Include dependency graph for IAppPowerModeHelper_vtbl.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _IAppPowerModeHelper_vtbl
 
struct  _IAppPowerModeHelper
 

Typedefs

typedef struct _IAppPowerModeHelper_vtbl IAppPowerModeHelper_vtbl
 

Functions

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

Detailed Description

<DESCRIPTIOM>

Author
STMicroelectronics - ST-Korea - MCD Team
Version
1.0.0
Date
Oct 30, 2018
Attention

© COPYRIGHT 2018 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Typedef Documentation

◆ IAppPowerModeHelper_vtbl

Create type name for _IAppPowerModeHelper_vtbl.

Function Documentation

◆ IapmhCheckPowerModeTransaction()

SYS_DEFINE_INLINE boolean_t IapmhCheckPowerModeTransaction ( IAppPowerModeHelper this,
const EPowerMode  eActivePowerMode,
const EPowerMode  eNewPowerMode 
)
inline

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()

SYS_DEFINE_INLINE EPowerMode IapmhComputeNewPowerMode ( IAppPowerModeHelper this,
const SysEvent  xEvent 
)
inline

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()

SYS_DEFINE_INLINE sys_error_code_t IapmhDidEnterPowerMode ( IAppPowerModeHelper this,
EPowerMode  ePowerMode 
)
inline

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()

SYS_DEFINE_INLINE EPowerMode IapmhGetActivePowerMode ( IAppPowerModeHelper this)
inline

Get the active power mode.

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

◆ IapmhGetPowerStatus()

SYS_DEFINE_INLINE SysPowerStatus IapmhGetPowerStatus ( IAppPowerModeHelper this)
inline

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()

SYS_DEFINE_INLINE sys_error_code_t IapmhInit ( IAppPowerModeHelper this)
inline

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()

SYS_DEFINE_INLINE boolean_t IapmhIsLowPowerMode ( IAppPowerModeHelper this,
const EPowerMode  ePowerMode 
)
inline

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.