diff options
| author | Jeff Epler <jeff@adafruit.com> | 2020-07-30 07:15:20 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-30 07:15:20 -0500 |
| commit | d4801b8c54ebf6123d8efdf14999daeef0fbe056 (patch) | |
| tree | 9c4844ed29eb6b8d04ec0c12171ed4f06e64878b /supervisor | |
| parent | 510985ffbc3bf77f33c2eda7e5ba05b0af2f6d7d (diff) | |
| parent | b2ec77e554fb066e6a4b16862ff4fdc13170b086 (diff) | |
Merge pull request #3225 from hathach/improve-highspeed-usb
Improve highspeed usb
Diffstat (limited to 'supervisor')
| -rw-r--r-- | supervisor/shared/usb/tusb_config.h | 29 | ||||
| -rw-r--r-- | supervisor/supervisor.mk | 9 |
2 files changed, 6 insertions, 32 deletions
diff --git a/supervisor/shared/usb/tusb_config.h b/supervisor/shared/usb/tusb_config.h index 5b7230983..15d9fabaf 100644 --- a/supervisor/shared/usb/tusb_config.h +++ b/supervisor/shared/usb/tusb_config.h @@ -47,8 +47,6 @@ //--------------------------------------------------------------------+ // COMMON CONFIGURATION //--------------------------------------------------------------------+ -#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE - #ifndef CFG_TUSB_DEBUG #define CFG_TUSB_DEBUG 0 #endif @@ -58,8 +56,6 @@ #define CFG_TUSB_OS OPT_OS_NONE #endif //#define CFG_TUD_TASK_QUEUE_SZ 16 -//#define CFG_TUD_TASK_PRIO 0 -//#define CFG_TUD_TASK_STACK_SZ 150 //--------------------------------------------------------------------+ // DEVICE CONFIGURATION @@ -67,14 +63,6 @@ #define CFG_TUD_ENDOINT0_SIZE 64 -/*------------- Descriptors -------------*/ -/* Enable auto generated descriptor, tinyusb will try its best to create - * descriptor ( device, configuration, hid ) that matches enabled CFG_* in this file - * - * Note: All CFG_TUD_DESC_* are relevant only if CFG_TUD_DESC_AUTO is enabled - */ -#define CFG_TUD_DESC_AUTO 0 - //------------- CLASS -------------// #define CFG_TUD_CDC 1 #define CFG_TUD_MSC 1 @@ -86,23 +74,6 @@ /* CLASS DRIVER *------------------------------------------------------------------*/ -/* TX is sent automatically on every Start of Frame event ~ 1ms. - * If not enabled, application must call tud_cdc_flush() periodically - * Note: Enabled this could overflow device task, if it does, define - * CFG_TUD_TASK_QUEUE_SZ with large value - */ -#define CFG_TUD_CDC_FLUSH_ON_SOF 0 - - -/*------------- MSC -------------*/ -// Number of supported Logical Unit Number (At least 1) -#define CFG_TUD_MSC_MAXLUN 1 - -// Number of Blocks -#define CFG_TUD_MSC_BLOCK_NUM (256*1024)/512 - - - // Product revision string included in Inquiry response, max 4 bytes #define CFG_TUD_MSC_PRODUCT_REV "1.0" diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index 188536686..a066fc0fd 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -129,8 +129,8 @@ ifndef USB_HID_DEVICES USB_HID_DEVICES = "KEYBOARD,MOUSE,CONSUMER,GAMEPAD" endif -ifndef USB_MSC_MAX_PACKET_SIZE -USB_MSC_MAX_PACKET_SIZE = 64 +ifndef USB_HIGHSPEED +USB_HIGHSPEED = 0 endif ifndef USB_CDC_EP_NUM_NOTIFICATION @@ -178,7 +178,6 @@ USB_DESCRIPTOR_ARGS = \ --interface_name $(USB_INTERFACE_NAME)\ --devices $(USB_DEVICES)\ --hid_devices $(USB_HID_DEVICES)\ - --msc_max_packet_size $(USB_MSC_MAX_PACKET_SIZE)\ --cdc_ep_num_notification $(USB_CDC_EP_NUM_NOTIFICATION)\ --cdc_ep_num_data_out $(USB_CDC_EP_NUM_DATA_OUT)\ --cdc_ep_num_data_in $(USB_CDC_EP_NUM_DATA_IN)\ @@ -195,6 +194,10 @@ ifeq ($(USB_RENUMBER_ENDPOINTS), 0) USB_DESCRIPTOR_ARGS += --no-renumber_endpoints endif +ifeq ($(USB_HIGHSPEED), 1) +USB_DESCRIPTOR_ARGS += --highspeed +endif + $(BUILD)/supervisor/shared/translate.o: $(HEADER_BUILD)/qstrdefs.generated.h $(BUILD)/autogen_usb_descriptor.c $(BUILD)/genhdr/autogen_usb_descriptor.h: autogen_usb_descriptor.intermediate |
