Mercurial > louis > kiibohd-controller
comparison Output/pjrcUSB/arm/usb_desc.c @ 430:d3cef419c849
Adding relative movement mouse key support
- Still very basic (lots of room for improvement)
- Capability format will likely change at some point
- 16 bit movement control, however repeat rate limits usability (will need KLL 0.4 to make better)
author | Jacob Alexander <haata@kiibohd.com> |
---|---|
date | Mon, 21 Mar 2016 22:23:57 -0700 |
parents | 970dab727f47 |
children | 45feb80a2ad1 |
comparison
equal
deleted
inserted
replaced
429:970dab727f47 | 430:d3cef419c849 |
---|---|
307 | 307 |
308 // Mouse Protocol 1, HID 1.11 spec, Appendix B, page 59-60, with wheel extension | 308 // Mouse Protocol 1, HID 1.11 spec, Appendix B, page 59-60, with wheel extension |
309 static uint8_t mouse_report_desc[] = { | 309 static uint8_t mouse_report_desc[] = { |
310 0x05, 0x01, // Usage Page (Generic Desktop) | 310 0x05, 0x01, // Usage Page (Generic Desktop) |
311 0x09, 0x02, // Usage (Mouse) | 311 0x09, 0x02, // Usage (Mouse) |
312 0xa1, 0x01, // Collection (Application) | 312 0xA1, 0x01, // Collection (Application) |
313 0x09, 0x02, // Usage (Mouse) | 313 0x09, 0x02, // Usage (Mouse) |
314 0xa1, 0x02, // Collection (Logical) | 314 0xA1, 0x02, // Collection (Logical) |
315 0x09, 0x01, // Usage (Pointer) | 315 0x09, 0x01, // Usage (Pointer) |
316 | 316 |
317 // Buttons (8 bits) | 317 // Buttons (16 bits) |
318 0xa1, 0x00, // Collection (Physical) - Buttons | 318 0xA1, 0x00, // Collection (Physical) - Buttons |
319 0x05, 0x09, // Usage Page (Button) | 319 0x05, 0x09, // Usage Page (Button) |
320 0x19, 0x01, // Usage Minimum (Button 1) | 320 0x19, 0x01, // Usage Minimum (Button 1) |
321 0x29, 0x08, // Usage Maximum (Button 8) | 321 0x29, 0x10, // Usage Maximum (Button 16) |
322 0x15, 0x00, // Logical Minimum (0) | 322 0x15, 0x00, // Logical Minimum (0) |
323 0x25, 0x01, // Logical Maximum (1) | 323 0x25, 0x01, // Logical Maximum (1) |
324 0x75, 0x01, // Report Size (1) | 324 0x75, 0x01, // Report Size (1) |
325 0x95, 0x08, // Report Count (8) | 325 0x95, 0x10, // Report Count (16) |
326 0x81, 0x02, // Input (Data,Var,Abs) | 326 0x81, 0x02, // Input (Data,Var,Abs) |
327 | 327 |
328 // Pointer (16 bits) | 328 // Pointer (32 bits) |
329 0x05, 0x01, // Usage PAGE (Generic Desktop) | 329 0x05, 0x01, // Usage PAGE (Generic Desktop) |
330 0x09, 0x30, // Usage (X) | 330 0x09, 0x30, // Usage (X) |
331 0x09, 0x31, // Usage (Y) | 331 0x09, 0x31, // Usage (Y) |
332 0x15, 0x81, // Logical Minimum (-127) | 332 0x16, 0x01, 0x80, // Logical Minimum (-32 767) |
333 0x25, 0x7f, // Logical Maximum (127) | 333 0x26, 0xFF, 0x7F, // Logical Maximum (32 767) |
334 0x75, 0x08, // Report Size (8) | 334 0x75, 0x10, // Report Size (16) |
335 0x95, 0x02, // Report Count (2) | 335 0x95, 0x02, // Report Count (2) |
336 0x81, 0x06, // Input (Data,Var,Rel) | 336 0x81, 0x06, // Input (Data,Var,Rel) |
337 | 337 |
338 /* | |
338 // Vertical Wheel | 339 // Vertical Wheel |
339 // - Multiplier (2 bits) | 340 // - Multiplier (2 bits) |
340 0xa1, 0x02, // Collection (Logical) | 341 0xa1, 0x02, // Collection (Logical) |
341 0x09, 0x48, // Usage (Resolution Multiplier) | 342 0x09, 0x48, // Usage (Resolution Multiplier) |
342 0x15, 0x00, // Logical Minimum (0) | 343 0x15, 0x00, // Logical Minimum (0) |
375 0x25, 0x7f, // Logical Maximum (127) | 376 0x25, 0x7f, // Logical Maximum (127) |
376 0x75, 0x08, // Report Size (8) | 377 0x75, 0x08, // Report Size (8) |
377 0x81, 0x06, // Input (Data,Var,Rel) | 378 0x81, 0x06, // Input (Data,Var,Rel) |
378 0xc0, // End Collection - Horizontal Wheel | 379 0xc0, // End Collection - Horizontal Wheel |
379 | 380 |
381 */ | |
380 0xc0, // End Collection - Buttons | 382 0xc0, // End Collection - Buttons |
381 0xc0, // End Collection - Mouse Logical | 383 0xc0, // End Collection - Mouse Logical |
382 0xc0 // End Collection - Mouse Application | 384 0xc0 // End Collection - Mouse Application |
383 }; | 385 }; |
384 | 386 |