1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/tinyusb: enable network device class in makefiles

This commit is contained in:
Gunar Schorcht 2022-11-13 13:19:03 +01:00
parent 5da9b2951f
commit 5b6a88e070
5 changed files with 36 additions and 10 deletions

View File

@ -8,10 +8,11 @@ PKG_LICENSE=MIT
include $(RIOTBASE)/pkg/pkg.mk
PSRC = $(PKG_SOURCE_DIR)/src
PLIB = $(PKG_SOURCE_DIR)/lib
.PHONY: all
all: $(filter tinyusb_% stdio_tinyusb_cdc_acm,$(USEMODULE))
all: $(filter tinyusb_% stdio_tinyusb_cdc_acm,$(filter-out tinyusb_class_net_%,$(USEMODULE)))
$(QQ)"$(MAKE)" -C $(PSRC) -f $(RIOTBASE)/Makefile.base MODULE=tinyusb
stdio_tinyusb_cdc_acm:
@ -50,10 +51,7 @@ tinyusb_class_midi:
tinyusb_class_msc:
$(QQ)"$(MAKE)" -C $(PSRC)/class/msc -f $(RIOTBASE)/Makefile.base MODULE=$@
tinyusb_class_net_ecm_rndis:
$(QQ)"$(MAKE)" -C $(PSRC)/class/net -f $(RIOTBASE)/Makefile.base MODULE=$@
tinyusb_class_net_ncm:
tinyusb_class_net:
$(QQ)"$(MAKE)" -C $(PSRC)/class/net -f $(RIOTBASE)/Makefile.base MODULE=$@
tinyusb_class_usbtmc:
@ -74,6 +72,9 @@ tinyusb_device:
tinyusb_host:
$(QQ)"$(MAKE)" -C $(PSRC)/host -f $(RIOTBASE)/Makefile.base MODULE=$@
tinyusb_lib_networking:
$(QQ)"$(MAKE)" -C $(PLIB)/networking -f $(RIOTPKG)/$(PKG_NAME)/Makefile.lib_networking
tinyusb_portable_espressif:
$(QQ)"$(MAKE)" -C $(PSRC)/portable/espressif/esp32sx -f $(RIOTBASE)/Makefile.base MODULE=$@

View File

@ -30,6 +30,21 @@ ifneq (,$(filter tinyusb_dfu,$(USEMODULE)))
endif
endif
ifneq (,$(filter tinyusb_class_net_%,$(USEMODULE)))
USEMODULE += tinyusb_class_net
endif
ifneq (,$(filter tinyusb_netdev,$(USEMODULE)))
USEMODULE += luid
USEMODULE += netdev_eth
USEMODULE += tinyusb_class_net
USEMODULE += tinyusb_device
endif
ifneq (,$(filter tinyusb_class_net_rndis,$(USEMODULE)))
USEMODULE += tinyusb_lib_networking
endif
ifeq (,$(filter tinyusb_class_%,$(USEMODULE)))
$(error At least one tinyusb_class_* module has to be enabled)
endif
@ -60,10 +75,7 @@ endif
ifneq (,$(filter tinyusb_class_midi,$(USEMODULE)))
USEMODULE += tinyusb_device
endif
ifneq (,$(filter tinyusb_class_net_ecm_rndis,$(USEMODULE)))
USEMODULE += tinyusb_device
endif
ifneq (,$(filter tinyusb_class_net_ncm,$(USEMODULE)))
ifneq (,$(filter tinyusb_class_net,$(USEMODULE)))
USEMODULE += tinyusb_device
endif
ifneq (,$(filter tinyusb_class_usbtmc,$(USEMODULE)))

View File

@ -1,3 +1,7 @@
PSEUDOMODULES += tinyusb_class_net_cdc_ecm
PSEUDOMODULES += tinyusb_class_net_cdc_ncm
PSEUDOMODULES += tinyusb_class_net_rndis
INCLUDES += -I$(RIOTBASE)/pkg/tinyusb/contrib
INCLUDES += -I$(RIOTBASE)/pkg/tinyusb/contrib/include
INCLUDES += -I$(RIOTBASE)/pkg/tinyusb/hw/include
@ -30,10 +34,14 @@ else
$(error CPU $(CPU) or CPU family $(CPU_FAM) not supported)
endif
ifneq (,$(filter tinyusb_class_net_ecm_rndis,$(USEMODULE)))
ifneq (,$(filter tinyusb_class_net tinyusb_lib_networking,$(USEMODULE)))
INCLUDES += -I$(PKGDIRBASE)/tinyusb/lib/networking
endif
ifneq (,$(filter tinyusb_dfu,$(USEMODULE)))
INCLUDES += -I$(RIOTBASE)/pkg/tinyusb/dfu/include
endif
ifneq (,$(filter tinyusb_netdev,$(USEMODULE)))
INCLUDES += -I$(RIOTBASE)/pkg/tinyusb/netdev/include
endif

View File

@ -0,0 +1,5 @@
MODULE = tinyusb_lib_networking
SRC = rndis_reports.c
include $(RIOTBASE)/Makefile.base