1 /* 2 * Copyright (c) 2017 Oticon A/S 3 * Copyright (c) 2023 Nordic Semiconductor ASA 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8 #ifndef NATIVE_SIMULATOR_NATIVE_SRC_NSI_TIMER_MODEL_H 9 #define NATIVE_SIMULATOR_NATIVE_SRC_NSI_TIMER_MODEL_H 10 11 #include <stdbool.h> 12 #include <stdint.h> 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 void hwtimer_set_real_time_mode(bool new_rt); 19 void hwtimer_timer_reached(void); 20 void hwtimer_wake_in_time(uint64_t time); 21 void hwtimer_set_silent_ticks(int64_t sys_ticks); 22 void hwtimer_enable(uint64_t period); 23 int64_t hwtimer_get_pending_silent_ticks(void); 24 25 void hwtimer_reset_rtc(void); 26 void hwtimer_set_rtc_offset(int64_t offset); 27 void hwtimer_set_rt_ratio(double ratio); 28 29 void hwtimer_adjust_rtc_offset(int64_t offset_delta); 30 void hwtimer_adjust_rt_ratio(double ratio_correction); 31 int64_t hwtimer_get_simu_rtc_time(void); 32 void hwtimer_get_pseudohost_rtc_time(uint32_t *nsec, uint64_t *sec); 33 34 #ifdef __cplusplus 35 } 36 #endif 37 38 #endif /* NATIVE_SIMULATOR_NATIVE_SRC_NSI_TIMER_MODEL_H */ 39