File tree 3 files changed +26
-4
lines changed
3 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 44
44
45
45
uint16_t const report_desc_size [HID_NUM_INTERFACES ] =
46
46
{
47
- 80
47
+ 85
48
48
};
49
49
uint8_t const report_len_input [HID_NUM_INTERFACES ] =
50
50
{
@@ -191,7 +191,7 @@ Collection(USB_HID_APPLICATION),
191
191
Collection (USB_HID_PHYSICAL ),
192
192
193
193
//
194
- // The X, Y and Z values which are specified as 8 -bit absolute
194
+ // The X, Y and Z values which are specified as 12 -bit absolute
195
195
// position values.
196
196
//
197
197
Usage (USB_HID_X ),
@@ -203,8 +203,11 @@ Collection(USB_HID_APPLICATION),
203
203
Usage (USB_HID_SLIDER ),
204
204
Usage (USB_HID_DIAL ),
205
205
//
206
- // 8 16-bit absolute values.
206
+ // 8 16-bit absolute values (but only 12 bit range due to 12-bit
207
+ // ADCs).
207
208
//
209
+ LogicalMinimum (0 ),
210
+ LogicalMaximum16b (4095 ),
208
211
ReportSize (16 ),
209
212
ReportCount (8 ),
210
213
Input (USB_HID_INPUT_DATA | USB_HID_INPUT_VARIABLE |
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ extern "C"
136
136
//***********************************************************************************************
137
137
#define SIZEOF_DEVICE_DESCRIPTOR 0x12
138
138
#define MAX_STRING_DESCRIPTOR_INDEX 5
139
- #define report_desc_size_HID0 80
139
+ #define report_desc_size_HID0 85
140
140
//#define SIZEOF_REPORT_DESCRIPTOR 36
141
141
//#define USBHID_REPORT_LENGTH 64 // length of whole HID report (including Report ID)
142
142
#define CONFIG_STRING_INDEX 4
Original file line number Diff line number Diff line change @@ -283,6 +283,25 @@ extern "C"
283
283
//*****************************************************************************
284
284
#define LogicalMaximum (i8Value ) 0x25, ((i8Value) & 0xff)
285
285
286
+ //*****************************************************************************
287
+ //
288
+ //! This is a macro to assist adding Logical Maximum entries in HID report
289
+ //! descriptors, when the representation of the logical maximum value requires
290
+ //! 16 bits to represent.
291
+ //!
292
+ //! \param i16Value is the Logical Maximum value.
293
+ //!
294
+ //! This macro takes a value and prepares it to be placed as a Logical Maximum
295
+ //! entry into a HID report structure. This is the actual maximum value for
296
+ //! the range of values associated with a field.
297
+ //!
298
+ //! \return Not a function.
299
+ //
300
+ //*****************************************************************************
301
+ #define LogicalMaximum16b (i16Value ) \
302
+ 0x26, ((i16Value) & 0xFF), \
303
+ (((i16Value) >> 8) & 0xFF)
304
+
286
305
//*****************************************************************************
287
306
//
288
307
//! This is a macro to assist adding Physical Minimum entries in HID report
You can’t perform that action at this time.
0 commit comments