Skip to content

Commit

Permalink
Bluetooth: Controller: Fix single timer clear event define name
Browse files Browse the repository at this point in the history
Rename the single timer clear event define name based on
direction finding support.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
  • Loading branch information
cvinayak authored and kartben committed Feb 28, 2025
1 parent 23d321d commit 7520742
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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);
Expand Down Expand Up @@ -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) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 7520742

Please sign in to comment.