2022-11-13 13:19:03 +01:00
|
|
|
PSEUDOMODULES += tinyusb_class_net_cdc_ecm
|
|
|
|
PSEUDOMODULES += tinyusb_class_net_cdc_ncm
|
|
|
|
PSEUDOMODULES += tinyusb_class_net_rndis
|
|
|
|
|
2022-09-14 09:03:56 +02:00
|
|
|
INCLUDES += -I$(RIOTBASE)/pkg/tinyusb/contrib
|
|
|
|
INCLUDES += -I$(RIOTBASE)/pkg/tinyusb/contrib/include
|
|
|
|
INCLUDES += -I$(RIOTBASE)/pkg/tinyusb/hw/include
|
|
|
|
INCLUDES += -I$(PKGDIRBASE)/tinyusb/src
|
|
|
|
|
|
|
|
CFLAGS += -DCFG_TUSB_OS=OPT_OS_CUSTOM
|
|
|
|
CFLAGS += -Wno-format-nonliteral
|
|
|
|
|
2022-09-28 23:52:45 +02:00
|
|
|
ifeq (esp32s2,$(CPU_FAM))
|
|
|
|
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_ESP32S2
|
|
|
|
else ifeq (esp32s3,$(CPU_FAM))
|
|
|
|
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_ESP32S3
|
2022-10-21 07:20:49 +02:00
|
|
|
else ifeq (nrf52,$(CPU))
|
|
|
|
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_NRF5X
|
|
|
|
CFLAGS += -Wno-cast-align
|
|
|
|
CFLAGS += -Wno-unused-parameter
|
|
|
|
INCLUDES += -I$(PKGDIRBASE)/nrfx/hal
|
|
|
|
INCLUDES += -I$(PKGDIRBASE)/nrfx/drivers/include
|
|
|
|
INCLUDES += -I$(PKGDIRBASE)/nrfx/drivers/src
|
2022-09-14 09:29:06 +02:00
|
|
|
else ifeq (stm32,$(CPU))
|
|
|
|
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_STM32$(call uppercase_and_underscore,$(CPU_FAM))
|
2022-10-23 22:33:05 +02:00
|
|
|
CFLAGS += -Dasm=__asm
|
2022-10-04 21:08:48 +02:00
|
|
|
else ifeq (saml21,$(CPU))
|
|
|
|
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_SAML21
|
|
|
|
else ifeq (samd21,$(CPU))
|
|
|
|
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_SAMD21
|
|
|
|
else ifeq (samd5x,$(CPU))
|
|
|
|
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_SAME5X
|
2023-02-07 00:50:06 +01:00
|
|
|
else ifeq (gd32v,$(CPU))
|
|
|
|
CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_GD32VF103
|
2022-09-28 23:52:45 +02:00
|
|
|
else
|
2022-09-14 09:29:06 +02:00
|
|
|
$(error CPU $(CPU) or CPU family $(CPU_FAM) not supported)
|
2022-09-28 23:52:45 +02:00
|
|
|
endif
|
|
|
|
|
2022-11-13 13:19:03 +01:00
|
|
|
ifneq (,$(filter tinyusb_class_net tinyusb_lib_networking,$(USEMODULE)))
|
2022-09-14 09:03:56 +02:00
|
|
|
INCLUDES += -I$(PKGDIRBASE)/tinyusb/lib/networking
|
|
|
|
endif
|
2022-12-05 17:30:51 +01:00
|
|
|
|
|
|
|
ifneq (,$(filter tinyusb_dfu,$(USEMODULE)))
|
|
|
|
INCLUDES += -I$(RIOTBASE)/pkg/tinyusb/dfu/include
|
|
|
|
endif
|
2022-11-13 13:19:03 +01:00
|
|
|
|
|
|
|
ifneq (,$(filter tinyusb_netdev,$(USEMODULE)))
|
|
|
|
INCLUDES += -I$(RIOTBASE)/pkg/tinyusb/netdev/include
|
|
|
|
endif
|