@@ -288,8 +288,6 @@ static int8_t rf_start_cca(uint8_t *data_ptr, uint16_t data_length, uint8_t tx_h
288
288
data_length + 3
289
289
};
290
290
291
- tr_debug (" Called TX, len %d, chan %d\n " , data_length, channel);
292
-
293
291
switch (radio_state) {
294
292
case RADIO_UNINIT:
295
293
tr_debug (" Radio uninit\n " );
@@ -329,6 +327,8 @@ static int8_t rf_start_cca(uint8_t *data_ptr, uint16_t data_length, uint8_t tx_h
329
327
txOpt.waitForAck = false ;
330
328
}
331
329
330
+ // tr_debug("Called TX, len %d, chan %d, ack %d\n", data_length, channel, waiting_for_ack ? 1 : 0);
331
+
332
332
if (RAIL_TxStartWithOptions (channel, &txOpt, &RAIL_CcaCsma, (RAIL_CsmaConfig_t*) &csma_config) == 0 ) {
333
333
// Save packet number and sequence
334
334
current_tx_handle = tx_handle;
@@ -614,7 +614,6 @@ void RAILCb_RfReady(void) {
614
614
* @param[in] status A bit field that defines what event caused the callback
615
615
*/
616
616
void RAILCb_TxRadioStatus (uint8_t status) {
617
- tr_debug (" Packet TX error %d\n " , status);
618
617
if (device_driver.phy_tx_done_cb != NULL ) {
619
618
if (status == RAIL_TX_CONFIG_BUFFER_UNDERFLOW ||
620
619
status == RAIL_TX_CONFIG_CHANNEL_BUSY ||
@@ -626,6 +625,8 @@ void RAILCb_TxRadioStatus(uint8_t status) {
626
625
PHY_LINK_CCA_FAIL,
627
626
8 ,
628
627
1 );
628
+ } else {
629
+ tr_debug (" Packet TX error %d\n " , status);
629
630
}
630
631
}
631
632
radio_state = RADIO_RX;
@@ -645,7 +646,13 @@ void RAILCb_TxRadioStatus(uint8_t status) {
645
646
* @param[in] status The event that triggered this callback
646
647
*/
647
648
void RAILCb_RxRadioStatus (uint8_t status) {
648
- tr_debug (" RXE %d\n " , status);
649
+ switch (status) {
650
+ case RAIL_RX_CONFIG_ADDRESS_FILTERED:
651
+ break ;
652
+ default :
653
+ tr_debug (" RXE %d\n " , status);
654
+ break ;
655
+ }
649
656
}
650
657
651
658
/* *
@@ -729,7 +736,7 @@ void RAILCb_RxPacketReceived(void *rxPacketHandle) {
729
736
// tr_debug("rACK\n");
730
737
device_driver.phy_tx_done_cb ( rf_radio_driver_id,
731
738
current_tx_handle,
732
- PHY_LINK_TX_DONE,
739
+ last_ack_pending_bit ? PHY_LINK_TX_DONE_PENDING : PHY_LINK_TX_DONE,
733
740
1 ,
734
741
1 );
735
742
} else {
@@ -787,6 +794,7 @@ void RAILCb_IEEE802154_DataRequestCommand(RAIL_IEEE802154_Address_t *address) {
787
794
*/
788
795
void RAILCb_RxAckTimeout (void ) {
789
796
if (waiting_for_ack) {
797
+ tr_debug (" nACK\n " );
790
798
waiting_for_ack = false ;
791
799
device_driver.phy_tx_done_cb ( rf_radio_driver_id,
792
800
current_tx_handle,
0 commit comments