mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 10:03:50 +01:00
cpu/stm32: use USB EP number when defined in CMSIS
This commit is contained in:
parent
6894ee4106
commit
fc7b4ed06b
@ -131,20 +131,24 @@ typedef struct {
|
|||||||
* @brief Number of endpoints available with the OTG FS peripheral
|
* @brief Number of endpoints available with the OTG FS peripheral
|
||||||
* including the control endpoint
|
* including the control endpoint
|
||||||
*/
|
*/
|
||||||
#ifdef STM32_USB_OTG_CID_1x
|
#if defined(USB_OTG_FS_MAX_IN_ENDPOINTS)
|
||||||
#define STM32_USB_OTG_FS_NUM_EP (4) /**< OTG FS with 4 endpoints */
|
#define STM32_USB_OTG_FS_NUM_EP (USB_OTG_FS_MAX_IN_ENDPOINTS)
|
||||||
|
#elif defined(STM32_USB_OTG_CID_1x)
|
||||||
|
#define STM32_USB_OTG_FS_NUM_EP (4) /**< OTG FS with 4 endpoints */
|
||||||
#elif defined(STM32_USB_OTG_CID_2x)
|
#elif defined(STM32_USB_OTG_CID_2x)
|
||||||
#define STM32_USB_OTG_FS_NUM_EP (6) /**< OTG FS with 6 endpoints */
|
#define STM32_USB_OTG_FS_NUM_EP (6) /**< OTG FS with 6 endpoints */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Number of endpoints available with the OTG HS peripheral
|
* @brief Number of endpoints available with the OTG HS peripheral
|
||||||
* including the control endpoint
|
* including the control endpoint
|
||||||
*/
|
*/
|
||||||
#ifdef STM32_USB_OTG_CID_1x
|
#if defined(USB_OTG_HS_MAX_IN_ENDPOINTS)
|
||||||
#define STM32_USB_OTG_HS_NUM_EP (6) /**< OTG HS with 6 endpoints */
|
#define STM32_USB_OTG_HS_NUM_EP (USB_OTG_HS_MAX_IN_ENDPOINTS)
|
||||||
|
#elif defined(STM32_USB_OTG_CID_1x)
|
||||||
|
#define STM32_USB_OTG_HS_NUM_EP (6) /**< OTG HS with 6 endpoints */
|
||||||
#elif defined(STM32_USB_OTG_CID_2x)
|
#elif defined(STM32_USB_OTG_CID_2x)
|
||||||
#define STM32_USB_OTG_HS_NUM_EP (9) /**< OTG HS with 9 endpoints */
|
#define STM32_USB_OTG_HS_NUM_EP (9) /**< OTG HS with 9 endpoints */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user