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/generic/sleep.h> 16 17 #ifdef __cplusplus 18 extern "C" { 19 #endif 20 21 /** \defgroup sleep Sleep Interfaces 22 * @{ */ 23 24 /** 25 * @brief delay in microseconds 26 * delay the next execution in the calling thread 27 * fo usec microseconds. 28 * 29 * @param[in] usec microsecond intervals 30 * @return 0 on success, non-zero for failures 31 */ metal_sleep_usec(unsigned int usec)32static inline int metal_sleep_usec(unsigned int usec) 33 { 34 return __metal_sleep_usec(usec); 35 } 36 37 /** @} */ 38 39 #ifdef __cplusplus 40 } 41 #endif 42 43 #endif /* __METAL_SLEEP__H__ */ 44 45