|
|
View previous topic :: View next topic |
Author |
Message |
andreahmed
Joined: 09 Dec 2020 Posts: 13
|
|
Posted: Thu Dec 10, 2020 4:57 pm |
|
|
I have made very good progress.
Now I can make two throttles, but once when I add X, Y axis, the USB is not recognized at all:
Code: |
0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
0x15, 0x00, // Logical Minimum (0)
0x09, 0x04, // Usage (Joystick)
0xA1, 0x01, // Collection (Application)
0x05, 0x02, // Usage Page (Sim Ctrls)
0x09, 0xBB, // Usage (Throttle)
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Size (8)
0x95, 0x01, // Report Count (1)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x09, 0xBB, // Usage (Throttle)
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Size (8)
0x95, 0x01, // Report Count (1)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x01, // USAGE (Pointer)
0xA1, 0x00, // COLLECTION (Physical)
0x09, 0x30, // USAGE (X)
0x09, 0x31, // USAGE (Y)
0x95, 0x02, // REPORT_COUNT (2)
0x81, 0x02, // INPUT (Data Var Abs)}
0xC0 // End Collection |
|
|
|
andreahmed
Joined: 09 Dec 2020 Posts: 13
|
|
Posted: Thu Dec 10, 2020 5:09 pm |
|
|
I finally DID IT,
MANY THANKS
Code: |
const char USB_CLASS_SPECIFIC_DESC[] = {
0x05, 0x01, // Usage Page (Generic Desktop Ctrls)
0x15, 0x00, // Logical Minimum (0)
0x09, 0x04, // Usage (Joystick)
0xA1, 0x01, // Collection (Application)
0x05, 0x02, // Usage Page (Sim Ctrls)
0x09, 0xBB, // Usage (Throttle)
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Size (8)
0x95, 0x01, // Report Count (1)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x09, 0xBB, // Usage (Throttle)
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x00, // Logical Maximum (255)
0x75, 0x08, // Report Size (8)
0x95, 0x01, // Report Count (1)
0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position)
0x81, 0x01, // input (constant) Bit stuff to fill byte
0x05, 0x01, // usage page (generic desktop) Choose the usage pare “X” and “Y” are on
0x09, 0x30, // usage (X) X direction of pointer
0x09, 0x31, // usage (Y) Y direction of pointer
0x09, 0x38 // usage (wheel)
0x15, 0x81, // logical minimum (-127) Range of report data is -127 to 127
0x25, 0x7F, // logical maximum (127)
0x75, 0x08, // report size (8) Two reports, eight bits each
0x95, 0x03, // report count (3)
0x81, 0x06, // input (data, variable, absolute) Defined bits above are data bits
0xC0
}; |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|