From 752074267172073a1cd6ab2cfc18e98a9c2ac060 Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Mon, 24 Feb 2025 21:04:06 +0100 Subject: [PATCH] Bluetooth: Controller: Fix single timer clear event define name Rename the single timer clear event define name based on direction finding support. Signed-off-by: Vinayak Kariappa Chettimada --- .../nordic/hal/nrf5/radio/radio_nrf5_dppi.h | 18 +++++++++--------- .../hal/nrf5/radio/radio_nrf5_resources.h | 15 ++++++++++----- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_dppi.h b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_dppi.h index a61f5cdb7f5f..503f03d037b6 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_dppi.h +++ b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_dppi.h @@ -231,15 +231,15 @@ static inline void hal_trigger_crypt_by_bcmatch_ppi_config(void) /******************************************************************************/ #if !defined(CONFIG_BT_CTLR_TIFS_HW) - /* DPPI setup used for SW-based auto-switching during TIFS. */ + #if defined(CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER) -#define HAL_NRF_RADIO_TIFS_DPPI_EVENT_END HAL_NRF_RADIO_EVENT_END -#define HAL_RADIO_TIFS_DPPI_PUBLISH_END HAL_RADIO_PUBLISH_END -#else /* !CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER */ -#define HAL_NRF_RADIO_TIFS_DPPI_EVENT_END HAL_NRF_RADIO_EVENT_PHYEND -#define HAL_RADIO_TIFS_DPPI_PUBLISH_END HAL_RADIO_PUBLISH_PHYEND -#endif /* !CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER */ +#define HAL_NRF_RADIO_TIMER_CLEAR_EVENT_END HAL_NRF_RADIO_EVENT_END +#define HAL_RADIO_GROUP_TASK_ENABLE_PUBLISH_END HAL_RADIO_PUBLISH_END +#else /* !CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER || CONFIG_BT_CTLR_DF */ +#define HAL_NRF_RADIO_TIMER_CLEAR_EVENT_END HAL_NRF_RADIO_EVENT_PHYEND +#define HAL_RADIO_GROUP_TASK_ENABLE_PUBLISH_END HAL_RADIO_PUBLISH_PHYEND +#endif /* !CONFIG_BT_CTLR_SW_SWITCH_SINGLE_TIMER || CONFIG_BT_CTLR_DF */ /* Clear SW-switch timer on packet end: * wire the RADIO EVENTS_END event to SW_SWITCH_TIMER TASKS_CLEAR task. @@ -251,7 +251,7 @@ static inline void hal_trigger_crypt_by_bcmatch_ppi_config(void) */ static inline void hal_sw_switch_timer_clear_ppi_config(void) { - nrf_radio_publish_set(NRF_RADIO, HAL_NRF_RADIO_TIFS_DPPI_EVENT_END, + nrf_radio_publish_set(NRF_RADIO, HAL_NRF_RADIO_TIMER_CLEAR_EVENT_END, HAL_SW_SWITCH_TIMER_CLEAR_PPI); nrf_timer_subscribe_set(SW_SWITCH_TIMER, NRF_TIMER_TASK_CLEAR, HAL_SW_SWITCH_TIMER_CLEAR_PPI); @@ -322,7 +322,7 @@ static inline void hal_sw_switch_timer_clear_ppi_config(void) * a PPI to publish RADIO END event. */ #define HAL_SW_SWITCH_GROUP_TASK_ENABLE_PPI_REGISTER_EVT \ - (NRF_RADIO->HAL_RADIO_TIFS_DPPI_PUBLISH_END) + (NRF_RADIO->HAL_RADIO_GROUP_TASK_ENABLE_PUBLISH_END) #define HAL_SW_SWITCH_GROUP_TASK_ENABLE_PPI_EVT \ (((HAL_SW_SWITCH_GROUP_TASK_ENABLE_PPI << \ RADIO_PUBLISH_END_CHIDX_Pos) \ diff --git a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_resources.h b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_resources.h index 8bd540bbfa65..3bdc3cc22b5d 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_resources.h +++ b/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/radio_nrf5_resources.h @@ -18,7 +18,8 @@ * or reception of a PDU on air. In case of regular PDU it is generated when last bit of CRC is * received or transmitted. */ -#define HAL_RADIO_TRX_EVENTS_END HAL_RADIO_EVENTS_END +#define HAL_RADIO_TRX_EVENTS_END HAL_RADIO_EVENTS_END +#define HAL_NRF_RADIO_TRX_EVENT_END HAL_NRF_RADIO_EVENT_END /* Wrapper for RADIO_SHORTS mask connecting EVENTS_END to EVENTS_DISABLE. * This is a default shortcut used to automatically disable Radio after end of PDU. @@ -75,7 +76,8 @@ * or reception of a PDU on air. In case of regular PDU it is generated when last bit of CRC is * received or transmitted. */ -#define HAL_RADIO_TRX_EVENTS_END HAL_RADIO_EVENTS_END +#define HAL_RADIO_TRX_EVENTS_END HAL_RADIO_EVENTS_END +#define HAL_NRF_RADIO_TRX_EVENT_END HAL_NRF_RADIO_EVENT_END /* Wrapper for RADIO_SHORTS mask connecting EVENTS_END to EVENTS_DISABLE. * This is a default shortcut used to automatically disable Radio after end of PDU. @@ -109,7 +111,8 @@ * or reception of a PDU on air. In case of regular PDU it is generated when last bit of CRC is * received or transmitted. */ -#define HAL_RADIO_TRX_EVENTS_END HAL_RADIO_EVENTS_END +#define HAL_RADIO_TRX_EVENTS_END HAL_RADIO_EVENTS_END +#define HAL_NRF_RADIO_TRX_EVENT_END HAL_NRF_RADIO_EVENT_END /* Wrapper for RADIO_SHORTS mask connecting EVENTS_END to EVENTS_DISABLE. * This is a default shortcut used to automatically disable Radio after end of PDU. @@ -173,7 +176,8 @@ * including CTE EVENTS_PHYEND event is generated at very end of a PDU. In case there is no CTE in * a PDU the EVENTS_PHYEND event is generated in the same instant as EVENTS_END event. */ -#define HAL_RADIO_TRX_EVENTS_END HAL_RADIO_EVENTS_PHYEND +#define HAL_RADIO_TRX_EVENTS_END HAL_RADIO_EVENTS_PHYEND +#define HAL_NRF_RADIO_TRX_EVENT_END HAL_NRF_RADIO_EVENT_PHYEND /* Wrapper for RADIO_SHORTS mask connecting EVENTS_PHYEND to EVENTS_DISABLE. * This is a mask for SOC that has Direction Finding Extension in a Radio peripheral. @@ -196,7 +200,8 @@ * or reception of a PDU on air. In case of regular PDU it is generated when last bit of CRC is * received or transmitted. */ -#define HAL_RADIO_TRX_EVENTS_END HAL_RADIO_EVENTS_END +#define HAL_RADIO_TRX_EVENTS_END HAL_RADIO_EVENTS_END +#define HAL_NRF_RADIO_TRX_EVENT_END HAL_NRF_RADIO_EVENT_END /* Wrapper for RADIO_SHORTS mask connecting EVENTS_END to EVENTS_DISABLE. * This is a default shortcut used to automatically disable Radio after end of PDU.