Browse Source

Documentation improvements

Clara Hobbs 6 years ago
parent
commit
cd9c514424
3 changed files with 13 additions and 4 deletions
  1. 10
    1
      lib/include/pdb.h
  2. 1
    1
      lib/include/pdb_fusb.h
  3. 2
    2
      src/main.c

+ 10
- 1
lib/include/pdb.h View File

26
 #include <pdb_msg.h>
26
 #include <pdb_msg.h>
27
 
27
 
28
 
28
 
29
+/* Version information */
30
+#define PDB_LIB_VERSION "0.1.0"
31
+#define PDB_LIB_MAJOR 0
32
+#define PDB_LIB_MINOR 1
33
+#define PDB_LIB_PATCH 0
34
+
35
+
29
 /*
36
 /*
30
- * Structure for PD Buddy firmware library configuration
37
+ * Structure for one USB port's PD Buddy firmware library configuration
31
  *
38
  *
32
  * Contains working areas for statically allocated threads, and therefore must
39
  * Contains working areas for statically allocated threads, and therefore must
33
  * be statically allocated!
40
  * be statically allocated!
53
 
60
 
54
 /*
61
 /*
55
  * Initialize the PD Buddy firmware library, starting all its threads
62
  * Initialize the PD Buddy firmware library, starting all its threads
63
+ *
64
+ * The I2C driver must already be initialized before calling this function.
56
  */
65
  */
57
 void pdb_init(struct pdb_config *);
66
 void pdb_init(struct pdb_config *);
58
 
67
 

+ 1
- 1
lib/include/pdb_fusb.h View File

31
  * Configuration for the FUSB302B chip
31
  * Configuration for the FUSB302B chip
32
  */
32
  */
33
 struct pdb_fusb_config {
33
 struct pdb_fusb_config {
34
-    /* The I2C bus that the chip is connected to */
34
+    /* The I2C driver for the bus that the chip is connected to */
35
     I2CDriver *i2cp;
35
     I2CDriver *i2cp;
36
     /* The I2C address of the chip */
36
     /* The I2C address of the chip */
37
     i2caddr_t addr;
37
     i2caddr_t addr;

+ 2
- 2
src/main.c View File

84
         pdbs_dpm_transition_min,
84
         pdbs_dpm_transition_min,
85
         pdbs_dpm_transition_standby,
85
         pdbs_dpm_transition_standby,
86
         pdbs_dpm_transition_requested,
86
         pdbs_dpm_transition_requested,
87
-        pdbs_dpm_transition_requested, /* XXX type-c current */
88
-        NULL
87
+        pdbs_dpm_transition_requested, /* transition_typec */
88
+        NULL /* not_supported_received */
89
     },
89
     },
90
     .dpm_data = &dpm_data
90
     .dpm_data = &dpm_data
91
 };
91
 };

Loading…
Cancel
Save