usbd_config.h 973 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2020-10-14 Dozingfiretruck first version
  9. */
  10. #ifndef __USBD_CONFIG_H__
  11. #define __USBD_CONFIG_H__
  12. #include <rtconfig.h>
  13. #ifdef BSP_USBD_TYPE_HS
  14. #define USBD_IRQ_TYPE OTG_HS_IRQn
  15. #define USBD_IRQ_HANDLER OTG_HS_IRQHandler
  16. #define USBD_INSTANCE USB_OTG_HS
  17. #else
  18. #define USBD_IRQ_TYPE OTG_FS_IRQn
  19. #define USBD_IRQ_HANDLER OTG_FS_IRQHandler
  20. #define USBD_INSTANCE USB_OTG_FS
  21. #endif
  22. #ifdef BSP_USBD_SPEED_HS
  23. #define USBD_PCD_SPEED PCD_SPEED_HIGH
  24. #elif BSP_USBD_SPEED_HSINFS
  25. #define USBD_PCD_SPEED PCD_SPEED_HIGH_IN_FULL
  26. #else
  27. #define USBD_PCD_SPEED PCD_SPEED_FULL
  28. #endif
  29. #ifdef BSP_USBD_PHY_ULPI
  30. #define USBD_PCD_PHY_MODULE PCD_PHY_ULPI
  31. #elif BSP_USBD_PHY_UTMI
  32. #define USBD_PCD_PHY_MODULE PCD_PHY_UTMI
  33. #else
  34. #define USBD_PCD_PHY_MODULE PCD_PHY_EMBEDDED
  35. #endif
  36. #endif