Skip to content

Commit 634860f

Browse files
kl-cruzcarlescufi
authored andcommitted
treewide: Align to nrfx 3.9.0
Align code to the changes in nrfx 3.9.0. Signed-off-by: Karol Lasończyk <[email protected]>
1 parent 171b566 commit 634860f

File tree

3 files changed

+28
-5
lines changed

3 files changed

+28
-5
lines changed

samples/bluetooth/peripheral_power_profiling/src/main.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -644,12 +644,7 @@ static void reset_reason_print(void)
644644
printk("Wake up by NFC field detected\n");
645645
} else if (reason & NRFX_RESET_REASON_OFF_MASK) {
646646
printk("Wake up by the advertising start buttons\n");
647-
/* Workaround for typo in the NRFX. */
648-
#if !NRF_POWER_HAS_RESETREAS
649-
} else if (reason & NRFX_RESETREAS_SREQ_MASK) {
650-
#else
651647
} else if (reason & NRFX_RESET_REASON_SREQ_MASK) {
652-
#endif
653648
printk("Application soft reset detected\n");
654649
} else if (reason & NRFX_RESET_REASON_RESETPIN_MASK) {
655650
printk("Reset from pin-reset\n");

subsys/esb/esb.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,11 @@ static void esb_fem_for_tx_ack(void)
445445

446446
static void esb_fem_reset(void)
447447
{
448+
#if defined(TIMER_TASKS_SHUTDOWN_TASKS_SHUTDOWN_Msk)
448449
nrf_timer_task_trigger(esb_timer.p_reg, NRF_TIMER_TASK_SHUTDOWN);
450+
#else
451+
nrf_timer_task_trigger(esb_timer.p_reg, NRF_TIMER_TASK_STOP);
452+
#endif
449453

450454
mpsl_fem_lna_configuration_clear();
451455
mpsl_fem_pa_configuration_clear();
@@ -458,7 +462,11 @@ static void esb_fem_reset(void)
458462

459463
static void esb_fem_lna_reset(void)
460464
{
465+
#if defined(TIMER_TASKS_SHUTDOWN_TASKS_SHUTDOWN_Msk)
461466
nrf_timer_task_trigger(esb_timer.p_reg, NRF_TIMER_TASK_SHUTDOWN);
467+
#else
468+
nrf_timer_task_trigger(esb_timer.p_reg, NRF_TIMER_TASK_STOP);
469+
#endif
462470

463471
esb_ppi_for_fem_clear();
464472

@@ -470,7 +478,11 @@ static void esb_fem_pa_reset(void)
470478
{
471479
mpsl_fem_pa_configuration_clear();
472480

481+
#if defined(TIMER_TASKS_SHUTDOWN_TASKS_SHUTDOWN_Msk)
473482
nrf_timer_task_trigger(esb_timer.p_reg, NRF_TIMER_TASK_SHUTDOWN);
483+
#else
484+
nrf_timer_task_trigger(esb_timer.p_reg, NRF_TIMER_TASK_STOP);
485+
#endif
474486
esb_ppi_for_fem_clear();
475487

476488
mpsl_fem_disable();
@@ -1289,7 +1301,11 @@ static void on_radio_disabled_tx_wait_for_ack(void)
12891301
}
12901302
} else {
12911303
if (retransmits_remaining-- == 0) {
1304+
#if defined(TIMER_TASKS_SHUTDOWN_TASKS_SHUTDOWN_Msk)
12921305
nrf_timer_task_trigger(esb_timer.p_reg, NRF_TIMER_TASK_SHUTDOWN);
1306+
#else
1307+
nrf_timer_task_trigger(esb_timer.p_reg, NRF_TIMER_TASK_STOP);
1308+
#endif
12931309

12941310
/* All retransmits are expended, and the TX operation is
12951311
* suspended

subsys/esb/esb_dppi.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,14 @@ void esb_ppi_for_wait_for_ack_set(void)
150150
nrf_timer_publish_set(ESB_NRF_TIMER_INSTANCE, NRF_TIMER_EVENT_COMPARE0,
151151
timer_compare0_radio_disable);
152152

153+
#if defined(TIMER_TASKS_SHUTDOWN_TASKS_SHUTDOWN_Msk)
153154
nrf_timer_subscribe_set(ESB_NRF_TIMER_INSTANCE, NRF_TIMER_TASK_SHUTDOWN,
154155
radio_address_timer_stop);
156+
#else
157+
nrf_timer_subscribe_set(ESB_NRF_TIMER_INSTANCE, NRF_TIMER_TASK_STOP,
158+
radio_address_timer_stop);
159+
#endif
160+
155161
nrf_radio_subscribe_set(NRF_RADIO, NRF_RADIO_TASK_DISABLE, timer_compare0_radio_disable);
156162

157163
channels_mask = (BIT(radio_address_timer_stop) |
@@ -172,7 +178,13 @@ void esb_ppi_for_wait_for_ack_clear(void)
172178
nrf_radio_publish_clear(NRF_RADIO, NRF_RADIO_EVENT_ADDRESS);
173179
nrf_timer_publish_clear(ESB_NRF_TIMER_INSTANCE, NRF_TIMER_EVENT_COMPARE0);
174180

181+
#if defined(TIMER_TASKS_SHUTDOWN_TASKS_SHUTDOWN_Msk)
175182
nrf_timer_subscribe_clear(ESB_NRF_TIMER_INSTANCE, NRF_TIMER_TASK_SHUTDOWN);
183+
#else
184+
nrf_timer_subscribe_set(ESB_NRF_TIMER_INSTANCE, NRF_TIMER_TASK_STOP,
185+
radio_address_timer_stop);
186+
#endif
187+
176188
nrf_radio_subscribe_clear(NRF_RADIO, NRF_RADIO_TASK_DISABLE);
177189
}
178190

0 commit comments

Comments
 (0)