Skip to content

Commit c85ff90

Browse files
nordicjmcfriedt
authored andcommitted
boards: nordic: nrf5340_audio_dk: Replace SYS_INIT with board hooks
Updates to use board hooks since SYS_INIT should not be used in boards Signed-off-by: Jamie McCrae <[email protected]>
1 parent 8a25474 commit c85ff90

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# nRF5340 Audio DK board configuration
2+
3+
# Copyright (c) 2019 Nordic Semiconductor ASA
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config BOARD_NRF5340_AUDIO_DK
7+
select BOARD_LATE_INIT_HOOK if BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP || BOARD_NRF5340_AUDIO_DK_NRF5340_CPUAPP_NS

boards/nordic/nrf5340_audio_dk/nrf5340_audio_dk_config.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
LOG_MODULE_REGISTER(nrf5340_audio_dk_nrf5340_cpuapp, CONFIG_LOG_DEFAULT_LEVEL);
1313

14-
static int core_config(void)
14+
void board_late_init_hook(void)
1515
{
1616
nrf_gpiote_latency_t latency;
1717

@@ -21,8 +21,4 @@ static int core_config(void)
2121
LOG_DBG("Setting gpiote latency to low power");
2222
nrf_gpiote_latency_set(NRF_GPIOTE, NRF_GPIOTE_LATENCY_LOWPOWER);
2323
}
24-
25-
return 0;
2624
}
27-
28-
SYS_INIT(core_config, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);

0 commit comments

Comments
 (0)