I change the HIDdescMap to
uint8_t reportDesc[] = {
0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x06, // Usage (Keyboard)
0xA1, 0x01, // Collection (Application)
0x05, 0x07, // Usage Page (Key Codes)
0x19, 0xe0, // Usage Minimum (224)
0x29, 0xe7, // Usage Maximum (231)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x75, 0x01, // Report Size (1)
0x95, 0x08, // Report Count (8)
0x81, 0x02, // Input (Data, Variable, Absolute)
0x95, 0x01, // Report Count (1)
0x75, 0x08, // Report Size (8)
0x81, 0x01, // Input (Constant) reserved byte(1)
0x95, 0x05, // Report Count (5)
0x75, 0x01, // Report Size (1)
0x05, 0x08, // Usage Page (Page# for LEDs)
0x19, 0x01, // Usage Minimum (1)
0x29, 0x05, // Usage Maximum (5)
0x91, 0x02, // Output (Data, Variable, Absolute), Led report
0x95, 0x01, // Report Count (1)
0x75, 0x03, // Report Size (3)
0x91, 0x01, // Output (Data, Variable, Absolute), Led report padding
0x95, 0x06, // Report Count (6)
0x75, 0x08, // Report Size (8)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x65, // Logical Maximum (101)
0x05, 0x07, // Usage Page (Key codes)
0x19, 0x00, // Usage Minimum (0)
0x29, 0x65, // Usage Maximum (101)
0x81, 0x00, // Input (Data, Array) Key array(6 bytes)
0x09, 0x05, // Usage (Vendor Defined)
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Count (2)
0x95, 0x02, // Report Size (8 bit)
0xB1, 0x02, // Feature (Data, Variable, Absolute)
0xC0 , // End Collection (Application)
#if 1
//radial
0x05, 0x01, // Usage Page (Generic Desktop) 0
0x09, 0x0e, // Usage (System Multi-Axis Controller) 2
0xa1, 0x01, // Collection (Application) 4
0x85, HID_RPT_ID_RADIAL_IN, // Report ID (1) 6
0x05, 0x0d, // Usage Page (Digitizers) 8
0x09, 0x21, // Usage (Puck) 10
0xa1, 0x02, // Collection (Logical) 12
0x15, 0x00, // Logical Minimum (0) 14
0x25, 0x01, // Logical Maximum (1) 16
0x75, 0x01, // Report Size (1) 18
0x95, 0x01, // Report Count (1) 20
0xa1, 0x00, // Collection (Physical) 22
0x05, 0x09, // Usage Page (Button) 24
0x09, 0x01, // Usage (Vendor Usage 0x01) 26
0x81, 0x02, // Input (Data,Var,Abs) 28
0x05, 0x0d, // Usage Page (Digitizers) 30
0x09, 0x33, // Usage (Touch) 32
0x81, 0x02, // Input (Data,Var,Abs) 34
0x95, 0x06, // Report Count (6) 36
0x81, 0x03, // Input (Cnst,Var,Abs) 38
0xa1, 0x02, // Collection (Logical) 40
0x05, 0x01, // Usage Page (Generic Desktop) 42
0x09, 0x37, // Usage (Dial) 44
0x16, 0x01, 0x80, // Logical Minimum (-32767) 46
0x26, 0xff, 0x7f, // Logical Maximum (32767) 49
0x75, 0x10, // Report Size (16) 52
0x95, 0x01, // Report Count (1) 54
0x81, 0x06, // Input (Data,Var,Rel) 56
0x35, 0x00, // Physical Minimum (0) 58
0x46, 0x10, 0x0e, // Physical Maximum (3600) 60
0x15, 0x00, // Logical Minimum (0) 63
0x26, 0x10, 0x0e, // Logical Maximum (3600) 65
0x09, 0x48, // Usage (Resolution Multiplier) 68
0xb1, 0x02, // Feature (Data,Var,Abs) 70
0x45, 0x00, // Physical Maximum (0) 72
0xc0, // End Collection 74
0x55, 0x0e, // Unit Exponent (-2) 75
0x65, 0x11, // Unit (Centimeter,SILinear) 77
0x46, 0x00, 0x00, // Physical Maximum (0) 79
0x26, 0x00, 0x00, // Logical Maximum (0) 82
0x09, 0x30, // Usage (X) 85
0x81, 0x42, // Input (Data,Var,Abs,Null) 87
0x09, 0x31, // Usage (Y) 89
0x46, 0x00, 0x00, // Physical Maximum (0) 91
0x26, 0x00, 0x00, // Logical Maximum (0) 94
0x81, 0x42, // Input (Data,Var,Abs,Null) 97
0x05, 0x0d, // Usage Page (Digitizers) 99
0x09, 0x48, // Usage (Width) 101
0x15, 0x3a, // Logical Minimum (58) 103
0x25, 0x3a, // Logical Maximum (58) 105
0x75, 0x08, // Report Size (8) 107
0x55, 0x0f, // Unit Exponent (-1) 109
0x35, 0x3a, // Physical Minimum (58) 111
0x45, 0x3a, // Physical Maximum (58) 113
0x81, 0x03, // Input (Cnst,Var,Abs) 115
0x55, 0x00, // Unit Exponent (0) 117
0x65, 0x00, // Unit (None) 119
0x35, 0x00, // Physical Minimum (0) 121
0x45, 0x00, // Physical Maximum (0) 123
0x05, 0x0e, // Usage Page (Haptic) 125
0x09, 0x01, // Usage (Simple Haptic Controller) 127
0xa1, 0x02, // Collection (Logical) 129
0x15, 0x00, // Logical Minimum (0) 131
0x26, 0xff, 0x00, // Logical Maximum (255) 133
0x09, 0x24, // Usage (Repeat Count) 136
0xb1, 0x42, // Feature (Data,Var,Abs,Null) 138
0x09, 0x24, // Usage (Repeat Count) 140
0x91, 0x42, // Output (Data,Var,Abs,Null) 142
0x15, 0x01, // Logical Minimum (1) 144
0x25, 0x07, // Logical Maximum (7) 146
0x09, 0x20, // Usage (Auto Trigger) 148
0xb1, 0x42, // Feature (Data,Var,Abs,Null) 150
0x09, 0x21, // Usage (Manual Trigger) 152
0x91, 0x42, // Output (Data,Var,Abs,Null) 154
0x25, 0x0a, // Logical Maximum (10) 156
0x09, 0x28, // Usage (Waveform Cutoff Time) 158
0xb1, 0x42, // Feature (Data,Var,Abs,Null) 160
0x75, 0x10, // Report Size (16) 162
0x26, 0xd0, 0x07, // Logical Maximum (2000) 164
0x09, 0x25, // Usage (Retrigger Period) 167
0xb1, 0x42, // Feature (Data,Var,Abs,Null) 169
0x09, 0x25, // Usage (Retrigger Period) 171
0x91, 0x42, // Output (Data,Var,Abs,Null) 173
0x85, HID_RPT_ID_MEDIA_IN, // Report ID (2) 175
0x75, 0x20, // Report Size (32) 177
0x17, 0x37, 0x00, 0x01, 0x00, // Logical Minimum (65591) 179
0x27, 0x37, 0x00, 0x01, 0x00, // Logical Maximum (65591) 184
0x09, 0x22, // Usage (Auto Trigger Associated Control) 189
0xb1, 0x02, // Feature (Data,Var,Abs) 191
0x09, 0x11, // Usage (Duration) 193
0xa1, 0x02, // Collection (Logical) 195
0x05, 0x0a, // Usage Page (Ordinals) 197
0x95, 0x03, // Report Count (3) 199
0x09, 0x03, // Usage (Vendor Usage 0x03) 201
0x09, 0x04, // Usage (Vendor Usage 0x04) 203
0x09, 0x05, // Usage (Vendor Usage 0x05) 205
0x75, 0x08, // Report Size (8) 207
0x15, 0x00, // Logical Minimum (0) 209
0x25, 0xff, // Logical Maximum (255) 211
0xb1, 0x02, // Feature (Data,Var,Abs) 213
0xc0, // End Collection 215
0x05, 0x0e, // Usage Page (Haptic) 216
0x09, 0x10, // Usage (Waveform) 218
0xa1, 0x02, // Collection (Logical) 220
0x05, 0x0a, // Usage Page (Ordinals) 222
0x95, 0x01, // Report Count (1) 224
0x15, 0x03, // Logical Minimum (3) 226
0x25, 0x03, // Logical Maximum (3) 228
0x36, 0x03, 0x10, // Physical Minimum (4099) 230
0x46, 0x03, 0x10, // Physical Maximum (4099) 233
0x09, 0x03, // Usage (Vendor Usage 0x03) 236
0xb1, 0x02, // Feature (Data,Var,Abs) 238
0x15, 0x04, // Logical Minimum (4) 240
0x25, 0x04, // Logical Maximum (4) 242
0x36, 0x04, 0x10, // Physical Minimum (4100) 244
0x46, 0x04, 0x10, // Physical Maximum (4100) 247
0x09, 0x04, // Usage (Vendor Usage 0x04) 250
0xb1, 0x02, // Feature (Data,Var,Abs) 252
0x15, 0x05, // Logical Minimum (5) 254
0x25, 0x05, // Logical Maximum (5) 256
0x36, 0x04, 0x10, // Physical Minimum (4100) 258
0x46, 0x04, 0x10, // Physical Maximum (4100) 261
0x09, 0x05, // Usage (Vendor Usage 0x05) 264
0xb1, 0x02, // Feature (Data,Var,Abs) 266
0x35, 0x00, // Physical Minimum (0) 268
0x45, 0x00, // Physical Maximum (0) 270
0xc0, // End Collection 272
0xc0, // End Collection 273
0xc0, // End Collection 274
0xc0, // End Collection 275
0xc0, // End Collection 276
#endif
};
and made HIDdescMapLen to the uint16_t from uint8_t
hid.reportDescLen = sizeof(reportDesc);
typedef struct hidServiceS {
/** TRUE if the device supports the
* boot protocol mode. FALSE otherwise
*/
uint8_t bootSupport;
/** Report Descriptor length */
uint16_t reportDescLen;
/** Report Descriptor */
but this change make the chip restart all the time
what's the matter with it?
what should i do to repair it?