Use enumerated tx return values
This commit is contained in:
parent
2b245cf850
commit
9a1ce7cf75
|
@ -980,16 +980,18 @@ rf230_transmit(unsigned short payload_len)
|
|||
|
||||
RELEASE_LOCK();
|
||||
if (tx_result==1) { //success, data pending from adressee
|
||||
tx_result=0; //Just show success?
|
||||
tx_result = RADIO_TX_OK; //Just show success?
|
||||
} else if (tx_result==3) { //CSMA channel access failure
|
||||
DEBUGFLOW('m');
|
||||
RIMESTATS_ADD(contentiondrop);
|
||||
PRINTF("rf230_transmit: Transmission never started\n");
|
||||
....tx_result = RADIO_TX_COLLISION;
|
||||
} else if (tx_result==5) { //Expected ACK, none received
|
||||
DEBUGFLOW('n');
|
||||
// tx_result=0;
|
||||
....tx_result = RADIO_TX_NOACK;
|
||||
} else if (tx_result==7) { //Invalid (Can't happen since waited for idle above?)
|
||||
DEBUGFLOW('o');
|
||||
....tx_result = RADIO_TX_ERR;
|
||||
}
|
||||
|
||||
return tx_result;
|
||||
|
@ -1694,4 +1696,4 @@ void rf230_start_sneeze(void) {
|
|||
// while (hal_register_read(0x0f)!=1) {continue;} //wait for pll lock-hangs
|
||||
hal_register_write(0x02,0x02); //Set TRX_STATE to TX_START
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue