File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,10 @@ class USBDevice_SAMD21G18x {
5050 inline void noRunInStandby () { usb.CTRLA .bit .RUNSTDBY = 0 ; }
5151 inline void wakeupHost () { usb.CTRLB .bit .UPRSM = 1 ; }
5252
53+ // USB QoS
54+ inline void setDataSensitiveQoS () { usb.QOSCTRL .bit .DQOS = 2 ; }
55+ inline void setConfigSensitiveQoS () { usb.QOSCTRL .bit .CQOS = 2 ; }
56+
5357 // USB speed
5458 inline void setFullSpeed () { usb.CTRLB .bit .SPDCONF = USB_DEVICE_CTRLB_SPDCONF_FS_Val; }
5559 inline void setLowSpeed () { usb.CTRLB .bit .SPDCONF = USB_DEVICE_CTRLB_SPDCONF_LS_Val; }
Original file line number Diff line number Diff line change @@ -295,6 +295,8 @@ void USBDeviceClass::init()
295295 usbd.reset ();
296296
297297 usbd.calibrate ();
298+ usbd.setDataSensitiveQoS ();
299+ usbd.setConfigSensitiveQoS ();
298300 usbd.setUSBDeviceMode ();
299301 usbd.runInStandby ();
300302 usbd.setFullSpeed ();
You can’t perform that action at this time.
0 commit comments