sx1280: rework tx done state machine

This commit is contained in:
Matthias Ringwald 2021-05-02 00:29:51 +02:00
parent 90825e06ef
commit 782349f44c

View File

@ -723,15 +723,19 @@ static void radio_fetch_rx_pdu(void){
/** Radio IRQ handlers */
static void radio_on_tx_done(void ){
switch (radio_state){
case RADIO_W4_TX_DONE_TO_RX:
receive_response();
break;
default:
break;
}
switch (ll_state){
case LL_STATE_ADVERTISING:
switch (radio_state){
case RADIO_W4_TX_DONE_TO_RX:
receive_response();
break;
default:
break;
}
break;
case LL_STATE_CONNECTED:
btstack_assert(radio_state == RADIO_W4_TX_DONE_TO_RX);
receive_response();
radio_fetch_rx_pdu();
preload_tx_buffer();
break;