summaryrefslogtreecommitdiff
path: root/lib/rt-thread
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2024-05-31 12:38:18 +0200
committerHiFiPhile <[email protected]>2024-05-31 12:38:18 +0200
commitb0f5422262a26fb1ab496e33bb8009efb6660788 (patch)
treedfd2570838592e9b822e701097f18b753f32bca6 /lib/rt-thread
parent67456357c54ee81e8418a9e814df774b1a3dee85 (diff)
parentd10b65ada4be7d5754b3128e80a9b4db72bdb23f (diff)
Merge branch 'master' of https://github.com/hathach/tinyusb into rx_fb
Diffstat (limited to 'lib/rt-thread')
-rw-r--r--lib/rt-thread/SConscript2
-rw-r--r--lib/rt-thread/tusb_config.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/rt-thread/SConscript b/lib/rt-thread/SConscript
index 482f6d7b2..34399fd45 100644
--- a/lib/rt-thread/SConscript
+++ b/lib/rt-thread/SConscript
@@ -34,6 +34,8 @@ if GetDepend(["PKG_TINYUSB_DEVICE_ENABLE"]):
src += ["../../src/class/cdc/cdc_device.c"]
if GetDepend(["PKG_TINYUSB_DEVICE_MSC"]):
src += ["../../src/class/msc/msc_device.c", "port/msc_device_port.c"]
+ if GetDepend(["PKG_TINYUSB_DEVICE_HID"]):
+ src += ["../../src/class/hid/hid_device.c"]
# for host stack
if GetDepend(["PKG_TINYUSB_HOST_ENABLE"]):
diff --git a/lib/rt-thread/tusb_config.h b/lib/rt-thread/tusb_config.h
index b3c3bf43f..11dc21983 100644
--- a/lib/rt-thread/tusb_config.h
+++ b/lib/rt-thread/tusb_config.h
@@ -152,12 +152,12 @@ extern "C" {
#define CFG_TUH_ENABLED (0)
#endif
-#if (PKG_TINYUSB_HOST_PORT == 0)
+#if (PKG_TINYUSB_HOST_PORT == 0) && defined(PKG_TINYUSB_HOST_ENABLE)
#undef CFG_TUSB_RHPORT0_MODE
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_HOST | PKG_TINYUSB_HOST_PORT_SPEED)
#endif
-#if (PKG_TINYUSB_HOST_PORT == 1)
+#if (PKG_TINYUSB_HOST_PORT == 1) && defined(PKG_TINYUSB_HOST_ENABLE)
#undef CFG_TUSB_RHPORT1_MODE
#define CFG_TUSB_RHPORT1_MODE (OPT_MODE_HOST | PKG_TINYUSB_HOST_PORT_SPEED)
#endif