Skip to content

Commit

Permalink
working I think, needs cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKevinWeiss committed Feb 15, 2023
1 parent 18c1195 commit 1b1fce2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
12 changes: 7 additions & 5 deletions boards/esp32s2-wemos-mini/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ config BOARD_ESP32S2_WEMOS_MINI
select HAS_PERIPH_USBDEV
select HAS_TINYUSB_DEVICE
select HAS_HIGHLEVEL_STDIO
# Use USB based STDIO if no other stdio is selected
# select MODULE_USBUS_CDC_ACM if TEST_KCONFIG && MODULE_USBUS
# select PACKAGE_TINYUSB if TEST_KCONFIG && !MODULE_USBUS

select USB_DEVICE if TEST_KCONFIG && !PROVIDES_NON_USB_STDIO
config FORCE_USB_STDIO
default y

choice STDIO_IMPLEMENTATION
default MODULE_STDIO_CDC_ACM if MODULE_USBUS
default MODULE_STDIO_TINYUSB_CDC_ACM if PACKAGE_TINYUSB
default MODULE_STDIO_CDC_ACM if MODULE_USBUS
endchoice

choice USB_IMPLEMENTATION
default PACKAGE_TINYUSB
endchoice

source "$(RIOTBOARD)/common/esp32s2/Kconfig"
9 changes: 9 additions & 0 deletions sys/Kconfig.stdio
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
menu "Standard Input/Output (STDIO)"
depends on TEST_KCONFIG

config FORCE_USB_STDIO
bool "Force a USB based STDIO"
depends on HAS_PERIPH_USBDEV || HAS_TINYUSB_DEVICE
select USB_DEVICE
select REQUIRES_USB_STDIO
help
To prevent a circular dependency, can force the USB modules to that
STDIO will select some sort of USB based STDIO backend.

choice STDIO_IMPLEMENTATION
bool "STDIO implementation"
default MODULE_STDIO_NATIVE if CPU_ARCH_NATIVE
Expand Down
1 change: 0 additions & 1 deletion sys/usb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ menuconfig USB_DEVICE
bool "USB device"
depends on HAS_PERIPH_USBDEV || HAS_TINYUSB_DEVICE || MODULE_USBDEV_MOCK
depends on TEST_KCONFIG
#default y if REQUIRES_USB_STDIO
help
Enable the USB device peripheral.

Expand Down
1 change: 1 addition & 0 deletions tests/pkg_tinyusb_cdc_msc/app.config.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG_USB_DEVICE=y
CONFIG_PACKAGE_TINYUSB=y
CONFIG_MODULE_TINYUSB_CLASS_CDC=y
CONFIG_MODULE_TINYUSB_CLASS_MSC=y

0 comments on commit 1b1fce2

Please sign in to comment.