mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
Merge pull request #2657 from Rbb666/rtthread
[osal]Add usb-device and host macro controls.
This commit is contained in:
commit
37e638b3dd
@ -34,6 +34,8 @@ if GetDepend(["PKG_TINYUSB_DEVICE_ENABLE"]):
|
|||||||
src += ["../../src/class/cdc/cdc_device.c"]
|
src += ["../../src/class/cdc/cdc_device.c"]
|
||||||
if GetDepend(["PKG_TINYUSB_DEVICE_MSC"]):
|
if GetDepend(["PKG_TINYUSB_DEVICE_MSC"]):
|
||||||
src += ["../../src/class/msc/msc_device.c", "port/msc_device_port.c"]
|
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
|
# for host stack
|
||||||
if GetDepend(["PKG_TINYUSB_HOST_ENABLE"]):
|
if GetDepend(["PKG_TINYUSB_HOST_ENABLE"]):
|
||||||
|
@ -152,12 +152,12 @@ extern "C" {
|
|||||||
#define CFG_TUH_ENABLED (0)
|
#define CFG_TUH_ENABLED (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (PKG_TINYUSB_HOST_PORT == 0)
|
#if (PKG_TINYUSB_HOST_PORT == 0) && defined(PKG_TINYUSB_HOST_ENABLE)
|
||||||
#undef CFG_TUSB_RHPORT0_MODE
|
#undef CFG_TUSB_RHPORT0_MODE
|
||||||
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_HOST | PKG_TINYUSB_HOST_PORT_SPEED)
|
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_HOST | PKG_TINYUSB_HOST_PORT_SPEED)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (PKG_TINYUSB_HOST_PORT == 1)
|
#if (PKG_TINYUSB_HOST_PORT == 1) && defined(PKG_TINYUSB_HOST_ENABLE)
|
||||||
#undef CFG_TUSB_RHPORT1_MODE
|
#undef CFG_TUSB_RHPORT1_MODE
|
||||||
#define CFG_TUSB_RHPORT1_MODE (OPT_MODE_HOST | PKG_TINYUSB_HOST_PORT_SPEED)
|
#define CFG_TUSB_RHPORT1_MODE (OPT_MODE_HOST | PKG_TINYUSB_HOST_PORT_SPEED)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user