|
21 | 21 | #include "cyhal_hwmgr.h"
|
22 | 22 | #include "cybsp.h"
|
23 | 23 | #include "cy_mbed_post_init.h"
|
24 |
| -#include "mbed_power_mgmt.h" |
25 | 24 | #include "mbed_error.h"
|
26 | 25 | #if MBED_CONF_RTOS_PRESENT
|
27 | 26 | #include "rtos_idle.h"
|
|
35 | 34 | #include "cy_serial_flash_qspi.h"
|
36 | 35 | #endif /* defined(MBED_CONF_TARGET_XIP_ENABLE) */
|
37 | 36 |
|
38 |
| - |
39 |
| -#if (defined(CY_CFG_PWR_SYS_IDLE_MODE) && (CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_ACTIVE)) |
40 |
| -/******************************************************************************* |
41 |
| -* Function Name: active_idle_hook |
42 |
| -****************************************************************************//** |
43 |
| -* |
44 |
| -* Empty idle hook function to prevent the system entering sleep mode |
45 |
| -* automatically any time the system is idle. |
46 |
| -* |
47 |
| -*******************************************************************************/ |
48 |
| -static void active_idle_hook(void) |
49 |
| -{ |
50 |
| - /* Do nothing, so the rtos_idle_loop() performs while(1) */ |
51 |
| -} |
52 |
| -#endif |
53 |
| - |
54 | 37 | MBED_WEAK void cy_mbed_post_bsp_init_hook(void)
|
55 | 38 | {
|
56 | 39 | /* By default, do nothing */
|
@@ -102,18 +85,4 @@ void mbed_sdk_init(void)
|
102 | 85 | /* Enable global interrupts (disabled in CM4 startup assembly) */
|
103 | 86 | __enable_irq();
|
104 | 87 | #endif
|
105 |
| - |
106 |
| -#if defined (CY_CFG_PWR_SYS_IDLE_MODE) |
107 |
| - /* Configure the lowest power state the system is allowed to enter |
108 |
| - * based on the System Idle Power Mode parameter value in the Device |
109 |
| - * Configurator. The default value is system deep sleep. |
110 |
| - */ |
111 |
| -#if (CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_ACTIVE) |
112 |
| - rtos_attach_idle_hook(&active_idle_hook); |
113 |
| -#elif (CY_CFG_PWR_SYS_IDLE_MODE == CY_CFG_PWR_MODE_SLEEP) |
114 |
| - sleep_manager_lock_deep_sleep(); |
115 |
| -#else |
116 |
| - /* Deep sleep is default state */ |
117 |
| -#endif |
118 |
| -#endif |
119 | 88 | }
|
0 commit comments