# 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. # config HAS_TINYUSB_DEVICE bool help Indicates that the hardware supports tinyUSB device stack config HAS_TINYUSB_HOST bool help Indicates that the hardware supports tinyUSB host stack config REQUIRES_TINYUSB_DEVICE bool help Indicates that the application requires tinyUSB stack config ERROR_TINYUSB_DEVICE bool default y if REQUIRES_TINYUSB_DEVICE && !MODULE_TINYUSB_DEVICE help The USB implmentation is required to be tinyUSB but cannot be set choice USB_IMPLEMENTATION default PACKAGE_TINYUSB if REQUIRES_TINYUSB_DEVICE menuconfig PACKAGE_TINYUSB bool "TinyUSB stack package" depends on TEST_KCONFIG depends on HAS_ARCH_32BIT depends on HAS_TINYUSB_DEVICE || HAS_TINYUSB_HOST select MODULE_FMT select MODULE_LUID select MODULE_PERIPH_USBDEV_CLK select MODULE_SEMA select MODULE_TINYUSB_COMMON select MODULE_TINYUSB_CONTRIB select MODULE_TINYUSB_HW select MODULE_TINYUSB_PORTABLE_ESPRESSIF if CPU_FAM_ESP32S2 || CPU_FAM_ESP32S3 select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_FAM_GD32V # Whole STM32 families F2, F4, F7 and U5 use the Synopsys DWC2 USB OTG core select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if HAS_CPU_STM32F2 select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if HAS_CPU_STM32F4 select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if HAS_CPU_STM32F7 select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if HAS_CPU_STM32U5 # STM32F105xx and STM32F107xx lines also use the Synopsys DWC2 USB OTG core select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32F105XC select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32F107XC # Several lines of STM32L4 family also use the Synopsys DWC2 USB OTG core select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32L475XX select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32L476XX select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32L485XX select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32L486XX select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32L496XX select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32L4A6XX select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32L4P5XX select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32L4Q5XX select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32L4R5XX select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32L4R7XX select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32L4R9XX select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32L4S5XX select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32L4S7XX select MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 if CPU_LINE_STM32L4S9XX # Whole STM32 families F0, F3, G0, G4, L0, L1, L5 and WB use the Synopsys DWC2 USB OTG core select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if HAS_CPU_STM32F0 select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if HAS_CPU_STM32F3 select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if HAS_CPU_STM32G0 select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if HAS_CPU_STM32G4 select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if HAS_CPU_STM32L0 select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if HAS_CPU_STM32L1 select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if HAS_CPU_STM32L5 select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if HAS_CPU_STM32WB # STM32F102xx and STM32F103xx lines also use USB FS Device core select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if CPU_LINE_STM32F102X6 select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if CPU_LINE_STM32F102XB select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if CPU_LINE_STM32F103X6 select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if CPU_LINE_STM32F103XB select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if CPU_LINE_STM32F103XE select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if CPU_LINE_STM32F103XG # Following STM32L4 lines also use USB FS Device core select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if CPU_LINE_STM32L412XX select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if CPU_LINE_STM32L422XX select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if CPU_LINE_STM32L432XX select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if CPU_LINE_STM32L433XX select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if CPU_LINE_STM32L442XX select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if CPU_LINE_STM32L443XX select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if CPU_LINE_STM32L452XX select MODULE_TINYUSB_PORTABLE_STM32_FSDEV if CPU_LINE_STM32L462XX # select MODULE_TINYUSB_PORTABLE_MICROCHIP if CPU_FAM_SAMD21 || CPU_FAM_SAMR21 \ || CPU_COMMON_SAMD5X || CPU_FAM_SAML21 || CPU_FAM_SAMR34 \ || CPU_FAM_SAMR30 select MODULE_TINYUSB_PORTABLE_NRF5X if CPU_FAM_NRF52 select MODULE_ZTIMER_MSEC select PACKAGE_NRFX if CPU_FAM_NRF52 help tinyUSB is an open-source cross-platform USB Host/Device stack for embedded systems. if PACKAGE_TINYUSB config MODULE_AUTO_INIT_TINYUSB bool "Auto-initialize the tinyUSB package" depends on MODULE_AUTO_INIT default y help The tinyUSB stack including the used peripherals are initialized automatically at startup. Additionally, the auto-initialization starts the tinyUSB thread. config MODULE_TINYUSB_COMMON bool help Common tinyUSB files config MODULE_TINYUSB_CONTRIB bool help RIOT support for tinyUSB config MODULE_TINYUSB_HW bool help tinyUSB hardware driver implementation config MODULE_TINYUSB_DEVICE bool "Device Stack" depends on HAS_TINYUSB_DEVICE select MODULE_TINYUSB_CLASS_CDC if REQUIRES_USB_STDIO default y help Select to enable tinyUSB device stack config MODULE_TINYUSB_HOST bool "Host Stack" depends on HAS_TINYUSB_HOST help Select to enable tinyUSB host stack config MODULE_TINYUSB_LIB_NETWORKING bool config MODULE_TINYUSB_PORTABLE_ESPRESSIF bool help tinyUSB driver for ESP32Sx is used config MODULE_TINYUSB_PORTABLE_SYNOPSYS_DWC2 bool help tinyUSB Sysnopsys DCW2 driver is used config MODULE_TINYUSB_PORTABLE_STM32_FSDEV bool help tinyUSB STM32 FS device driver is used config MODULE_TINYUSB_PORTABLE_MICROCHIP bool help tinyUSB Microchip SAM0 driver is used config MODULE_TINYUSB_PORTABLE_NRF5X bool help tinyUSB nRFx device driver is used menu "Device Classes" config MODULE_TINYUSB_CLASS_AUDIO bool "Audio Class 2.0 (UAC2)" depends on MODULE_TINYUSB_DEVICE config MODULE_TINYUSB_CLASS_BTH bool "Bluetooth Host Controller Interface (BTH HCI)" depends on MODULE_TINYUSB_DEVICE rsource "Kconfig.cdc" rsource "dfu/Kconfig.dfu" rsource "dfu/Kconfig.dfu_rt" rsource "Kconfig.hid" rsource "Kconfig.msc" config MODULE_TINYUSB_CLASS_MIDI bool "Musical Instrument Digital Interface (MIDI)" depends on MODULE_TINYUSB_DEVICE rsource "Kconfig.net" config MODULE_TINYUSB_CLASS_USBTMC bool "Test and Measurement Class (USBTMC)" depends on MODULE_TINYUSB_DEVICE config MODULE_TINYUSB_CLASS_VENDOR bool "Vendor-specific class support with generic IN & OUT endpoints" config MODULE_TINYUSB_CLASS_VIDEO bool "Video class 1.5 (UVC)" depends on MODULE_TINYUSB_DEVICE endmenu if MODULE_TINYUSB_DEVICE config TUSBD_EP0_SIZE int "Device control endpoint (EP0) size [byte]" default 64 config TUSBD_FS_EP_SIZE int "Device endpoint size in Full-Speed mode [byte]" default 64 config TUSBD_HS_EP_SIZE int "Device endpoint size in High-Speed mode [byte]" default 512 config TUSBD_USE_CUSTOM_DESC bool "Custom device descriptors" depends on MODULE_TINYUSB_DEVICE help Enable this option to define custom descriptors for the selected device classes. Otherwise, generic descriptors will be generated according to the selected device classes. At the moment, the generation of generic descriptors is only supported for all combinations of up to two CDC interfaces, up to two generic In/Out HID interfaces, up to one MSC interface and up to one vendor interface. In all other cases, custom descriptors must be implemented and handled. config MODULE_TINYUSB_DFU bool "tinyUSB DFU driver module" select MODULE_TINYUSB_CLASS_DFU if MODULE_RIOTBOOT_TINYUSB_DFU select MODULE_TINYUSB_CLASS_DFU_RUNTIME if !MODULE_RIOTBOOT_TINYUSB_DFU help Enable tinyUSB Device Firmware Upgrade driver implementation used either in DFU mode by the bootloader or in DFU runtime mode by the application. It is enabled by default, if the tinyUSB DFU variant of the riotboot bootloader is used. config MODULE_RIOTBOOT_TINYUSB_DFU # TODO move to sys/riotboot/Kconfig once it is modelled bool "tinyUSB DFU variant of riotboot bootloader" depends on HAS_NO_IDLE_THREAD depends on HAS_PERIPH_PM select MODULE_RIOTBOOT_FLASHWRITE select MODULE_TINYUSB_DFU select MODULE_TINYUSB_CLASS_DFU select MODULE_ZTIMER_SEC help Enable this option to use the tinyUSB DFU variant of the riotboot bootloader. endif # MODULE_TINYUSB_DEVICE endif # PACKAGE_TINYUSB endchoice rsource "cdc_acm_stdio/Kconfig"