1 /* 2 * Copyright (c) 2023 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /* 8 * This file provides in native_sim a set of APIs the native_posix board provided 9 * to allow building the native_posix drivers or applications which depended 10 * on those. 11 * Note that all these APIs should be considered deprecated in native_sim, as this 12 * exists solely as a transitional component. 13 */ 14 15 #ifndef BOARDS_POSIX_NATIVE_SIM_NATIVE_POSIX_COMPAT_H 16 #define BOARDS_POSIX_NATIVE_SIM_NATIVE_POSIX_COMPAT_H 17 18 #include <stdint.h> 19 #include <zephyr/toolchain.h> 20 #include "nsi_hw_scheduler.h" 21 22 #ifdef __cplusplus 23 extern "C" { 24 #endif 25 hwm_find_next_timer(void)26static ALWAYS_INLINE void hwm_find_next_timer(void) 27 { 28 nsi_hws_find_next_event(); 29 } 30 hwm_get_time(void)31static ALWAYS_INLINE uint64_t hwm_get_time(void) 32 { 33 return nsi_hws_get_time(); 34 } 35 36 #define NEVER NSI_NEVER 37 38 #ifdef __cplusplus 39 } 40 #endif 41 42 #endif /* BOARDS_POSIX_NATIVE_SIM_NATIVE_POSIX_COMPAT_H */ 43