eLooM for STM32 application  v3.3.0
Loading...
Searching...
No Matches
Macros | Functions
syslowpower.h File Reference

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

#include "events/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)) != 0U ? TRUE : FALSE)
 

Functions

SysPowerStatus SysGetPowerStatus (void)
 
EPowerMode SysGetPowerMode (void)
 
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
3.0.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 (c) 2017 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.

Macro Definition Documentation

◆ SYS_IS_CALLED_FROM_ISR

#define SYS_IS_CALLED_FROM_ISR ( )    (((SCB->ICSR) & (SCB_ICSR_VECTACTIVE_Msk)) != 0U ? 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 ( void  )

Get the current system power mode.

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

◆ SysGetPowerStatus()

SysPowerStatus SysGetPowerStatus ( void  )

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.