usb_hal.c 338 B

123456789101112131415161718
  1. /*
  2. * SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #include "hal/usb_ll.h"
  7. #include "hal/usb_hal.h"
  8. void usb_hal_init(usb_hal_context_t *usb)
  9. {
  10. if (usb->use_external_phy) {
  11. usb_ll_ext_phy_enable();
  12. } else {
  13. usb_ll_int_phy_enable();
  14. }
  15. }