You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by an...@apache.org on 2022/09/09 11:25:08 UTC

[mynewt-nimble] branch master updated: nimble/ll: Fix txend callback

This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new 1101fecc nimble/ll: Fix txend callback
1101fecc is described below

commit 1101fecc85a3b87928a7fcf8a5eff11d6716f84b
Author: Andrzej Kaczmarek <an...@codecoup.pl>
AuthorDate: Fri Sep 9 12:08:45 2022 +0200

    nimble/ll: Fix txend callback
    
    We should call txend before transition as otherwise called code may mess
    up transition.
---
 nimble/drivers/nrf52/src/ble_phy.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/nimble/drivers/nrf52/src/ble_phy.c b/nimble/drivers/nrf52/src/ble_phy.c
index eb55c228..bfc111b6 100644
--- a/nimble/drivers/nrf52/src/ble_phy.c
+++ b/nimble/drivers/nrf52/src/ble_phy.c
@@ -1025,6 +1025,10 @@ ble_phy_tx_end_isr(void)
     }
 #endif
 
+    if (g_ble_phy_data.txend_cb) {
+        g_ble_phy_data.txend_cb(g_ble_phy_data.txend_arg);
+    }
+
     transition = g_ble_phy_data.phy_transition;
 
     if (transition == BLE_PHY_TRANSITION_TX_RX) {
@@ -1081,10 +1085,6 @@ ble_phy_tx_end_isr(void)
                                  PPI_CHEN_CH20_Msk | PPI_CHEN_CH31_Msk);
         assert(transition == BLE_PHY_TRANSITION_NONE);
     }
-
-    if (g_ble_phy_data.txend_cb) {
-        g_ble_phy_data.txend_cb(g_ble_phy_data.txend_arg);
-    }
 }
 
 static inline uint8_t