blob: 02b8a0142b1223486a18e5dc3d9f117662dee8bf [file] [log] [blame]
developere0cea0f2021-12-16 16:08:26 +08001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * $Id: Timer.h 109 2008-10-22 19:45:09Z lajordan@SILABS.COM $
4 *
5 * This file is system specific and should be edited for your hardware platform
6 *
7 * This file is used by proslic_timer_intf.h and proslic_spiGci.h
8 */
9#ifndef TIME_TYPE_H
10#define TIME_TYPE_H
11
12typedef long long _int64;
13
14/*
15** System timer interface structure
16*/
17typedef struct{
18 _int64 ticksPerSecond;
19} systemTimer_S;
20
21/*
22** System time stamp
23*/
24typedef struct{
25 _int64 time;
26} timeStamp;
27
28/*
29** Function: SYSTEM_TimerInit
30**
31** Description:
32** Initializes the timer used in the delay and time measurement functions
33** by doing a long inaccurate sleep and counting the ticks
34**
35** Input Parameters:
36**
37** Return:
38** none
39*/
40void TimerInit (systemTimer_S *pTimerObj);
41/*
42** Function: DelayWrapper
43**
44** Description:
45** Waits the specified number of ms
46**
47** Input Parameters:
48** hTimer: timer pointer
49** timeInMs: time in ms to wait
50**
51** Return:
52** none
53*/
54int time_DelayWrapper (void *hTimer, int timeInMs);
55
56
57/*
58** Function: TimeElapsedWrapper
59**
60** Description:
61** Calculates number of ms that have elapsed
62**
63** Input Parameters:
64** hTImer: pointer to timer object
65** startTime: timer value when function last called
66** timeInMs: pointer to time elapsed
67**
68** Return:
69** timeInMs: time elapsed since start time
70*/
71int time_TimeElapsedWrapper (void *hTimer, void *startTime, int *timeInMs);
72
73int time_GetTimeWrapper (void *hTimer, void *time);
74#endif
75/*
76** $Log: Timer.h,v $
77** Revision 1.2 2007/02/21 16:55:18 lajordan
78** moved function prototypes here
79**
80** Revision 1.1 2007/02/16 23:55:07 lajordan
81** no message
82**
83** Revision 1.2 2007/02/15 23:33:25 lajordan
84** no message
85**
86** Revision 1.1.1.1 2006/07/13 20:26:08 lajordan
87** no message
88**
89*/