Bladeren bron

Documentation improvements

Clara Hobbs 6 jaren geleden
bovenliggende
commit
cd9c514424
3 gewijzigde bestanden met toevoegingen van 13 en 4 verwijderingen
  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 Bestand weergeven

@@ -26,8 +26,15 @@
26 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 39
  * Contains working areas for statically allocated threads, and therefore must
33 40
  * be statically allocated!
@@ -53,6 +60,8 @@ struct pdb_config {
53 60
 
54 61
 /*
55 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 66
 void pdb_init(struct pdb_config *);
58 67
 

+ 1
- 1
lib/include/pdb_fusb.h Bestand weergeven

@@ -31,7 +31,7 @@
31 31
  * Configuration for the FUSB302B chip
32 32
  */
33 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 35
     I2CDriver *i2cp;
36 36
     /* The I2C address of the chip */
37 37
     i2caddr_t addr;

+ 2
- 2
src/main.c Bestand weergeven

@@ -84,8 +84,8 @@ static struct pdb_config pdb_config = {
84 84
         pdbs_dpm_transition_min,
85 85
         pdbs_dpm_transition_standby,
86 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 90
     .dpm_data = &dpm_data
91 91
 };

Laden…
Annuleren
Opslaan