Skip to content

Commit 16b596f

Browse files
committed
key: fix sleep wait when ble is not enabled
1 parent 49df829 commit 16b596f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

main/src/user/key_handle.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ void sleep_key_handle(void)
5353
}
5454
#endif
5555

56-
os_power_sleep_wait(BT_SPP_IDLE_BIT | BT_A2DP_IDLE_BIT | BLE_GATTS_IDLE_BIT | AUDIO_PLAYER_IDLE_BIT);
56+
os_power_sleep_wait(
57+
BT_SPP_IDLE_BIT | BT_A2DP_IDLE_BIT
58+
#ifdef CONFIG_ENABLE_BLE_CONTROL_IF
59+
| BLE_GATTS_IDLE_BIT
60+
#endif
61+
#ifdef CONFIG_ENABLE_AUDIO_PROMPT
62+
| AUDIO_PLAYER_IDLE_BIT
63+
#endif
64+
);
5765
}
5866
#endif // CONFIG_ENABLE_SLEEP_KEY

0 commit comments

Comments
 (0)