Skip to content

Commit 65a36d4

Browse files
committed
core: allow setting USB version in descriptor to USB 2 from config.h
1 parent 9544b41 commit 65a36d4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/config_options.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ This is a C header file that is one of the first things included, and will persi
105105
* sets the USB polling rate in milliseconds for the keyboard, mouse, and shared (NKRO/media keys) interfaces
106106
* `#define USB_SUSPEND_WAKEUP_DELAY 200`
107107
* set the number of milliseconde to pause after sending a wakeup packet
108+
* `#define USB_VERSION_2`
109+
* set the USB device descriptor to USB version 2.
108110
* `#define F_SCL 100000L`
109111
* sets the I2C clock rate speed for keyboards using I2C. The default is `400000L`, except for keyboards using `split_common`, where the default is `100000L`.
110112

tmk_core/protocol/usb_descriptor.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,11 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = {
351351
.Size = sizeof(USB_Descriptor_Device_t),
352352
.Type = DTYPE_Device
353353
},
354+
#if defined(USB_VERSION_2)
355+
.USBSpecification = VERSION_BCD(2, 0, 0),
356+
#else
354357
.USBSpecification = VERSION_BCD(1, 1, 0),
358+
#endif
355359

356360
#if VIRTSER_ENABLE
357361
.Class = USB_CSCP_IADDeviceClass,

0 commit comments

Comments
 (0)