better multiple interfaces support for cdc device

This commit is contained in:
hathach
2018-07-13 00:32:02 +07:00
parent a4292e5906
commit a623f0c179
5 changed files with 112 additions and 78 deletions

View File

@@ -107,6 +107,8 @@
#define MODE_HOST_SUPPORTED (CONTROLLER_HOST_NUMBER > 0)
#define MODE_DEVICE_SUPPORTED (CONTROLLER_DEVICE_NUMBER > 0)
#define TUD_RHPORT ((CFG_TUSB_RHPORT0_MODE & OPT_MODE_DEVICE) ? 0 : ((CFG_TUSB_RHPORT1_MODE & OPT_MODE_DEVICE) ? 1 : -1))
#if !MODE_HOST_SUPPORTED && !MODE_DEVICE_SUPPORTED
#error please configure at least 1 CFG_TUSB_CONTROLLER_N_MODE to OPT_MODE_HOST and/or OPT_MODE_DEVICE
#endif