File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
targets/TARGET_Cypress/TARGET_PSOC6 Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 26
26
27
27
void hal_sleep (void )
28
28
{
29
+ // Noop, if the idle mode is active
30
+ #if !defined(CY_CFG_PWR_SYS_IDLE_MODE ) || (CY_CFG_PWR_SYS_IDLE_MODE != CY_CFG_PWR_MODE_ACTIVE )
29
31
cyhal_syspm_sleep ();
32
+ #endif
30
33
}
31
34
32
35
void hal_deepsleep (void )
33
36
{
37
+ #if !defined(CY_CFG_PWR_SYS_IDLE_MODE ) || (CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_DEEPSLEEP )
38
+
34
39
#if DEVICE_LPTICKER
35
40
// A running timer will block DeepSleep, which would normally be
36
41
// good because we don't want the timer to accidentally
@@ -41,9 +46,14 @@ void hal_deepsleep(void)
41
46
cy_us_ticker_stop ();
42
47
cyhal_syspm_deepsleep ();
43
48
cy_us_ticker_start ();
44
- #else
49
+ #else // DEVICE_LPTICKER
50
+ cyhal_syspm_sleep ();
51
+ #endif // DEVICE_LPTICKER
52
+
53
+ #elif CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_SLEEP
45
54
cyhal_syspm_sleep ();
46
- #endif /* DEVICE_LPTICKER */
55
+ #endif // CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_ACTIVE
56
+ // Noop, if the idle mode is active
47
57
}
48
58
49
59
#endif /* DEVICE_SLEEP */
You can’t perform that action at this time.
0 commit comments