1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/tinyusb/Makefile.dep
2022-10-21 18:09:38 +02:00

75 lines
2.3 KiB
Makefile

# tinyUSB mutexes use priority inheritance
# USEMODULE += core_mutex_priority_inheritance
# tinyUSB modules always needed
USEMODULE += tinyusb_common
USEMODULE += tinyusb_contrib
USEMODULE += tinyusb_hw
DEFAULT_MODULE += auto_init_tinyusb
ifeq (,$(filter tinyusb_class_%,$(USEMODULE)))
$(error At least one tinyusb_class_* module has to be enabled)
endif
# tinyUSB device stack has to be supported if tinyusb_device is used
ifneq (,$(filter tinyusb_device,$(USEMODULE)))
FEATURES_REQUIRED += tinyusb_device
endif
# tinyUSB host stack has to be supported if tinyusb_host is used
ifneq (,$(filter tinyusb_host,$(USEMODULE)))
FEATURES_REQUIRED += tinyusb_host
endif
# Following device classes work only with tinyUSB device stack
ifneq (,$(filter tinyusb_class_audio,$(USEMODULE)))
FEATURES_REQUIRED += tinyusb_device
endif
ifneq (,$(filter tinyusb_class_bth,$(USEMODULE)))
FEATURES_REQUIRED += tinyusb_device
endif
ifneq (,$(filter tinyusb_class_dfu,$(USEMODULE)))
FEATURES_REQUIRED += tinyusb_device
endif
ifneq (,$(filter tinyusb_class_dfu_runtime,$(USEMODULE)))
FEATURES_REQUIRED += tinyusb_device
endif
ifneq (,$(filter tinyusb_class_midi,$(USEMODULE)))
FEATURES_REQUIRED += tinyusb_device
endif
ifneq (,$(filter tinyusb_class_net_ecm_rndis,$(USEMODULE)))
FEATURES_REQUIRED += tinyusb_device
endif
ifneq (,$(filter tinyusb_class_net_ncm,$(USEMODULE)))
FEATURES_REQUIRED += tinyusb_device
endif
ifneq (,$(filter tinyusb_class_usbtmc,$(USEMODULE)))
FEATURES_REQUIRED += tinyusb_device
endif
ifneq (,$(filter tinyusb_class_video,$(USEMODULE)))
FEATURES_REQUIRED += tinyusb_device
endif
# tinyUSB hardware driver selection
ifneq (,$(filter esp32s2 esp32s3,$(CPU_FAM)))
USEMODULE += tinyusb_portable_espressif
else ifeq (nrf52,$(CPU))
USEPKG += nrfx
USEMODULE += tinyusb_portable_nrf5x
else ifneq (,$(filter saml21 samd5x samd21,$(CPU)))
USEMODULE += tinyusb_portable_microchip
else ifeq (stm32,$(CPU))
ifneq (,$(filter f2 f4 f7 h7 l4,$(CPU_FAM)))
USEMODULE += tinyusb_portable_synopsys_dwc2
else ifneq (,$(filter f0 f1 g4 l0 wb,$(CPU_FAM)))
# TODO not yet working, the driver has to be ported
USEMODULE += tinyusb_portable_stm32_fsdev
endif
endif
# other module dependencies
USEMODULE += periph_usbdev_clk
USEMODULE += sema
USEMODULE += ztimer_msec