1 /* 2 * Copyright (c) 2016, Xilinx Inc. and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 /* 8 * @file sleep.h 9 * @brief Sleep primitives for libmetal. 10 */ 11 12 #ifndef __METAL_SLEEP__H__ 13 #define __METAL_SLEEP__H__ 14 15 #include <metal/system/@PROJECT_SYSTEM@/sleep.h> 16 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 21 /** \defgroup sleep Sleep Interfaces 22 * @{ 23 */ 24 25 /** 26 * @brief delay in microseconds 27 * delay the next execution in the calling thread 28 * fo usec microseconds. 29 * 30 * @param[in] usec microsecond intervals 31 * @return 0 on success, non-zero for failures 32 */ metal_sleep_usec(unsigned int usec)33static inline int metal_sleep_usec(unsigned int usec) 34 { 35 return __metal_sleep_usec(usec); 36 } 37 38 /** @} */ 39 40 #ifdef __cplusplus 41 } 42 #endif 43 44 #endif /* __METAL_SLEEP__H__ */ 45 46