eLooM for STM32 application  v3.3.0
A framework for multitasking low power embedded applications powerd by STM32
Loading...
Searching...
No Matches
syslowpower.h
Go to the documentation of this file.
1
27#ifndef SYSLOWPOWER_H_
28#define SYSLOWPOWER_H_
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#include "events/sysevent.h"
35
36
37#ifndef SYS_CFG_USE_DEFAULT_PM_HELPER
38#error Missing definition: SYS_CFG_USE_DEFAULT_PM_HELPER must be defined in sysconfig.h
39#endif
40
41#if (SYS_CFG_USE_DEFAULT_PM_HELPER==1)
42#include "sysdeflowpower.h"
43#else
44#include "applowpower.h"
45#endif
46
53#define SYS_PM_MAKE_EVENT(src, params) ((((src) & 0X7U) | (((params)<<3) & 0xF8U)) & 0x000000FF)
54
58#define SYS_IS_CALLED_FROM_ISR() (((SCB->ICSR) & (SCB_ICSR_VECTACTIVE_Msk)) != 0U ? TRUE : FALSE)
59
60#ifndef SysPostEvent
61#define SysPostPowerModeEvent SysPostEvent
62#endif
63
64
65/* Public API declaration */
66/**************************/
67
73SysPowerStatus SysGetPowerStatus(void);
74
80EPowerMode SysGetPowerMode(void);
81
90sys_error_code_t SysPostPowerModeEvent(SysEvent xEvent);
91
92/* Inline functions definition */
93/*******************************/
94
95
96#ifdef __cplusplus
97}
98#endif
99
100#endif /* SYSLOWPOWER_H_ */
<DESCRIPTIOM>
uint16_t sys_error_code_t
Definition syserror.h:41
<DESCRIPTIOM>
EPowerMode SysGetPowerMode(void)
Definition sysinit.c:300
SysPowerStatus SysGetPowerStatus(void)
Definition sysinit.c:315
Definition sysevent.h:41