Add constant offset to the field in the HID descriptor that provides the length of the HID Report descriptor

This commit is contained in:
mbanth
2021-05-26 16:39:03 +01:00
parent 6adc94642a
commit a9e97b33b9
2 changed files with 6 additions and 0 deletions

View File

@@ -2373,6 +2373,10 @@ const unsigned num_freqs_a1 = MAX(3, (0
#endif
#if( 0 < HID_CONTROLS )
#define USB_HID_DESCRIPTOR_OFFSET (18 + AC_TOTAL_LENGTH + (INPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + (OUTPUT_INTERFACES_A1 * (49 + num_freqs_a1 * 3)) + CONTROL_INTERFACE_BYTES + DFU_INTERFACE_BYTES + INTERFACE_DESCRIPTOR_BYTES)
#endif
#define CHARIFY_SR(x) (x & 0xff),((x & 0xff00)>> 8),((x & 0xff0000)>> 16)
#if (MIN_FREQ_FS < 12000) && (MAX_FREQ_FS > 48000)

View File

@@ -11,6 +11,8 @@
#ifndef _HID_DESCRIPTOR_
#define _HID_DESCRIPTOR_
#define HID_DESCRIPTOR_LENGTH_FIELD_OFFSET ( 7 )
/* USB HID Descriptor (section 6.2.1) */
typedef struct
{