usbd_config.h 941 B

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