1 /* 2 * Copyright (c) 2016 Nordic Semiconductor ASA 3 * Copyright (c) 2016 Linaro Limited 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8 /** 9 * @file 10 * @brief System/hardware module for Nordic Semiconductor nRF51 family processor 11 * 12 * This module provides routines to initialize and support board-level hardware 13 * for the Nordic Semiconductor nRF51 family processor. 14 */ 15 16 #include <zephyr/kernel.h> 17 #include <hal/nrf_power.h> 18 #include <soc/nrfx_coredep.h> 19 #include <zephyr/logging/log.h> 20 21 #define LOG_LEVEL CONFIG_SOC_LOG_LEVEL 22 LOG_MODULE_REGISTER(soc); 23 24 #define DELAY_CALL_OVERHEAD_US 2 25 arch_busy_wait(uint32_t time_us)26void arch_busy_wait(uint32_t time_us) 27 { 28 if (time_us <= DELAY_CALL_OVERHEAD_US) { 29 return; 30 } 31 32 time_us -= DELAY_CALL_OVERHEAD_US; 33 nrfx_coredep_delay_us(time_us); 34 } 35