usbotg_core.h 579 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2025, sakumisu
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef USBOTG_CORE_H
  7. #define USBOTG_CORE_H
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. #include "usbd_core.h"
  12. #include "usbh_core.h"
  13. #include "usb_otg.h"
  14. int usbotg_initialize(uint8_t busid, uint32_t reg_base, usbd_event_handler_t device_event_callback, usbh_event_handler_t host_event_callback, uint8_t default_role);
  15. int usbotg_deinitialize(uint8_t busid);
  16. /* called by user */
  17. void usbotg_trigger_role_change(uint8_t busid, uint8_t mode);
  18. #ifdef __cplusplus
  19. }
  20. #endif
  21. #endif /* USBOTG_CORE_H */