diff --git a/subsys/bootloader/bl_boot/bl_boot.c b/subsys/bootloader/bl_boot/bl_boot.c index f2f49023c882..fc2365439f9f 100644 --- a/subsys/bootloader/bl_boot/bl_boot.c +++ b/subsys/bootloader/bl_boot/bl_boot.c @@ -10,32 +10,29 @@ #include #include #include -#ifdef CONFIG_UART_NRFX #ifdef CONFIG_UART_NRFX_UART #include #endif -#if CONFIG_UART_NRFX_UARTE +#ifdef CONFIG_UART_NRFX_UARTE #include #endif -#endif static void uninit_used_peripherals(void) { -#if defined(HAS_HW_NRF_UART0) +#ifdef CONFIG_UART_NRFX +#if defined(CONFIG_HAS_HW_NRF_UART0) nrf_uart_disable(NRF_UART0); -#elif defined(HAS_HW_NRF_UARTE0) +#elif defined(CONFIG_HAS_HW_NRF_UARTE0) nrf_uarte_disable(NRF_UARTE0); #endif -#if defined(HAS_HW_NRF_UART1) - nrf_uart_disable(NRF_UART1); -#elif defined(HAS_HW_NRF_UARTE1) +#if defined(CONFIG_HAS_HW_NRF_UARTE1) nrf_uarte_disable(NRF_UARTE1); #endif -#if defined(HAS_HW_NRF_UART2) - nrf_uart_disable(NRF_UART2); -#elif defined(HAS_HW_NRF_UARTE2) +#if defined(CONFIG_HAS_HW_NRF_UARTE2) nrf_uarte_disable(NRF_UARTE2); #endif +#endif /* CONFIG_UART_NRFX */ + nrf_clock_int_disable(NRF_CLOCK, 0xFFFFFFFF); }