Bladeren bron

Use PRLTX mailbox queue from struct pdb_config

Clara Hobbs 6 jaren geleden
bovenliggende
commit
f83d66eb17
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 3
    3
      lib/src/protocol_tx.c

+ 3
- 3
lib/src/protocol_tx.c Bestand weergeven

@@ -27,7 +27,6 @@
27 27
 
28 28
 
29 29
 /* Protocol layer TX thread mailbox */
30
-static msg_t pdb_prltx_mailbox_queue[PDB_MSG_POOL_SIZE];
31 30
 mailbox_t pdb_prltx_mailbox;
32 31
 
33 32
 /*
@@ -242,12 +241,13 @@ static enum protocol_tx_state protocol_tx_discard_message(struct pdb_config *cfg
242 241
 /*
243 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 247
     enum protocol_tx_state state = PRLTxPHYReset;
248 248
 
249 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 252
     while (true) {
253 253
         switch (state) {

Laden…
Annuleren
Opslaan