1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-16 18:13:49 +01:00

cpu/gd32v: add periph_usbdev support

This commit is contained in:
Gunar Schorcht 2023-03-07 23:40:02 +01:00
parent 26d435a101
commit 81cf8a5eec
4 changed files with 8 additions and 2 deletions

View File

@ -30,6 +30,7 @@ config CPU_FAM_GD32V
select MODULE_PERIPH_CLIC if TEST_KCONFIG
select MODULE_PERIPH_WDT if MODULE_PERIPH_PM && HAS_PERIPH_WDT
select MODULE_USBDEV_SYNOPSYS_DWC2 if MODULE_PERIPH_USBDEV
select ZTIMER_USEC if MODULE_PERIPH_I2C
select PACKAGE_NMSIS_SDK

View File

@ -11,4 +11,8 @@ ifneq (,$(filter periph_i2c,$(USEMODULE)))
USEMODULE += ztimer_usec
endif
ifneq (,$(filter periph_usbdev,$(USEMODULE)))
USEMODULE += usbdev_synopsys_dwc2
endif
include $(RIOTCPU)/riscv_common/Makefile.dep

View File

@ -462,6 +462,7 @@ typedef struct {
* @name USB device definitions
* @{
*/
#define USBDEV_SET_ADDR_AFTER_STATUS 0 /**< Set device address after SETUP stage */
#define USBDEV_NUM_ENDPOINTS 4 /**< Number of USB OTG FS endpoints including EP0 */
/** @} */

View File

@ -70,7 +70,7 @@
#endif
/**
* @brief Total size of the FIFO
* @brief Total size of the FIFO in bytes
*/
#define DWC2_USB_OTG_FS_TOTAL_FIFO_SIZE (1280)