ODeV framework  v2
Macros | Functions
syslowpower.h File Reference

This file declares the public API related to the power management. More...

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

Go to the source code of this file.

Macros

#define SYS_PM_MAKE_EVENT(src, params)   ((((src) & 0X7U) | (((params)<<3) & 0xF8U)) & 0x000000FF)
 
#define SYS_IS_CALLED_FROM_ISR()   ((SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) != 0 ? TRUE : FALSE)
 

Functions

SysPowerStatus SysGetPowerStatus ()
 
EPowerMode SysGetPowerMode ()
 
sys_error_code_t SysPostPowerModeEvent (SysEvent xEvent)
 

Detailed Description

This file declares the public API related to the power management.

Author
STMicroelectronics - ST-Korea - MCD Team
Version
1.2.0
Date
Jun 2, 2017

This header file declares the public API and the data structures used by the application tasks in order to:

Attention

© COPYRIGHT 2017 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.

Macro Definition Documentation

◆ SYS_IS_CALLED_FROM_ISR

#define SYS_IS_CALLED_FROM_ISR ( )    ((SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) != 0 ? TRUE : FALSE)

Check if the current code is inside an ISR or not.

◆ SYS_PM_MAKE_EVENT

#define SYS_PM_MAKE_EVENT (   src,
  params 
)    ((((src) & 0X7U) | (((params)<<3) & 0xF8U)) & 0x000000FF)

Macro to make system power mode event.

Parameters
src[IN] specifies the source of the event
params[IN] specifies a parameter. Its value depend on the event source.

Function Documentation

◆ SysGetPowerMode()

EPowerMode SysGetPowerMode ( )

Get the current system power mode.

Returns
the current system power mode.
+ Here is the call graph for this function:

◆ SysGetPowerStatus()

SysPowerStatus SysGetPowerStatus ( )

Get a copy of the system status related to the power management.

Returns
copy of the system status related to the power management.
+ Here is the call graph for this function:

◆ SysPostPowerModeEvent()

sys_error_code_t SysPostPowerModeEvent ( SysEvent  xEvent)

Notify the system about an event related to the power mode management. This function can be called also from an ISR.

Parameters
xEvent[IN] specifies a power mode event.
Returns
SYS_NO_ERROR_CODE if the event has been posted in the system queue with success, an error code otherwise.