2017-12-21 21:14:19 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017 Oticon A/S
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NATIVE_POSIX_TIMER_MODEL_H
|
|
|
|
#define _NATIVE_POSIX_TIMER_MODEL_H
|
|
|
|
|
|
|
|
#include "hw_models_top.h"
|
2018-05-26 21:20:21 +08:00
|
|
|
#include <stdbool.h>
|
2017-12-21 21:14:19 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void hwtimer_init(void);
|
|
|
|
void hwtimer_cleanup(void);
|
2018-07-15 22:22:45 +08:00
|
|
|
void hwtimer_set_real_time_mode(bool new_rt);
|
2017-12-21 21:14:19 +08:00
|
|
|
void hwtimer_timer_reached(void);
|
2020-05-28 00:26:57 +08:00
|
|
|
void hwtimer_wake_in_time(uint64_t time);
|
|
|
|
void hwtimer_set_silent_ticks(int64_t sys_ticks);
|
|
|
|
void hwtimer_enable(uint64_t period);
|
|
|
|
int64_t hwtimer_get_pending_silent_ticks(void);
|
2017-12-21 21:14:19 +08:00
|
|
|
|
2018-07-15 22:22:45 +08:00
|
|
|
void hwtimer_reset_rtc(void);
|
2020-05-28 00:26:57 +08:00
|
|
|
void hwtimer_set_rtc_offset(int64_t offset);
|
2018-07-15 22:22:45 +08:00
|
|
|
void hwtimer_set_rt_ratio(double ratio);
|
|
|
|
|
2020-05-28 00:26:57 +08:00
|
|
|
void hwtimer_adjust_rtc_offset(int64_t offset_delta);
|
2018-07-15 22:22:45 +08:00
|
|
|
void hwtimer_adjust_rt_ratio(double ratio_correction);
|
2020-05-28 00:26:57 +08:00
|
|
|
int64_t hwtimer_get_simu_rtc_time(void);
|
|
|
|
void hwtimer_get_pseudohost_rtc_time(uint32_t *nsec, uint64_t *sec);
|
2018-07-15 22:22:45 +08:00
|
|
|
|
2017-12-21 21:14:19 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _NATIVE_POSIX_TIMER_MODEL_H */
|