Skip to content

Commit 1a32b39

Browse files
committed
samples: bluetooth: align to nrfx 4.0
`nrfx_grtc_syscounter_get()` does not take a pointer anymore. Signed-off-by: Marcin Szymczyk <[email protected]>
1 parent 5bfd5a6 commit 1a32b39

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

samples/bluetooth/conn_time_sync/src/controller_time_nrf54.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,7 @@ int controller_time_init(void)
3131

3232
uint64_t controller_time_us_get(void)
3333
{
34-
int ret;
35-
uint64_t current_time_us;
36-
37-
ret = nrfx_grtc_syscounter_get(&current_time_us);
38-
if (ret != NRFX_SUCCESS) {
39-
printk("Failed obtaining system time (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM);
40-
return 0;
41-
}
42-
43-
return current_time_us;
34+
return nrfx_grtc_syscounter_get();
4435
}
4536

4637
void controller_time_trigger_set(uint64_t timestamp_us)

samples/bluetooth/iso_time_sync/src/controller_time_nrf54.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,7 @@ int controller_time_init(void)
3131

3232
uint64_t controller_time_us_get(void)
3333
{
34-
int ret;
35-
uint64_t current_time_us;
36-
37-
ret = nrfx_grtc_syscounter_get(&current_time_us);
38-
if (ret != NRFX_SUCCESS) {
39-
printk("Failed obtaining system time (ret: %d)\n", ret - NRFX_ERROR_BASE_NUM);
40-
return 0;
41-
}
42-
43-
return current_time_us;
34+
return nrfx_grtc_syscounter_get();
4435
}
4536

4637
void controller_time_trigger_set(uint64_t timestamp_us)

0 commit comments

Comments
 (0)