传输的数据包 是咋来的 我为什么在发送函数里没有找到数据位
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
发送的数据在rfPacketTx.c中,相关代码如下
RF_cmdPropTx.pktLen = PAYLOAD_LENGTH; RF_cmdPropTx.pPkt = packet; RF_cmdPropTx.startTrigger.triggerType = TRIG_NOW; /* Create packet with incrementing sequence number and random payload */ packet[0] = (uint8_t)(seqNumber >> 8); packet[1] = (uint8_t)(seqNumber++); uint8_t i; for (i = 2; i < PAYLOAD_LENGTH; i++) { packet[i] = rand(); } /* Send packet */ RF_EventMask terminationReason = RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTx, RF_PriorityNormal, NULL, 0);
代码中 packet[i] = rand(); 这局是什么意思 起什么作用