Skip to content

Commit

Permalink
core: allow setting USB version in descriptor to USB 2 from config.h
Browse files Browse the repository at this point in the history
  • Loading branch information
stapelberg committed Jun 5, 2021
1 parent 9544b41 commit 65a36d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/config_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ This is a C header file that is one of the first things included, and will persi
* sets the USB polling rate in milliseconds for the keyboard, mouse, and shared (NKRO/media keys) interfaces
* `#define USB_SUSPEND_WAKEUP_DELAY 200`
* set the number of milliseconde to pause after sending a wakeup packet
* `#define USB_VERSION_2`
* set the USB device descriptor to USB version 2.
* `#define F_SCL 100000L`
* 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`.

Expand Down
4 changes: 4 additions & 0 deletions tmk_core/protocol/usb_descriptor.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,11 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = {
.Size = sizeof(USB_Descriptor_Device_t),
.Type = DTYPE_Device
},
#if defined(USB_VERSION_2)
.USBSpecification = VERSION_BCD(2, 0, 0),
#else
.USBSpecification = VERSION_BCD(1, 1, 0),
#endif

#if VIRTSER_ENABLE
.Class = USB_CSCP_IADDeviceClass,
Expand Down

0 comments on commit 65a36d4

Please sign in to comment.