Skip to content

Commit 06b7503

Browse files
cvinayakkartben
authored andcommitted
Bluetooth: Controller: Fix nRF5 radio and event timer abstractions
Fix nRF5 radio and event timer abstractions for some that where hard coded compared to use of the ones defined in the resources header file. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 7e51788 commit 06b7503

18 files changed

+149
-73
lines changed

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ static void last_pdu_end_us_init(uint32_t latency_us)
622622

623623
uint32_t radio_is_done(void)
624624
{
625-
if (NRF_RADIO->NRF_RADIO_TRX_END_EVENT != 0) {
625+
if (NRF_RADIO->HAL_RADIO_TRX_EVENTS_END != 0) {
626626
/* On packet END event increment last packet end time value.
627627
* Note: this depends on the function being called exactly once
628628
* in the ISR function.
@@ -637,7 +637,7 @@ uint32_t radio_is_done(void)
637637
#else /* !CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER */
638638
uint32_t radio_is_done(void)
639639
{
640-
return (NRF_RADIO->NRF_RADIO_TRX_END_EVENT != 0);
640+
return (NRF_RADIO->HAL_RADIO_TRX_EVENTS_END != 0);
641641
}
642642
#endif /* !CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER */
643643

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf51.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424
#define HAL_RADIO_NRF51_RX_CHAIN_DELAY_NS 3000 /* 3.0 */
2525

2626
/* HAL abstraction of Radio bitfields */
27-
#define HAL_RADIO_INTENSET_DISABLED_Msk RADIO_INTENSET_DISABLED_Msk
28-
#define HAL_RADIO_SHORTS_TRX_END_DISABLE_Msk RADIO_SHORTS_END_DISABLE_Msk
29-
#define HAL_RADIO_SHORTS_TRX_PHYEND_DISABLE_Msk RADIO_SHORTS_PHYEND_DISABLE_Msk
27+
#define HAL_NRF_RADIO_EVENT_END NRF_RADIO_EVENT_END
28+
#define HAL_RADIO_EVENTS_END EVENTS_END
29+
#define HAL_RADIO_INTENSET_DISABLED_Msk RADIO_INTENSET_DISABLED_Msk
30+
#define HAL_RADIO_SHORTS_TRX_END_DISABLE_Msk RADIO_SHORTS_END_DISABLE_Msk
3031

3132
/* HAL abstraction of Radio IRQ number */
3233
#define HAL_RADIO_IRQn RADIO_IRQn

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf52805.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,10 @@
186186
#endif /* !CONFIG_BT_CTLR_RADIO_ENABLE_FAST */
187187

188188
/* HAL abstraction of Radio bitfields */
189-
#define HAL_RADIO_INTENSET_DISABLED_Msk RADIO_INTENSET_DISABLED_Msk
190-
#define HAL_RADIO_SHORTS_TRX_END_DISABLE_Msk RADIO_SHORTS_END_DISABLE_Msk
191-
#define HAL_RADIO_SHORTS_TRX_PHYEND_DISABLE_Msk RADIO_SHORTS_PHYEND_DISABLE_Msk
189+
#define HAL_NRF_RADIO_EVENT_END NRF_RADIO_EVENT_END
190+
#define HAL_RADIO_EVENTS_END EVENTS_END
191+
#define HAL_RADIO_INTENSET_DISABLED_Msk RADIO_INTENSET_DISABLED_Msk
192+
#define HAL_RADIO_SHORTS_TRX_END_DISABLE_Msk RADIO_SHORTS_END_DISABLE_Msk
192193

193194
/* HAL abstraction of Radio IRQ number */
194195
#define HAL_RADIO_IRQn RADIO_IRQn

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf52810.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,10 @@
188188
#endif /* !CONFIG_BT_CTLR_RADIO_ENABLE_FAST */
189189

190190
/* HAL abstraction of Radio bitfields */
191-
#define HAL_RADIO_INTENSET_DISABLED_Msk RADIO_INTENSET_DISABLED_Msk
192-
#define HAL_RADIO_SHORTS_TRX_END_DISABLE_Msk RADIO_SHORTS_END_DISABLE_Msk
193-
#define HAL_RADIO_SHORTS_TRX_PHYEND_DISABLE_Msk RADIO_SHORTS_PHYEND_DISABLE_Msk
191+
#define HAL_NRF_RADIO_EVENT_END NRF_RADIO_EVENT_END
192+
#define HAL_RADIO_EVENTS_END EVENTS_END
193+
#define HAL_RADIO_INTENSET_DISABLED_Msk RADIO_INTENSET_DISABLED_Msk
194+
#define HAL_RADIO_SHORTS_TRX_END_DISABLE_Msk RADIO_SHORTS_END_DISABLE_Msk
194195

195196
/* HAL abstraction of Radio IRQ number */
196197
#define HAL_RADIO_IRQn RADIO_IRQn

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf52811.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,10 @@
343343
#endif /* !CONFIG_BT_CTLR_RADIO_ENABLE_FAST */
344344

345345
/* HAL abstraction of Radio bitfields */
346+
#define HAL_NRF_RADIO_EVENT_END NRF_RADIO_EVENT_END
347+
#define HAL_RADIO_EVENTS_END EVENTS_END
348+
#define HAL_NRF_RADIO_EVENT_PHYEND NRF_RADIO_EVENT_PHYEND
349+
#define HAL_RADIO_EVENTS_PHYEND EVENTS_PHYEND
346350
#define HAL_RADIO_INTENSET_DISABLED_Msk RADIO_INTENSET_DISABLED_Msk
347351
#define HAL_RADIO_SHORTS_TRX_END_DISABLE_Msk RADIO_SHORTS_END_DISABLE_Msk
348352
#define HAL_RADIO_SHORTS_TRX_PHYEND_DISABLE_Msk RADIO_SHORTS_PHYEND_DISABLE_Msk

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf52820.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,10 @@
343343
#endif /* !CONFIG_BT_CTLR_RADIO_ENABLE_FAST */
344344

345345
/* HAL abstraction of Radio bitfields */
346+
#define HAL_NRF_RADIO_EVENT_END NRF_RADIO_EVENT_END
347+
#define HAL_RADIO_EVENTS_END EVENTS_END
348+
#define HAL_NRF_RADIO_EVENT_PHYEND NRF_RADIO_EVENT_PHYEND
349+
#define HAL_RADIO_EVENTS_PHYEND EVENTS_PHYEND
346350
#define HAL_RADIO_INTENSET_DISABLED_Msk RADIO_INTENSET_DISABLED_Msk
347351
#define HAL_RADIO_SHORTS_TRX_END_DISABLE_Msk RADIO_SHORTS_END_DISABLE_Msk
348352
#define HAL_RADIO_SHORTS_TRX_PHYEND_DISABLE_Msk RADIO_SHORTS_PHYEND_DISABLE_Msk

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf52832.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,10 @@
189189
#endif /* !CONFIG_BT_CTLR_RADIO_ENABLE_FAST */
190190

191191
/* HAL abstraction of Radio bitfields */
192-
#define HAL_RADIO_INTENSET_DISABLED_Msk RADIO_INTENSET_DISABLED_Msk
193-
#define HAL_RADIO_SHORTS_TRX_END_DISABLE_Msk RADIO_SHORTS_END_DISABLE_Msk
194-
#define HAL_RADIO_SHORTS_TRX_PHYEND_DISABLE_Msk RADIO_SHORTS_PHYEND_DISABLE_Msk
192+
#define HAL_NRF_RADIO_EVENT_END NRF_RADIO_EVENT_END
193+
#define HAL_RADIO_EVENTS_END EVENTS_END
194+
#define HAL_RADIO_INTENSET_DISABLED_Msk RADIO_INTENSET_DISABLED_Msk
195+
#define HAL_RADIO_SHORTS_TRX_END_DISABLE_Msk RADIO_SHORTS_END_DISABLE_Msk
195196

196197
/* HAL abstraction of Radio IRQ number */
197198
#define HAL_RADIO_IRQn RADIO_IRQn

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf52833.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,10 @@
343343
#endif /* !CONFIG_BT_CTLR_RADIO_ENABLE_FAST */
344344

345345
/* HAL abstraction of Radio bitfields */
346+
#define HAL_NRF_RADIO_EVENT_END NRF_RADIO_EVENT_END
347+
#define HAL_RADIO_EVENTS_END EVENTS_END
348+
#define HAL_NRF_RADIO_EVENT_PHYEND NRF_RADIO_EVENT_PHYEND
349+
#define HAL_RADIO_EVENTS_PHYEND EVENTS_PHYEND
346350
#define HAL_RADIO_INTENSET_DISABLED_Msk RADIO_INTENSET_DISABLED_Msk
347351
#define HAL_RADIO_SHORTS_TRX_END_DISABLE_Msk RADIO_SHORTS_END_DISABLE_Msk
348352
#define HAL_RADIO_SHORTS_TRX_PHYEND_DISABLE_Msk RADIO_SHORTS_PHYEND_DISABLE_Msk

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf52840.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,10 @@
346346
#endif /* !CONFIG_BT_CTLR_RADIO_ENABLE_FAST */
347347

348348
/* HAL abstraction of Radio bitfields */
349-
#define HAL_RADIO_INTENSET_DISABLED_Msk RADIO_INTENSET_DISABLED_Msk
350-
#define HAL_RADIO_SHORTS_TRX_END_DISABLE_Msk RADIO_SHORTS_END_DISABLE_Msk
351-
#define HAL_RADIO_SHORTS_TRX_PHYEND_DISABLE_Msk RADIO_SHORTS_PHYEND_DISABLE_Msk
349+
#define HAL_NRF_RADIO_EVENT_END NRF_RADIO_EVENT_END
350+
#define HAL_RADIO_EVENTS_END EVENTS_END
351+
#define HAL_RADIO_INTENSET_DISABLED_Msk RADIO_INTENSET_DISABLED_Msk
352+
#define HAL_RADIO_SHORTS_TRX_END_DISABLE_Msk RADIO_SHORTS_END_DISABLE_Msk
352353

353354
/* HAL abstraction of Radio IRQ number */
354355
#define HAL_RADIO_IRQn RADIO_IRQn

subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5340.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,12 @@
365365
#endif
366366

367367
/* HAL abstraction of Radio bitfields */
368+
#define HAL_NRF_RADIO_EVENT_END NRF_RADIO_EVENT_END
369+
#define HAL_RADIO_EVENTS_END EVENTS_END
370+
#define HAL_RADIO_PUBLISH_END PUBLISH_END
371+
#define HAL_NRF_RADIO_EVENT_PHYEND NRF_RADIO_EVENT_PHYEND
372+
#define HAL_RADIO_EVENTS_PHYEND EVENTS_PHYEND
373+
#define HAL_RADIO_PUBLISH_PHYEND PUBLISH_PHYEND
368374
#define HAL_RADIO_INTENSET_DISABLED_Msk RADIO_INTENSET_DISABLED_Msk
369375
#define HAL_RADIO_SHORTS_TRX_END_DISABLE_Msk RADIO_SHORTS_END_DISABLE_Msk
370376
#define HAL_RADIO_SHORTS_TRX_PHYEND_DISABLE_Msk RADIO_SHORTS_PHYEND_DISABLE_Msk

0 commit comments

Comments
 (0)