Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/tinyusb: add tinyUSB netdev driver #18903

Merged
merged 8 commits into from
Feb 3, 2023
Prev Previous commit
Next Next commit
pkg/tinyusb: Kconfig support of network device class
  • Loading branch information
gschorcht committed Feb 1, 2023
commit 4e7bbb1bbed8802e957ffe1b2b207dc435576328
11 changes: 4 additions & 7 deletions pkg/tinyusb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ config MODULE_TINYUSB_HOST
help
Select to enable tinyUSB host stack

config MODULE_TINYUSB_LIB_NETWORKING
bool

config MODULE_TINYUSB_PORTABLE_ESPRESSIF
bool
help
Expand Down Expand Up @@ -170,13 +173,7 @@ menu "Device Classes"
bool "Musical Instrument Digital Interface (MIDI)"
depends on MODULE_TINYUSB_DEVICE

config MODULE_TINYUSB_CLASS_NET_ECM_RNDIS
bool "Network with RNDIS, Ethernet Control Model (ECM)"
depends on MODULE_TINYUSB_DEVICE

config MODULE_TINYUSB_CLASS_NET_NCM
bool "Network with Network Control Model (NCM)"
depends on MODULE_TINYUSB_DEVICE
rsource "Kconfig.net"

config MODULE_TINYUSB_CLASS_USBTMC
bool "Test and Measurement Class (USBTMC)"
Expand Down
60 changes: 60 additions & 0 deletions pkg/tinyusb/Kconfig.net
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright (c) 2022 Gunar Schorcht
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#

menuconfig MODULE_TINYUSB_CLASS_NET
bool "Network Device Class"
depends on MODULE_TINYUSB_DEVICE

if MODULE_TINYUSB_CLASS_NET

config MODULE_TINYUSB_CLASS_NET_CDC_ECM
bool "CDC ECM network device"
default y

config MODULE_TINYUSB_CLASS_NET_CDC_NCM
bool "CDC NCM network device"

config MODULE_TINYUSB_CLASS_NET_RNDIS
bool "RNDIS network device"
select MODULE_TINYUSB_LIB_NETWORKING

config TUSBD_NET_NUMOF
int
default 1

if TUSBD_NET_NUMOF > 0

config TUSBD_NET_NOTIF_EP_SIZE
int "Net Notification endpoint size [byte]"
default 64

config TUSBD_NET_FS_EP_SIZE
int "Net Full-Speed endpoint size [byte]"
default 64

config TUSBD_NET_HS_EP_SIZE
int "Net High-Speed endpoint size [byte]"
default 512

config TUSBD_NET_MTU_SIZE
int "MTU size [byte]"
default 1514

config TUSBD_NET_DESC_STRING
string "Class descriptor string"
default "TinyUSB Net"

config TUSBD_NET_CUSTOM_MAC
bool "Use custom MAC address string"

config TUSBD_NET_MAC_STRING
string "MAC address string"
depends on TUSBD_ECM_CUSTOM_MAC
default "0123456789ab"

endif # TUSBD_NET_NUMOF > 0
endif # MODULE_TINYUSB_CLASS_NET