boards: nordic: nrf52840dongle: 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 <jamie.mccrae@nordicsemi.no>
This commit is contained in:
parent
c85ff90951
commit
e81a08d6dd
@ -3,7 +3,8 @@
|
||||
# Copyright (c) 2018-2023 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_NRF52840DONGLE
|
||||
config BOARD_NRF52840DONGLE
|
||||
select BOARD_EARLY_INIT_HOOK
|
||||
|
||||
config BOARD_HAS_NRF5_BOOTLOADER
|
||||
bool "Board has nRF5 bootloader"
|
||||
@ -11,5 +12,3 @@ config BOARD_HAS_NRF5_BOOTLOADER
|
||||
help
|
||||
If selected, applications are linked so that they can be loaded by Nordic
|
||||
nRF5 bootloader.
|
||||
|
||||
endif # BOARD_NRF52840DONGLE
|
||||
|
||||
@ -7,10 +7,9 @@
|
||||
#include <zephyr/init.h>
|
||||
#include <hal/nrf_power.h>
|
||||
|
||||
static int board_nrf52840dongle_nrf52840_init(void)
|
||||
void board_early_init_hook(void)
|
||||
{
|
||||
|
||||
/* if the nrf52840dongle_nrf52840 board is powered from USB
|
||||
/* If the nrf52840dongle/nrf52840 board target is powered from USB
|
||||
* (high voltage mode), GPIO output voltage is set to 1.8 volts by
|
||||
* default and that is not enough to turn the green and blue LEDs on.
|
||||
* Increase GPIO voltage to 3.0 volts.
|
||||
@ -37,9 +36,4 @@ static int board_nrf52840dongle_nrf52840_init(void)
|
||||
/* a reset is required for changes to take effect */
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
SYS_INIT(board_nrf52840dongle_nrf52840_init, PRE_KERNEL_1,
|
||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user