1 /* 2 * Copyright (c) 2006-2023, 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 13 #include <rtconfig.h> 14 15 #ifdef BSP_USBD_TYPE_HS 16 #define USBD_IRQ_TYPE OTG_HS_IRQn 17 #define USBD_IRQ_HANDLER OTG_HS_IRQHandler 18 #define USBD_INSTANCE USB_OTG_HS 19 #else 20 #define USBD_IRQ_TYPE OTG_FS_IRQn 21 #define USBD_IRQ_HANDLER OTG_FS_IRQHandler 22 #define USBD_INSTANCE USB_OTG_FS 23 #endif 24 25 #ifdef BSP_USBD_SPEED_HS 26 #define USBD_PCD_SPEED PCD_SPEED_HIGH 27 #elif BSP_USBD_SPEED_HSINFS 28 #define USBD_PCD_SPEED PCD_SPEED_HIGH_IN_FULL 29 #else 30 #define USBD_PCD_SPEED PCD_SPEED_FULL 31 #endif 32 33 #ifdef BSP_USBD_PHY_ULPI 34 #define USBD_PCD_PHY_MODULE PCD_PHY_ULPI 35 #elif BSP_USBD_PHY_UTMI 36 #define USBD_PCD_PHY_MODULE PCD_PHY_UTMI 37 #else 38 #define USBD_PCD_PHY_MODULE PCD_PHY_EMBEDDED 39 #endif 40 41 #endif 42