ODeV framework  v2
syslowpower.h
Go to the documentation of this file.
1 
35 #ifndef SYSLOWPOWER_H_
36 #define SYSLOWPOWER_H_
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 #include "systypes.h"
43 #include "syserror.h"
44 #include "sysevent.h"
45 
46 
47 #ifndef SYS_CFG_USE_DEFAULT_PM_HELPER
48 #error Missing definition: SYS_CFG_USE_DEFAULT_PM_HELPER must be defined in sysconfig.h
49 #endif
50 
51 #if (SYS_CFG_USE_DEFAULT_PM_HELPER==1)
52 #include "sysdeflowpower.h"
53 #else
54 #include "applowpower.h"
55 #endif
56 
63 #define SYS_PM_MAKE_EVENT(src, params) ((((src) & 0X7U) | (((params)<<3) & 0xF8U)) & 0x000000FF)
64 
68 #define SYS_IS_CALLED_FROM_ISR() ((SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk) != 0 ? TRUE : FALSE)
69 
70 #ifndef SysPostEvent
71 #define SysPostPowerModeEvent SysPostEvent
72 #endif
73 
74 
75 // Public API declaration
76 //***********************
77 
83 SysPowerStatus SysGetPowerStatus();
84 
90 EPowerMode SysGetPowerMode();
91 
101 
102 // Inline functions definition
103 // ***************************
104 
105 
106 #ifdef __cplusplus
107 }
108 #endif
109 
110 #endif /* SYSLOWPOWER_H_ */
Definition: sysevent.h:44
Define the global error management API.
<DESCRIPTIOM>
EPowerMode SysGetPowerMode()
Definition: sysinit.c:248
<DESCRIPTIOM>
sys_error_code_t SysPostPowerModeEvent(SysEvent xEvent)
Common type declaration.
unsigned short sys_error_code_t
Definition: syserror.h:45
SysPowerStatus SysGetPowerStatus()
Definition: sysinit.c:263