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