Browse Source

Set version number, document USB descriptors

The iSerial descriptor now holds the firmware version number.  This is
1.0.0 since I don't expect any major API changes any time soon.  The USB
descriptors have been documented in docs/console_config.md so there
will be no questions as to how to identify the devices and what their
"serial numbers" mean.
Clara Hobbs 6 years ago
parent
commit
877ba234a8
2 changed files with 17 additions and 4 deletions
  1. 15
    0
      docs/console_config.md
  2. 2
    4
      src/usbcfg.c

+ 15
- 0
docs/console_config.md View File

@@ -1,5 +1,7 @@
1 1
 # PD Buddy Sink Serial Console Configuration Interface
2 2
 
3
+Version 1.0.0, 2017-06-05
4
+
3 5
 The PD Buddy Sink can be put into setup mode by holding the Setup button while
4 6
 plugging it into a computer.  In this mode, the device does not perform any USB
5 7
 Power Delivery communications, instead running a configuration console over a
@@ -214,3 +216,16 @@ capital V.  For example: `20.00 V`
214 216
 The `i` field holds the fixed current of the configuration object, in amperes.
215 217
 The field's value is a floating-point decimal number, followed by a space and a
216 218
 capital A.  For example: `2.25 A`
219
+
220
+## USB Descriptors
221
+
222
+The PD Buddy Sink can be identified by the following USB device descriptors:
223
+
224
+* idVendor: 0x1209 (InterBiometrics, or pid.codes)
225
+* idProduct: 0x9DB5 (PD Buddy Sink)
226
+
227
+The device's firmware version number is given in the iSerial descriptor.  The
228
+version number follows [Semantic Versioning][].  The serial console
229
+configuration interface is the API that the version number describes.
230
+
231
+[Semantic Versioning]: http://semver.org/

+ 2
- 4
src/usbcfg.c View File

@@ -187,11 +187,9 @@ static const uint8_t vcom_string2[] = {
187 187
  * Serial Number string.
188 188
  */
189 189
 static const uint8_t vcom_string3[] = {
190
-    USB_DESC_BYTE(8),                     /* bLength.                         */
190
+    USB_DESC_BYTE(12),                    /* bLength.                         */
191 191
     USB_DESC_BYTE(USB_DESCRIPTOR_STRING), /* bDescriptorType.                 */
192
-    '0' + CH_KERNEL_MAJOR, 0,
193
-    '0' + CH_KERNEL_MINOR, 0,
194
-    '0' + CH_KERNEL_PATCH, 0
192
+    '1', 0, '.', 0, '0', 0, '.', 0, '0', 0
195 193
 };
196 194
 
197 195
 /*

Loading…
Cancel
Save