Use enumerated tx return values

This commit is contained in:
David Kopf 2011-08-31 11:40:23 -04:00
parent 2b245cf850
commit 9a1ce7cf75

View file

@ -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;