Skip to content

Commit 952c973

Browse files
committed
all: Align to GPPI API tweaking
There are minor updates in GPPI API. Align in places that are affected. Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent 8cbee83 commit 952c973

File tree

14 files changed

+64
-36
lines changed

14 files changed

+64
-36
lines changed

lib/fem_al/fem_al.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ static int radio_domain_nrfx_dppi_channel_alloc(uint8_t *channel)
361361
{
362362
int ch;
363363

364-
ch = nrfx_gppi_channel_alloc(nrfx_gppi_domain_id_get(RADIO_DOMAIN_NRF_DPPI), channel);
364+
ch = nrfx_gppi_channel_alloc(nrfx_gppi_domain_id_get(RADIO_DOMAIN_NRF_DPPI));
365365
if (ch < 0) {
366366
return ch;
367367
}

modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_sl_lptimer_grtc_hw_task.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ void nrf_802154_platform_sl_lptimer_hw_task_local_domain_connections_clear(void)
227227
#elif defined(NRF54L_SERIES)
228228

229229
#include <helpers/nrfx_gppi.h>
230-
#include <helpers/nrfx_gppi_lumos.h>
230+
#include <soc/interconnect/nrfx_gppi_lumos.h>
231231

232232
/* To trigger RADIO.TASKS_x with GRTC.EVENT_CAPTURE{?}, the following connection chain must be
233233
* created:

modules/nrfxlib/nrf_802154/sl/platform/nrf_802154_platform_timestamper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ void nrf_802154_platform_timestamper_local_domain_connections_setup(uint32_t dpp
228228
*/
229229

230230
#include <helpers/nrfx_gppi.h>
231-
#include <helpers/nrfx_gppi_lumos.h>
231+
#include <soc/interconnect/nrfx_gppi_lumos.h>
232232

233233
static nrfx_gppi_handle_t rad_peri_handle;
234234

samples/bluetooth/conn_time_sync/src/controller_time_nrf52.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,18 @@ int config_egu_trigger_on_rtc_and_timer_match(void)
159159
uint32_t tep1 = nrf_egu_task_address_get(NRF_EGU0, NRF_EGU_TASK_TRIGGER0);
160160
int ret;
161161

162-
ret = nrfx_gppi_group_alloc(&eep0, 1, &group);
162+
ret = nrfx_gppi_group_alloc(nrfx_gppi_domain_id_get(eep0), &group);
163163
if (ret < 0) {
164164
printk("Failed allocating group\n");
165165
return ret;
166166
}
167167

168+
ret = nrfx_gppi_group_ep_add(group, eep0);
169+
if (ret < 0) {
170+
printk("Failed attaching an event to the group\n");
171+
return ret;
172+
}
173+
168174
ret = nrfx_gppi_conn_alloc(eep0, nrfx_gppi_group_task_en_addr(group), &ppi_on_rtc_match);
169175
if (ret < 0) {
170176
printk("Failed allocating for RTC match\n");

samples/bluetooth/conn_time_sync/src/controller_time_nrf53_app.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,18 @@ int config_egu_trigger_on_rtc_and_timer_match(void)
130130
uint32_t tep1 = nrf_egu_task_address_get(NRF_EGU0, NRF_EGU_TASK_TRIGGER0);
131131
int ret;
132132

133-
ret = nrfx_gppi_group_alloc(&eep0, 1, &group);
133+
ret = nrfx_gppi_group_alloc(nrfx_gppi_domain_id_get(eep0), &group);
134134
if (ret < 0) {
135135
printk("Failed allocating group\n");
136136
return ret;
137137
}
138138

139+
ret = nrfx_gppi_group_ep_add(group, eep0);
140+
if (ret < 0) {
141+
printk("Failed attaching an event to the group\n");
142+
return ret;
143+
}
144+
139145
ret = nrfx_gppi_conn_alloc(eep0, nrfx_gppi_group_task_en_addr(group), &ppi_on_rtc_match);
140146
if (ret < 0) {
141147
printk("Failed allocating for RTC match\n");

samples/bluetooth/conn_time_sync/src/controller_time_nrf54.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ int controller_time_init(void)
1717
{
1818
int ret;
1919

20-
ret = nrfx_grtc_channel_alloc(&grtc_channel);
21-
if (ret != NRFX_SUCCESS) {
22-
printk("Failed allocating GRTC channel (ret: %d)\n",
23-
ret - NRFX_ERROR_BASE_NUM);
24-
return -ENODEV;
20+
ret = nrfx_grtc_channel_alloc();
21+
if (ret < 0) {
22+
printk("Failed allocating GRTC channel (ret: %d)\n", ret);
23+
return ret;
2524
}
2625

26+
grtc_channel = (uint8_t)ret;
2727
nrf_grtc_sys_counter_compare_event_enable(NRF_GRTC, grtc_channel);
2828

2929
return 0;

samples/bluetooth/iso_time_sync/src/controller_time_nrf52.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,18 @@ int config_egu_trigger_on_rtc_and_timer_match(void)
158158
uint32_t tep1 = nrf_egu_task_address_get(NRF_EGU0, NRF_EGU_TASK_TRIGGER0);
159159
int ret;
160160

161-
ret = nrfx_gppi_group_alloc(&eep0, 1, &group);
161+
ret = nrfx_gppi_group_alloc(nrfx_gppi_domain_id_get(eep0), &group);
162162
if (ret < 0) {
163163
printk("Failed allocating group\n");
164164
return ret;
165165
}
166166

167+
ret = nrfx_gppi_group_ep_add(group, eep0);
168+
if (ret < 0) {
169+
printk("Failed attaching an event to the group\n");
170+
return ret;
171+
}
172+
167173
ret = nrfx_gppi_conn_alloc(eep0, nrfx_gppi_group_task_en_addr(group), &ppi_on_rtc_match);
168174
if (ret < 0) {
169175
printk("Failed allocating for RTC match\n");

samples/bluetooth/iso_time_sync/src/controller_time_nrf53_app.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,18 @@ int config_egu_trigger_on_rtc_and_timer_match(void)
131131
uint32_t tep1 = nrf_egu_task_address_get(NRF_EGU0, NRF_EGU_TASK_TRIGGER0);
132132
int ret;
133133

134-
ret = nrfx_gppi_group_alloc(&eep0, 1, &group);
134+
ret = nrfx_gppi_group_alloc(nrfx_gppi_domain_id_get(eep0), &group);
135135
if (ret < 0) {
136136
printk("Failed allocating group\n");
137137
return ret;
138138
}
139139

140+
ret = nrfx_gppi_group_ep_add(group, eep0);
141+
if (ret < 0) {
142+
printk("Failed attaching an event to the group\n");
143+
return ret;
144+
}
145+
140146
ret = nrfx_gppi_conn_alloc(eep0, nrfx_gppi_group_task_en_addr(group), &ppi_on_rtc_match);
141147
if (ret < 0) {
142148
printk("Failed allocating for RTC match\n");

samples/bluetooth/iso_time_sync/src/controller_time_nrf54.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ int controller_time_init(void)
1818
int ret;
1919

2020
ret = nrfx_grtc_channel_alloc(&grtc_channel);
21-
if (ret != NRFX_SUCCESS) {
22-
printk("Failed allocating GRTC channel (ret: %d)\n",
23-
ret - NRFX_ERROR_BASE_NUM);
24-
return -ENODEV;
21+
if (ret < 0) {
22+
printk("Failed allocating GRTC channel (ret: %d)\n", ret);
23+
return ret;
2524
}
2625

26+
grtc_channel = (uint8_t)ret;
2727
nrf_grtc_sys_counter_compare_event_enable(NRF_GRTC, grtc_channel);
2828

2929
return 0;

samples/peripheral/802154_phy_test/src/rf_proc.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,18 @@ static void configure_antenna_diversity(void)
140140
{
141141
nrfx_gpiote_t *gpiote = &GPIOTE_NRFX_INST_BY_NODE(DT_NODELABEL(gpiote0));
142142
NRF_TIMER_Type *ad_timer = NRF_TIMER3;
143+
int rv;
143144

144145
nrf_802154_sl_ant_div_cfg_t cfg = {
145146
.ant_sel_pin = CONFIG_PTT_ANT_PIN,
146147
.toggle_time = CONFIG_PTT_ANT_TOGGLE_TIME,
147148
.p_timer = ad_timer
148149
};
149150

150-
(void)nrfx_gppi_channel_alloc(0 ,&cfg.ppi_ch);
151+
rv = nrfx_gppi_channel_alloc(0);
152+
__ASSERT_NO_MSG(rv >= 0);
153+
cfg.ppi_ch = (uint8_t)rv;
154+
151155
(void)nrfx_gpiote_channel_alloc(gpiote, &cfg.gpiote_ch);
152156
nrf_802154_sl_ant_div_mode_t ant_div_auto = 0x02;
153157

0 commit comments

Comments
 (0)