Browse Source

Added information about how PDOs will be printed

Still preliminary, but the general idea is that each PDO will be printed
similarly to how a configuration object is printed, but numbered and
indented to make a nice human- and machine-readable list.
Clara Hobbs 6 years ago
parent
commit
0488f3d42f
1 changed files with 26 additions and 1 deletions
  1. 26
    1
      docs/console_config.md

+ 26
- 1
docs/console_config.md View File

@@ -1,6 +1,6 @@
1 1
 # PD Buddy Sink Serial Console Configuration Interface
2 2
 
3
-Version 1.1.0-dev, 2017-07-27
3
+Version 1.1.0-dev, 2017-07-28
4 4
 
5 5
 The PD Buddy Sink can be put into setup mode by holding the Setup button while
6 6
 plugging it into a computer.  In this mode, the device runs a configuration
@@ -192,6 +192,14 @@ This command only affects whether the output can be turned on during the
192 192
 ongoing run of Setup mode.  The output is disabled in Setup mode by default,
193 193
 and is always enabled in Sink mode.
194 194
 
195
+### get_source_cap
196
+
197
+Usage: `get_source_cap`
198
+
199
+Prints the capabilities advertised by the Power Delivery source.  Each
200
+capability is represented by a Power Data Object (PDO), printed in the format
201
+listed in the PDO Format section below.
202
+
195 203
 ## Configuration Format
196 204
 
197 205
 Wherever a configuration object is printed, the following format is used.
@@ -236,6 +244,23 @@ The `i` field holds the fixed current of the configuration object, in amperes.
236 244
 The field's value is a floating-point decimal number, followed by a space and a
237 245
 capital A.  For example: `2.25 A`
238 246
 
247
+## PDO Format
248
+
249
+Wherever a PDO is printed, the following format is used.  
250
+
251
+A PDO consists of a number of fields, one per line.  Each field is of the
252
+format:
253
+
254
+    name: value
255
+
256
+When a list of PDOs is printed, each PDO is numbered with a line as follows:
257
+
258
+    PDO #1:
259
+
260
+The fields of such a PDO are each indented by a single ASCII tab character.
261
+
262
+**TODO**: describe exactly how each type of PDO is printed.
263
+
239 264
 ## USB Descriptors
240 265
 
241 266
 The PD Buddy Sink can be identified by the following USB device descriptors:

Loading…
Cancel
Save