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

Merge pull request #18742 from maribu/cpu/stm32/KConfig2

cpu/stm32: fix periph_usb modeling for STM32F1
This commit is contained in:
benpicco 2022-10-15 21:13:47 +02:00 committed by GitHub
commit 4fded73f63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View File

@ -13,9 +13,18 @@ config MODULE_PERIPH
# All STM32 families except for STM32F1, STM32F3 and STM32WG use
# MODULE_USBDEV_SYNOPSYS_DWC2
select MODULE_USBDEV_SYNOPSYS_DWC2 if MODULE_PERIPH_USBDEV && !HAS_CPU_STM32WB && !HAS_CPU_STM32F3 && !HAS_CPU_STM32F1
# NOTE: In STM32F1 family STM32F105xx and STM32F107xx also use
# MODULE_USBDEV_SYNOPSYS_DWC2. Add those MCUs once the are added to
# KConfig
# In STM32F1 family STM32F105xx also uses MODULE_USBDEV_SYNOPSYS_DWC2.
select MODULE_USBDEV_SYNOPSYS_DWC2 if MODULE_PERIPH_USBDEV && CPU_MODEL_STM32F105R8
select MODULE_USBDEV_SYNOPSYS_DWC2 if MODULE_PERIPH_USBDEV && CPU_MODEL_STM32F105RB
select MODULE_USBDEV_SYNOPSYS_DWC2 if MODULE_PERIPH_USBDEV && CPU_MODEL_STM32F105RC
select MODULE_USBDEV_SYNOPSYS_DWC2 if MODULE_PERIPH_USBDEV && CPU_MODEL_STM32F105V8
select MODULE_USBDEV_SYNOPSYS_DWC2 if MODULE_PERIPH_USBDEV && CPU_MODEL_STM32F105VB
select MODULE_USBDEV_SYNOPSYS_DWC2 if MODULE_PERIPH_USBDEV && CPU_MODEL_STM32F105VC
# In STM32F1 family STM32F107xx also uses MODULE_USBDEV_SYNOPSYS_DWC2.
select MODULE_USBDEV_SYNOPSYS_DWC2 if MODULE_PERIPH_USBDEV && CPU_MODEL_STM32F107RB
select MODULE_USBDEV_SYNOPSYS_DWC2 if MODULE_PERIPH_USBDEV && CPU_MODEL_STM32F107RC
select MODULE_USBDEV_SYNOPSYS_DWC2 if MODULE_PERIPH_USBDEV && CPU_MODEL_STM32F107VB
select MODULE_USBDEV_SYNOPSYS_DWC2 if MODULE_PERIPH_USBDEV && CPU_MODEL_STM32F107VC
help
stm32 common peripheral code.

View File

@ -51,7 +51,7 @@ endif
# Select the correct implementation for `periph_usbdev`
ifneq (,$(filter periph_usbdev,$(USEMODULE)))
ifneq (,$(filter f1 f3 wb,$(CPU_FAM)))
ifeq (,$(filter usbdev_synopsys_dwc2,$(USEMODULE)))
SRC += usbdev_fs.c
endif
endif