1 /*
2  * SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #pragma once
8 #include <stdint.h>
9 #include "sdkconfig.h"
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #if SOC_USB_SERIAL_JTAG_SUPPORTED
16 typedef struct {
17     bool usj_clock_enabled;
18     bool usj_pad_enabled;
19 } sleep_console_usj_enable_state_t;
20 
21 /**
22  * @brief Disable usb-serial-jtag pad during light sleep to avoid current leakage and
23  *        backup the enable state before light sleep
24  */
25 void sleep_console_usj_pad_backup_and_disable(void);
26 
27 /**
28  * @brief Restore initial usb-serial-jtag pad enable state when wakeup from light sleep
29  */
30 void sleep_console_usj_pad_restore(void);
31 #endif
32 
33 #ifdef __cplusplus
34 }
35 #endif
36