This shows you the differences between two versions of the page.
|
usb_protocol_information [2007/02/12 20:59] hydra |
usb_protocol_information [2010/05/10 19:05] (current) |
||
|---|---|---|---|
| Line 203: | Line 203: | ||
| Fill with 0x00's | Fill with 0x00's | ||
| + | |||
| + | ==== Unknown Command 1 ==== | ||
| + | |||
| + | The Ergodex software sends this command when recording macros. It has the effect of momentarily turning of the red LED. The green LED remains on. The command it sent once a second and the red led blinks off once a second. | ||
| + | |||
| + | __Usage__ | ||
| + | |||
| + | Only seen being sent when the device is in "Test" mode. | ||
| + | |||
| + | __Request Code__ | ||
| + | |||
| + | 0x08 | ||
| + | |||
| + | __Request Data__ | ||
| + | |||
| + | Unknown. | ||
| + | |||
| + | Here's what the ergodex software sends (complete request, including command code). | ||
| + | |||
| + | <code> | ||
| + | 08 00 00 00 00 00 01 01 00 00 00 00 00 00 00 00 | ||
| + | </code> | ||
| ===== Event and Response Data ===== | ===== Event and Response Data ===== | ||
| Line 226: | Line 248: | ||
| This indicates the values are additive, it has been reported it's possible to assign a key to "Modifier Key" and use the value 0x07 which simulates pressing all the keys together. | This indicates the values are additive, it has been reported it's possible to assign a key to "Modifier Key" and use the value 0x07 which simulates pressing all the keys together. | ||
| + | |||
| Line 266: | Line 289: | ||
| * Byte 4: bit-mapped button status. | * Byte 4: bit-mapped button status. | ||
| - | The last two bits indicate the current status of the buttons | + | The first two bits indicate the current status of the buttons |
| 0x00 - 00 - both buttons pressed | 0x00 - 00 - both buttons pressed | ||
| Line 273: | Line 296: | ||
| 0x03 - 11 - no buttons pressed | 0x03 - 11 - no buttons pressed | ||
| - | When these two bits are inversed they make up a bitmask of the button status. When inversed the first bit (lsb) is 1 when the hand button is pressed and the second bit is 1 when the record button is pressed. | + | When these two bits are inverted they make up a bitmask of the button status. When inverted the first bit (lsb) is 1 when the hand button is pressed and the second bit is 1 when the record button is pressed. |
| + | |||
| + | example: | ||
| + | <code> | ||
| + | #define PRES_EROGODEXDX1_OFFSET_STATUS_BUTTONS 0x04 | ||
| + | |||
| + | #define PRES_EROGDEXDX1_BITMASK_BUTTON_HAND ( 1 << 0 ) | ||
| + | #define PRES_EROGDEXDX1_BITMASK_BUTTON_RECORD ( 1 << 1 ) | ||
| + | |||
| + | BOOL bRecordButtonPressed = !(*(pResponseData + PRES_EROGODEXDX1_OFFSET_STATUS_BUTTONS) & PRES_EROGDEXDX1_BITMASK_BUTTON_RECORD); | ||
| + | BOOL bHandButtonPressed = !(*(pResponseData + PRES_EROGODEXDX1_OFFSET_STATUS_BUTTONS) & PRES_EROGDEXDX1_BITMASK_BUTTON_HAND); | ||
| + | </code> | ||
| * Byte 5: keymap status | * Byte 5: keymap status | ||