Browse Source

Initialize the message pool in pdb_init()

Clara Hobbs 6 years ago
parent
commit
d9b2b5719c
2 changed files with 4 additions and 4 deletions
  1. 4
    0
      lib/src/pdb.c
  2. 0
    4
      src/main.c

+ 4
- 0
lib/src/pdb.c View File

@@ -23,10 +23,14 @@
23 23
 #include "hard_reset.h"
24 24
 #include "int_n.h"
25 25
 #include "fusb302b.h"
26
+#include "messages.h"
26 27
 
27 28
 
28 29
 void pdb_init(struct pdb_config *cfg)
29 30
 {
31
+    /* Initialize the empty message pool */
32
+    pdb_msg_pool_init(/*TODO cfg*/);
33
+
30 34
     /* Initialize the FUSB302B */
31 35
     fusb_setup(&cfg->fusb);
32 36
 

+ 0
- 4
src/main.c View File

@@ -43,7 +43,6 @@
43 43
 #include <pdb.h>
44 44
 #include "led.h"
45 45
 #include "device_policy_manager.h"
46
-#include "messages.h"
47 46
 
48 47
 /*
49 48
  * I2C configuration object.
@@ -139,9 +138,6 @@ int main(void) {
139 138
     halInit();
140 139
     chSysInit();
141 140
 
142
-    /* Set up the free messages mailbox */
143
-    pdb_msg_pool_init();
144
-
145 141
     /* Create the LED thread. */
146 142
     pdbs_led_run();
147 143
 

Loading…
Cancel
Save