Update 'USB config & command protocol'

Triss 2021-08-26 18:25:06 +00:00
parent af818a3b22
commit 361404f940
1 changed files with 6 additions and 0 deletions

@ -26,6 +26,12 @@ These commands work at any moment and are used to query the general device state
* 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 null-terminated string containing human-readable info about the device. For display purposes only. * Get info string (`0x04`): get a null-terminated string containing human-readable info about the device. For display purposes only.
### Persistent storage commands
* Get storage info (`0x0c`): returns the 256-byte header data of the persistent storage. No arguments.
* Get mode storage data (`0x0d`): returns the (variable-length) data of a mode. One argument byte, the mode.
* Flush data to storage medium (`0x0e`): writes the storage data when changed. Automatically called on OS USB detach/unmount (as long as there is still power supplied to the device).
## 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.