Update 'USB config & command protocol'

Triss 2021-07-15 02:47:14 +00:00
parent c852f58231
commit d7d05a655d
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. Should not exceed the USB buffer size (64 bytes). * Get info string (`0x04`): get a null-terminated string containing human-readable info about the device. For display purposes only.
## 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. Should not exceed the USB buffer size (64 bytes). * Get name (`0xM0`): returns a name or other descriptive string in the payload. Null-terminated, for display purposes only.
* 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.