sleep_console.h 737 B

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