Browse Source

Use PRLTX mailbox queue from struct pdb_config

Clara Hobbs 7 years ago
parent
commit
f83d66eb17
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      lib/src/protocol_tx.c

+ 3
- 3
lib/src/protocol_tx.c View File

27
 
27
 
28
 
28
 
29
 /* Protocol layer TX thread mailbox */
29
 /* Protocol layer TX thread mailbox */
30
-static msg_t pdb_prltx_mailbox_queue[PDB_MSG_POOL_SIZE];
31
 mailbox_t pdb_prltx_mailbox;
30
 mailbox_t pdb_prltx_mailbox;
32
 
31
 
33
 /*
32
 /*
242
 /*
241
 /*
243
  * Protocol layer TX state machine thread
242
  * Protocol layer TX state machine thread
244
  */
243
  */
245
-static THD_FUNCTION(ProtocolTX, cfg) {
244
+static THD_FUNCTION(ProtocolTX, vcfg) {
245
+    struct pdb_config *cfg = vcfg;
246
 
246
 
247
     enum protocol_tx_state state = PRLTxPHYReset;
247
     enum protocol_tx_state state = PRLTxPHYReset;
248
 
248
 
249
     /* Initialize the mailbox */
249
     /* Initialize the mailbox */
250
-    chMBObjectInit(&pdb_prltx_mailbox, pdb_prltx_mailbox_queue, PDB_MSG_POOL_SIZE);
250
+    chMBObjectInit(&pdb_prltx_mailbox, cfg->prl._tx_mailbox_queue, PDB_MSG_POOL_SIZE);
251
 
251
 
252
     while (true) {
252
     while (true) {
253
         switch (state) {
253
         switch (state) {

Loading…
Cancel
Save