Skip to content

Commit 9495936

Browse files
committed
align to new DPPI API
1 parent 486f5af commit 9495936

22 files changed

+82
-34
lines changed

applications/nrf5340_audio/src/modules/audio_sync_timer.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ static uint8_t dppi_channel_timer_sync_with_rtc;
5151
static uint8_t dppi_channel_rtc_start;
5252
static volatile uint32_t num_rtc_overflows;
5353

54+
static nrfx_dppi_t dppi = NRFX_DPPI_INSTANCE(0);
55+
5456
static nrfx_timer_config_t cfg = {.frequency = NRFX_MHZ_TO_HZ(1UL),
5557
.mode = NRF_TIMER_MODE_TIMER,
5658
.bit_width = NRF_TIMER_BIT_WIDTH_32,
@@ -161,7 +163,7 @@ static int audio_sync_timer_init(void)
161163
nrfx_rtc_overflow_enable(&audio_sync_lf_timer_instance, true);
162164

163165
/* Initialize capturing of I2S frame start event timestamps */
164-
ret = nrfx_dppi_channel_alloc(&dppi_channel_i2s_frame_start);
166+
ret = nrfx_dppi_channel_alloc(&dppi, &dppi_channel_i2s_frame_start);
165167
if (ret - NRFX_ERROR_BASE_NUM) {
166168
LOG_ERR("nrfx DPPI channel alloc error (I2S frame start): %d", ret);
167169
return -ENOMEM;
@@ -177,14 +179,14 @@ static int audio_sync_timer_init(void)
177179
dppi_channel_i2s_frame_start);
178180

179181
nrf_i2s_publish_set(NRF_I2S0, NRF_I2S_EVENT_FRAMESTART, dppi_channel_i2s_frame_start);
180-
ret = nrfx_dppi_channel_enable(dppi_channel_i2s_frame_start);
182+
ret = nrfx_dppi_channel_enable(&dppi, dppi_channel_i2s_frame_start);
181183
if (ret - NRFX_ERROR_BASE_NUM) {
182184
LOG_ERR("nrfx DPPI channel enable error (I2S frame start): %d", ret);
183185
return -EIO;
184186
}
185187

186188
/* Initialize capturing of current timestamps */
187-
ret = nrfx_dppi_channel_alloc(&dppi_channel_curr_time_capture);
189+
ret = nrfx_dppi_channel_alloc(&dppi, &dppi_channel_curr_time_capture);
188190
if (ret - NRFX_ERROR_BASE_NUM) {
189191
LOG_ERR("nrfx DPPI channel alloc error (I2S frame start) - Return value: %d", ret);
190192
return -ENOMEM;
@@ -200,14 +202,14 @@ static int audio_sync_timer_init(void)
200202

201203
nrf_egu_publish_set(NRF_EGU0, NRF_EGU_EVENT_TRIGGERED0, dppi_channel_curr_time_capture);
202204

203-
ret = nrfx_dppi_channel_enable(dppi_channel_curr_time_capture);
205+
ret = nrfx_dppi_channel_enable(&dppi, dppi_channel_curr_time_capture);
204206
if (ret - NRFX_ERROR_BASE_NUM) {
205207
LOG_ERR("nrfx DPPI channel enable error (I2S frame start) - Return value: %d", ret);
206208
return -EIO;
207209
}
208210

209211
/* Initialize functionality for synchronization between APP and NET core */
210-
ret = nrfx_dppi_channel_alloc(&dppi_channel_rtc_start);
212+
ret = nrfx_dppi_channel_alloc(&dppi, &dppi_channel_rtc_start);
211213
if (ret - NRFX_ERROR_BASE_NUM) {
212214
LOG_ERR("nrfx DPPI channel alloc error (timer clear): %d", ret);
213215
return -ENOMEM;
@@ -222,14 +224,14 @@ static int audio_sync_timer_init(void)
222224
NRF_IPC_CHANNEL_4);
223225
nrf_ipc_publish_set(NRF_IPC, AUDIO_SYNC_TIMER_NET_APP_IPC_EVT, dppi_channel_rtc_start);
224226

225-
ret = nrfx_dppi_channel_enable(dppi_channel_rtc_start);
227+
ret = nrfx_dppi_channel_enable(&dppi, dppi_channel_rtc_start);
226228
if (ret - NRFX_ERROR_BASE_NUM) {
227229
LOG_ERR("nrfx DPPI channel enable error (timer clear): %d", ret);
228230
return -EIO;
229231
}
230232

231233
/* Initialize functionality for synchronization between RTC and TIMER */
232-
ret = nrfx_dppi_channel_alloc(&dppi_channel_timer_sync_with_rtc);
234+
ret = nrfx_dppi_channel_alloc(&dppi, &dppi_channel_timer_sync_with_rtc);
233235
if (ret - NRFX_ERROR_BASE_NUM) {
234236
LOG_ERR("nrfx DPPI channel alloc error (timer clear): %d", ret);
235237
return -ENOMEM;
@@ -242,7 +244,7 @@ static int audio_sync_timer_init(void)
242244

243245
nrfx_rtc_tick_enable(&audio_sync_lf_timer_instance, false);
244246

245-
ret = nrfx_dppi_channel_enable(dppi_channel_timer_sync_with_rtc);
247+
ret = nrfx_dppi_channel_enable(&dppi, dppi_channel_timer_sync_with_rtc);
246248
if (ret - NRFX_ERROR_BASE_NUM) {
247249
LOG_ERR("nrfx DPPI channel enable error (timer clear): %d", ret);
248250
return -EIO;

samples/bluetooth/conn_time_sync/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
CONFIG_NRFX_TIMER0=y
88
CONFIG_NRFX_RTC0=y
9-
CONFIG_NRFX_DPPI=y
9+
CONFIG_NRFX_DPPI0=y

samples/bluetooth/conn_time_sync/boards/nrf5340dk_nrf5340_cpuapp.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
CONFIG_NRFX_TIMER0=y
88
CONFIG_NRFX_RTC0=y
9-
CONFIG_NRFX_DPPI=y
9+
CONFIG_NRFX_DPPI0=y

samples/bluetooth/conn_time_sync/boards/nrf54l15dk_nrf54l15_cpuapp.conf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66

7-
CONFIG_NRFX_DPPI=y
7+
CONFIG_NRFX_DPPI00=y
8+
CONFIG_NRFX_DPPI10=y
9+
CONFIG_NRFX_DPPI20=y
10+
CONFIG_NRFX_DPPI30=y
811
CONFIG_BT_RX_STACK_SIZE=2048

samples/bluetooth/conn_time_sync/boards/nrf54l15pdk_nrf54l15_cpuapp.conf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
55
#
66

7-
CONFIG_NRFX_DPPI=y
7+
CONFIG_NRFX_DPPI00=y
8+
CONFIG_NRFX_DPPI10=y
9+
CONFIG_NRFX_DPPI20=y
10+
CONFIG_NRFX_DPPI30=y
811
CONFIG_BT_RX_STACK_SIZE=2048

samples/bluetooth/direct_test_mode/boards/nrf5340dk_nrf5340_cpunet.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ CONFIG_IPC_SERVICE=y
99
CONFIG_IPC_SERVICE_BACKEND_RPMSG=y
1010
CONFIG_MBOX=y
1111

12-
CONFIG_NRFX_DPPI=y
12+
CONFIG_NRFX_DPPI0=y
1313

1414
CONFIG_HEAP_MEM_POOL_SIZE=4096

samples/bluetooth/direct_test_mode/boards/nrf5340dk_nrf5340_cpunet_hci.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CONFIG_IPC_SERVICE=y
88
CONFIG_IPC_SERVICE_BACKEND_RPMSG=y
99
CONFIG_MBOX=y
1010

11-
CONFIG_NRFX_DPPI=y
11+
CONFIG_NRFX_DPPI0=y
1212

1313
CONFIG_HEAP_MEM_POOL_SIZE=4096
1414

samples/bluetooth/direct_test_mode/boards/nrf54l15dk_nrf54l15_cpuapp.conf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ CONFIG_NRFX_TIMER2=n
1212
# Use necessary peripherals
1313
CONFIG_NRFX_TIMER20=y
1414
CONFIG_NRFX_TIMER10=y
15-
CONFIG_NRFX_DPPI=y
15+
CONFIG_NRFX_DPPI00=y
16+
CONFIG_NRFX_DPPI10=y
17+
CONFIG_NRFX_DPPI20=y
18+
CONFIG_NRFX_DPPI30=y

samples/bluetooth/direct_test_mode/boards/nrf54l15pdk_nrf54l15_cpuapp.conf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ CONFIG_NRFX_TIMER2=n
1212
# Use necessary peripherals
1313
CONFIG_NRFX_TIMER20=y
1414
CONFIG_NRFX_TIMER10=y
15-
CONFIG_NRFX_DPPI=y
15+
CONFIG_NRFX_DPPI00=y
16+
CONFIG_NRFX_DPPI10=y
17+
CONFIG_NRFX_DPPI20=y
18+
CONFIG_NRFX_DPPI30=y

samples/bluetooth/iso_time_sync/boards/nrf5340_audio_dk_nrf5340_cpuapp.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66

77
CONFIG_NRFX_TIMER0=y
88
CONFIG_NRFX_RTC0=y
9-
CONFIG_NRFX_DPPI=y
9+
CONFIG_NRFX_DPPI0=y

0 commit comments

Comments
 (0)