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:
parent
26d435a101
commit
81cf8a5eec
@ -30,6 +30,7 @@ config CPU_FAM_GD32V
|
|||||||
|
|
||||||
select MODULE_PERIPH_CLIC if TEST_KCONFIG
|
select MODULE_PERIPH_CLIC if TEST_KCONFIG
|
||||||
select MODULE_PERIPH_WDT if MODULE_PERIPH_PM && HAS_PERIPH_WDT
|
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 ZTIMER_USEC if MODULE_PERIPH_I2C
|
||||||
select PACKAGE_NMSIS_SDK
|
select PACKAGE_NMSIS_SDK
|
||||||
|
|
||||||
|
|||||||
@ -11,4 +11,8 @@ ifneq (,$(filter periph_i2c,$(USEMODULE)))
|
|||||||
USEMODULE += ztimer_usec
|
USEMODULE += ztimer_usec
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(filter periph_usbdev,$(USEMODULE)))
|
||||||
|
USEMODULE += usbdev_synopsys_dwc2
|
||||||
|
endif
|
||||||
|
|
||||||
include $(RIOTCPU)/riscv_common/Makefile.dep
|
include $(RIOTCPU)/riscv_common/Makefile.dep
|
||||||
|
|||||||
@ -462,6 +462,7 @@ typedef struct {
|
|||||||
* @name USB device definitions
|
* @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 */
|
#define USBDEV_NUM_ENDPOINTS 4 /**< Number of USB OTG FS endpoints including EP0 */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|||||||
2
cpu/gd32v/include/vendor/usbdev_gd32v.h
vendored
2
cpu/gd32v/include/vendor/usbdev_gd32v.h
vendored
@ -70,7 +70,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Total size of the FIFO
|
* @brief Total size of the FIFO in bytes
|
||||||
*/
|
*/
|
||||||
#define DWC2_USB_OTG_FS_TOTAL_FIFO_SIZE (1280)
|
#define DWC2_USB_OTG_FS_TOTAL_FIFO_SIZE (1280)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user