Browse Source

Describe how PDOs are formatted

Each field's name and meaning is listed now, and the unsupported types
are no longer listed as if they are supported.  As always, I'd like to
support variable and battery PDOs, but I need hardware that sends them
to add such support.
Clara Hobbs 6 years ago
parent
commit
0391e106c5
1 changed files with 57 additions and 9 deletions
  1. 57
    9
      docs/console_config.md

+ 57
- 9
docs/console_config.md View File

198
 
198
 
199
 Prints the capabilities advertised by the Power Delivery source.  Each
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
200
 capability is represented by a Power Data Object (PDO), printed in the format
201
-listed in the PDO Format section below.
201
+listed in the PDO Format section below.  If there are no capabilities, e.g.
202
+when the source does not support USB Power Delivery, `No Source_Capabilities`
203
+is printed instead.
202
 
204
 
203
 ## Configuration Format
205
 ## Configuration Format
204
 
206
 
236
 
238
 
237
 The `v` field holds the fixed voltage of the configuration object, in volts.
239
 The `v` field holds the fixed voltage of the configuration object, in volts.
238
 The field's value is a floating-point decimal number, followed by a space and a
240
 The field's value is a floating-point decimal number, followed by a space and a
239
-capital V.  For example: `20.00 V`
241
+capital V.  For example: `20.00 V`.
240
 
242
 
241
 ### i
243
 ### i
242
 
244
 
243
 The `i` field holds the fixed current of the configuration object, in amperes.
245
 The `i` field holds the fixed current of the configuration object, in amperes.
244
 The field's value is a floating-point decimal number, followed by a space and a
246
 The field's value is a floating-point decimal number, followed by a space and a
245
-capital A.  For example: `2.25 A`
247
+capital A.  For example: `2.25 A`.
246
 
248
 
247
 ## PDO Format
249
 ## PDO Format
248
 
250
 
250
 
252
 
251
     PDO n: type
253
     PDO n: type
252
 
254
 
253
-`n` is the index of the PDO.  `type` is one of `fixed`, `variable`, `battery`,
254
-or the entire PDO represented as a 32-bit hexadecimal number if the type is
255
-unknown.  If `type` is not a hexadecimal number, the rest of the PDO is printed
256
-as a list of fields, one per line, each indented by a single ASCII tab
257
-character.  Each field is of the format:
255
+`n` is the index of the PDO.  `type` is one of `fixed`, or the entire PDO
256
+represented as a 32-bit hexadecimal number if the type is unknown.  If `type`
257
+is not a hexadecimal number, the rest of the PDO is printed as a list of
258
+fields, one per line, each indented by a single ASCII tab character.  Each
259
+field is of the format:
258
 
260
 
259
     name: value
261
     name: value
260
 
262
 
261
-**TODO**: describe exactly how each type of PDO is printed.
263
+### Source Fixed Supply PDO Fields
264
+
265
+This section describes how Source Fixed Supply PDOs (type `fixed`) are printed.
266
+For more information about the meaning of each field, see the USB Power
267
+Delivery Specification, Revision 2.0, Version 1.3, section 6.4.1.2.3.
268
+
269
+#### dual_role_pwr
270
+
271
+The `dual_role_pwr` field holds the value of the PDO's Dual-Role Power bit
272
+(B29).  If this field is not present, its value shall be assumed 0.
273
+
274
+#### usb_suspend
275
+
276
+The `usb_suspend` field holds the value of the PDO's USB Suspend Supported bit
277
+(B28).  If this field is not present, its value shall be assumed 0.
278
+
279
+#### unconstrained_pwr
280
+
281
+The `unconstrained_pwr` field holds the value of the PDO's Unconstrained Power
282
+bit (B27).  If this field is not present, its value shall be assumed 0.
283
+
284
+#### usb_comms
285
+
286
+The `usb_comms` field holds the value of the PDO's USB Communications Capable
287
+bit (B26).  If this field is not present, its value shall be assumed 0.
288
+
289
+#### dual_role_data
290
+
291
+The `dual_role_data` field holds the value of the PDO's Dual-Role Data bit
292
+(B25).  If this field is not present, its value shall be assumed 0.
293
+
294
+#### peak_i
295
+
296
+The `peak_i` field holds the value of the PDO's Peak Current field (B21-20), in
297
+decimal.  If this field is not present, its value shall be assumed 0.
298
+
299
+#### v
300
+
301
+The `v` field holds the value of the PDO's Voltage field (B19-10), in volts.
302
+The field's value is a floating-point decimal number, followed by a space and a
303
+capital V.  For example: `20.00 V`.
304
+
305
+#### i
306
+
307
+The `i` field holds the value of the PDO's Maximum Current field (B9-0), in
308
+amperes.  The field's value is a floating-point decimal number, followed by a
309
+space and a capital A.  For example: `2.25 A`.
262
 
310
 
263
 ## USB Descriptors
311
 ## USB Descriptors
264
 
312
 

Loading…
Cancel
Save