Update 'USB config & command protocol'

Triss 2021-07-11 02:10:28 +00:00
parent 386b06c0ca
commit 280adacf00
1 changed files with 2 additions and 2 deletions

@ -23,13 +23,13 @@ These commands work at any moment and are used to query the general device state
* Get modes (`0x01`): returns 2 bytes with a bitmap containing all supported modes. Bit 0 is for general config (aka this command group) and must always be 1. * Get modes (`0x01`): returns 2 bytes with a bitmap containing all supported modes. Bit 0 is for general config (aka this command group) and must always be 1.
* Get cur mode (`0x02`): returns a single byte containing the current mode number. * Get cur mode (`0x02`): returns a single byte containing the current mode number.
* Set cur mode (`0x03`): sets the current mode. One extra request byte (the mode number), no response payload. * Set cur mode (`0x03`): sets the current mode. One extra request byte (the mode number), no response payload.
* Get info string (`0x04`): get a string containing human-readable info about the device. For display purposes only. * Get info string (`0x04`): get a string containing human-readable info about the device. For display purposes only. Should not exceed the USB buffer size (64 bytes).
## Common mode commands ## Common mode commands
These commands work for any mode, and have the same effect across all of them. These commands work for any mode, and have the same effect across all of them.
* Get name (`0xM0`): returns a name or other descriptive string in the payload. For display purposes only. * Get name (`0xM0`): returns a name or other descriptive string in the payload. For display purposes only. Should not exceed the USB buffer size (64 bytes).
* Get version (`0xM1`): returns a 2-byte version number in the payload. * Get version (`0xM1`): returns a 2-byte version number in the payload.
* Get features (`0xM2`): gets a bitmap of supported features. Length and meaning of the bits depends on the mode. * Get features (`0xM2`): gets a bitmap of supported features. Length and meaning of the bits depends on the mode.