Could chaining/counting be used to implement a TDMA network?
For instance, could the TDMA master TX in slot 0, RX in slots 1-n, then back to TX? if (isMaster()) {
/* Set up the next pointers for the command chain */
/* 1: Nop->TX (no condition) */
rf_ctx.RF_cmdNop->startTrigger.triggerType = TRIG_ABSTIME;
rf_ctx.RF_cmdNop->startTrigger.pastTrig = 1;
rf_ctx.RF_cmdNop->pNextOp = (rfc_radioOp_t*)rf_ctx.RF_cmdPropTx;
rf_ctx.RF_cmdNop->condition.rule = COND_ALWAYS;
/* 2: TX->Branch (no condition)*/
rf_ctx.RF_cmdPropTx->condition.rule = COND_ALWAYS;
rf_ctx.RF_cmdPropTx->pNextOp = (rfc_radioOp_t*)rf_ctx.RF_cmdCountBranch;
/*3: Branch->Rx (when count !=0)
* Branch->Tx (when count ==0) */
rf_ctx.RF_cmdCountBranch->condition.rule = COND_SKIP_ON_FALSE; /* If count==0 return FALSE */
rf_ctx.RF_cmdCountBranch->pNextOp = (rfc_radioOp_t*)rf_ctx.RF_cmdPropRx;
rf_ctx.RF_cmdCountBranch->pNextOpIfOk = (rfc_radioOp_t*)rf_ctx.RF_cmdPropTx;
rf_ctx.RF_cmdCountBranch->counter = radio_cfg.numSlots - 1;
}
If so, how could you set up triggers for that? Is it technically TRIG_NOW when firing chained events?
rf_ctx.RF_cmdPropRx->startTrigger.triggerType = TRIG_NOW; // executes 'now' in chain context? rf_ctx.RF_cmdPropRx->endTrigger.triggerType = TRIG_REL_START; rf_ctx.RF_cmdPropRx->endTime = PACKET_INTERVAL_US;