From c2bfdcbd3a30243131330dbcefdfcabffccc9c1a Mon Sep 17 00:00:00 2001 From: Daniel Lublin Date: Fri, 25 Nov 2022 16:36:33 +0100 Subject: [PATCH] Document our little-endian integers as such Signed-off-by: Daniel Lublin --- doc/system_description/software.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/doc/system_description/software.md b/doc/system_description/software.md index 49c9ebe..102fa36 100644 --- a/doc/system_description/software.md +++ b/doc/system_description/software.md @@ -164,17 +164,19 @@ The commands look like this: The responses might include a one byte status field where 0 is `STATUS_OK` and 1 is `STATUS_BAD`. +Note that the integer types are little-endian (LE). + #### `FW_CMD_NAME_VERSION` (0x01) Get the name and version of the stick. #### `FW_RSP_NAME_VERSION` (0x02) -| *name* | *size (bytes)* | *comment* | -|---------|----------------|-----------------| -| name0 | 4 | ASCII | -| name1 | 4 | ASCII | -| version | 4 | Integer version | +| *name* | *size (bytes)* | *comment* | +|---------|----------------|----------------------| +| name0 | 4 | ASCII | +| name1 | 4 | ASCII | +| version | 4 | Integer version (LE) | 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* | |--------------|----------------|---------------------| -| size | 4 | | +| size | 4 | Integer (LE) | | uss-provided | 1 | 0 = false, 1 = true | | uss | 32 | Ignored if above 0 | @@ -236,10 +238,13 @@ Ask for the Unique Device Identifier (UDI) of the device. Response to `FW_CMD_GET_UDI`. -| *name* | *size (bytes)* | *comment* | -|--------|----------------|-------------------------------------------------| -| status | 1 | `STATUS_OK`/`STATUS_BAD` | -| udi | 8 | Vendor (2B), Product (1B), rev(4b), serial (4B) | +| *name* | *size (bytes)* | *comment* | +|--------|----------------|-----------------------------------------------------| +| status | 1 | `STATUS_OK`/`STATUS_BAD` | +| 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