ubinos
hrtick.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 Sung Ho Park
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef UBIK_HRTICK_H_
8 #define UBIK_HRTICK_H_
9 
10 #ifdef __cplusplus
11 extern "C"
12 {
13 #endif
14 
23 #include <ubinos_config.h>
24 #include <ubinos/type.h>
25 
27 typedef struct _hrtick_t
28 {
29  unsigned int high;
30  unsigned int low;
31  unsigned int hrtick;
33 
44 int ubik_hrtick_enable(int htimerno);
45 
55 
65 
71 unsigned int ubik_hrtick_gettickpersec(void);
72 
78 unsigned int ubik_hrtick_gethrtickpermsec(void);
79 
91 
110 int ubik_hrtick_gettickdiff(hrtick_t * tick1_p, hrtick_t * tick2_p,
111  hrtick_t * tickdiff_p);
112 
132 int ubik_hrtick_hrticktotime(hrtick_t * tick_p, unsigned int * nsec_p,
133  unsigned int * usec_p, unsigned int * msec_p);
134 
147 int ubik_hrtick_hrticktotimens(hrtick_t * tick_p, unsigned int * nsec_p);
148 
161 int ubik_hrtick_hrticktotimeus(hrtick_t * tick_p, unsigned int * usec_p);
162 
163 #ifdef __cplusplus
164 }
165 #endif
166 
167 #endif /* UBIK_HRTICK_H_ */
int ubik_hrtick_hrticktotime(hrtick_t *tick_p, unsigned int *nsec_p, unsigned int *usec_p, unsigned int *msec_p)
unsigned int ubik_hrtick_gettickpersec(void)
int ubik_hrtick_gettick(hrtick_t *tick_p)
struct _hrtick_t hrtick_t
unsigned int ubik_hrtick_gethrtickpermsec(void)
int ubik_hrtick_gettickdiff(hrtick_t *tick1_p, hrtick_t *tick2_p, hrtick_t *tickdiff_p)
int ubik_hrtick_hrticktotimens(hrtick_t *tick_p, unsigned int *nsec_p)
int ubik_hrtick_enable(int htimerno)
int ubik_hrtick_disable(void)
int ubik_hrtick_hrticktotimeus(hrtick_t *tick_p, unsigned int *usec_p)
int ubik_hrtick_reset(void)
Definition: hrtick.h:28
unsigned int low
Definition: hrtick.h:30
unsigned int high
Definition: hrtick.h:29
unsigned int hrtick
Definition: hrtick.h:31
ubinos basic data type