1 /*
2  * Copyright (c) 2023 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 /**
8  * @file
9  * @brief API to the native simulator - native HW counter
10  */
11 
12 #ifndef NATIVE_SIMULATOR_NATIVE_SRC_HW_COUNTER_H
13 #define NATIVE_SIMULATOR_NATIVE_SRC_HW_COUNTER_H
14 
15 #include <stdint.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 void hw_counter_triggered(void);
22 
23 void hw_counter_set_period(uint64_t period);
24 void hw_counter_set_target(uint64_t counter_target);
25 void hw_counter_set_wrap_value(uint64_t wrap_value);
26 void hw_counter_start(void);
27 void hw_counter_stop(void);
28 bool hw_counter_is_started(void);
29 uint64_t hw_counter_get_value(void);
30 void hw_counter_reset(void);
31 
32 #ifdef __cplusplus
33 }
34 #endif
35 
36 #endif /* NATIVE_SIMULATOR_NATIVE_SRC_HW_COUNTER_H */
37