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
 #include "hard_reset.h"
23
 #include "hard_reset.h"
24
 #include "int_n.h"
24
 #include "int_n.h"
25
 #include "fusb302b.h"
25
 #include "fusb302b.h"
26
+#include "messages.h"
26
 
27
 
27
 
28
 
28
 void pdb_init(struct pdb_config *cfg)
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
     /* Initialize the FUSB302B */
34
     /* Initialize the FUSB302B */
31
     fusb_setup(&cfg->fusb);
35
     fusb_setup(&cfg->fusb);
32
 
36
 

+ 0
- 4
src/main.c View File

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

Loading…
Cancel
Save