mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2024-12-25 07:29:25 -05:00
Document our little-endian integers as such
Signed-off-by: Daniel Lublin <daniel@lublin.se>
This commit is contained in:
parent
a0974a2c0b
commit
5435ed723d
@ -164,6 +164,8 @@ The commands look like this:
|
|||||||
The responses might include a one byte status field where 0 is
|
The responses might include a one byte status field where 0 is
|
||||||
`STATUS_OK` and 1 is `STATUS_BAD`.
|
`STATUS_OK` and 1 is `STATUS_BAD`.
|
||||||
|
|
||||||
|
Note that the integer types are little-endian (LE).
|
||||||
|
|
||||||
#### `FW_CMD_NAME_VERSION` (0x01)
|
#### `FW_CMD_NAME_VERSION` (0x01)
|
||||||
|
|
||||||
Get the name and version of the stick.
|
Get the name and version of the stick.
|
||||||
@ -171,10 +173,10 @@ Get the name and version of the stick.
|
|||||||
#### `FW_RSP_NAME_VERSION` (0x02)
|
#### `FW_RSP_NAME_VERSION` (0x02)
|
||||||
|
|
||||||
| *name* | *size (bytes)* | *comment* |
|
| *name* | *size (bytes)* | *comment* |
|
||||||
|---------|----------------|-----------------|
|
|---------|----------------|----------------------|
|
||||||
| name0 | 4 | ASCII |
|
| name0 | 4 | ASCII |
|
||||||
| name1 | 4 | ASCII |
|
| name1 | 4 | ASCII |
|
||||||
| version | 4 | Integer version |
|
| version | 4 | Integer version (LE) |
|
||||||
|
|
||||||
In a bad response the fields will be zeroed.
|
In a bad response the fields will be zeroed.
|
||||||
|
|
||||||
@ -182,7 +184,7 @@ In a bad response the fields will be zeroed.
|
|||||||
|
|
||||||
| *name* | *size (bytes)* | *comment* |
|
| *name* | *size (bytes)* | *comment* |
|
||||||
|--------------|----------------|---------------------|
|
|--------------|----------------|---------------------|
|
||||||
| size | 4 | |
|
| size | 4 | Integer (LE) |
|
||||||
| uss-provided | 1 | 0 = false, 1 = true |
|
| uss-provided | 1 | 0 = false, 1 = true |
|
||||||
| uss | 32 | Ignored if above 0 |
|
| uss | 32 | Ignored if above 0 |
|
||||||
|
|
||||||
@ -237,9 +239,12 @@ Ask for the Unique Device Identifier (UDI) of the device.
|
|||||||
Response to `FW_CMD_GET_UDI`.
|
Response to `FW_CMD_GET_UDI`.
|
||||||
|
|
||||||
| *name* | *size (bytes)* | *comment* |
|
| *name* | *size (bytes)* | *comment* |
|
||||||
|--------|----------------|-------------------------------------------------|
|
|--------|----------------|-----------------------------------------------------|
|
||||||
| status | 1 | `STATUS_OK`/`STATUS_BAD` |
|
| status | 1 | `STATUS_OK`/`STATUS_BAD` |
|
||||||
| udi | 8 | Vendor (2B), Product (1B), rev(4b), serial (4B) |
|
| udi | 4 | Integer (LE) with Reserved (4 bit), Vendor (2 byte),|
|
||||||
|
| | | Product (1 byte), Revision (4 bit) |
|
||||||
|
| udi | 4 | Integer serial number (LE) |
|
||||||
|
|
||||||
|
|
||||||
#### Get the name and version of the device
|
#### Get the name and version of the device
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user