nimble/ll: Fix txend callback
We should call txend before transition as otherwise called code may mess
up transition.
@@ -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
