mbgtools-lx  4.2.8
mbgclock.h
Go to the documentation of this file.
1 
2 /**************************************************************************
3  *
4  * $Id: mbgclock.h 1.29 2017/05/10 15:21:32 martin REL_M $
5  *
6  * Description:
7  * Global definitions and prototypes for the mbgclock module.
8  *
9  * -----------------------------------------------------------------------
10  * $Log: mbgclock.h $
11  * Revision 1.29 2017/05/10 15:21:32 martin
12  * Tiny cleanup.
13  * Revision 1.28 2011/07/07 12:42:08 martin
14  * Renamed this file from mbgdrvr.h to mbgclock.h.
15  * Revision 1.27 2010/05/03 15:01:34 martin
16  * Added function pointer types for exported kernel mode functions.
17  * Revision 1.26 2010/02/23 16:02:48 martin
18  * Updated function prototypes.
19  * Revision 1.25 2009/12/21 15:53:35 martin
20  * Moved some driver-internal definitions to the .c file.
21  * Updated function prototypes.
22  * Revision 1.24 2009/09/29 14:56:54 martin
23  * Updated version number to 3.4.0.
24  * Revision 1.23 2009/07/24 09:50:07 martin
25  * Updated version number to 3.3.0.
26  * Revision 1.22 2009/06/19 12:38:51 martin
27  * Updated version number to 3.2.0.
28  * Revision 1.21 2009/03/20 11:53:42 martin
29  * Updated version number to 3.1.0.
30  * Updated copyright year to include 2009.
31  * Revision 1.20 2008/12/22 13:30:32 martin
32  * Migrated former file mbginit.h to mbgdrvr.h.
33  * Updated revision number and string to 3.0.0.
34  * Moved definition of compatibility macros to mbg_lx.h.
35  * Revision 1.19 2007/07/20 11:04:53 martin
36  * New module version 2.09.
37  * Added order of header inclusion to fix build problems under RH9.
38  * Revision 1.18 2007/03/02 10:53:08 martin
39  * New module version 2.08.
40  * Account for the file_ops flush function taking the POSIX lock owner ID
41  * as additional parameter in kernel 2.6.17 and newer.
42  * Account for interrupt functions not receiving a register set around
43  * kernel 2.6.19 and newer.
44  * Source code reordered and cleaned up.
45  * Revision 1.17 2006/08/28 11:16:27 martin
46  * New version number 2.07.
47  * Added the optional module parameter pretend_sync which makes the driver
48  * pretend to NTP the device is always synchronized.
49  * Revision 1.16 2006/07/07 12:04:37 martin
50  * Use a different way to check whether kernel supports irqreturn_t.
51  * Checking for modversions requirement moved to mbg_lx.h.
52  * Revision 1.15 2006/07/03 13:21:25 martin
53  * New version number 2.06.
54  * Added copyright string macro.
55  * Define symbols used for conditional compilation only if that symbols
56  * haven't been defined before, e.g. on the command line.
57  * Account for IRQ return types also being supported in newer 2.4.x kernels.
58  * Revision 1.14 2005/06/02 15:52:33 martin
59  * New version number 2.05.
60  * New conditional USE_WAIT_EVENT.
61  * Define macros pci_set_drvdata and pci_get_drvdata for older
62  * kernels which dont provide those.
63  * Revision 1.13 2005/01/14 12:13:58 martin
64  * Fixed default kernel version for ESPIPE_BY_VFS.
65  * Revision 1.12 2004/11/09 09:40:20 martin
66  * New module revision number 2.04.
67  * Modifications to support kernel 2.6.
68  * Modified inclusion of headers.
69  * Defined preprocessor symbol ESPIPE_BY_VFS which is used to conditionally
70  * remove ESPIPE logic from from read/write functions since this is handled
71  * by the VFS layer in recent kernels.
72  * Defined __devexit_p for early hotplug kernels which haven't defined it.
73  * Revision 1.11 2003/07/30 08:45:35 martin
74  * New module revision number 2.03.
75  * Revision 1.10 2003/07/08 15:19:41 martin
76  * New module revision number 2.02.
77  * Removed obsolete preprocessor definitions.
78  * Revision 1.9 2003/04/25 10:24:03 martin
79  * New module revision number 2.01.
80  * Revision 1.8 2002/11/21 10:21:42 martin
81  * New module revision number 0.6.
82  * Revision 1.7 2002/06/03 15:09:32 martin
83  * New module revision number 0.5.
84  * Revision 1.6 2002/05/07 07:56:49 martin
85  * New module revision number 0.4.
86  * Revision 1.5 2001/12/03 15:57:01 martin
87  * New REV_NUM 0.03.
88  * Revision 1.4 2001/09/17 13:58:06 MARTIN
89  * New REV_NUM 0.02.
90  * Revision 1.3 2001/07/27 13:27:01 MARTIN
91  * New preprocessor symbols to control code generation.
92  * Include linux/init.h instead of asm/init.h.
93  * Revision 1.2 2001/03/28 07:42:03 MARTIN
94  * Defined preprocessor symbols to account for different "fasync"
95  * and "wait_queue" APIs depending on the kernel version.
96  * Revision 1.1 2001/03/05 17:19:28 MARTIN
97  * Initial revision
98  *
99  **************************************************************************/
100 
101 #ifndef _MBGDRVR_H
102 #define _MBGDRVR_H
103 
104 
105 /* Other headers to be included */
106 
107 #include <pcpsdrvr.h>
108 
109 #ifdef _MBGDRVR
110  #define _ext
111  #define _DO_INIT
112 #else
113  #define _ext extern
114 #endif
115 
116 
117 /* Start of header body */
118 
119 #ifdef __cplusplus
120 extern "C" {
121 #endif
122 
123 // If any functions exported by the mbgclock module are to be called from
124 // other modules then the types below can be used to define function pointers
125 // allowing a type-safe import of the exported functions using the kernel's
126 // symbol_put() / symbol_get() API.
127 
130 
131 typedef int (*MBGCLOCK_DEFAULT_CLR_UCAP_BUFF_FNC)( void );
134 
135 
136 
137 /* ----- function prototypes begin ----- */
138 
139 /* This section was generated automatically */
140 /* by MAKEHDR, do not remove the comments. */
141 
155 
170 
183  int mbgclock_default_clr_ucap_buff( void ) ;
184 
199 
217 
218 
219 /* ----- function prototypes end ----- */
220 
221 #ifdef __cplusplus
222 }
223 #endif
224 
225 
226 /* End of header body */
227 
228 #undef _ext
229 #undef _DO_INIT
230 
231 #endif /* _MBGDRVR_H */
int mbgclock_default_get_ucap_event(PCPS_HR_TIME *p)
Retrieve single time capture event.
High resolution time stamp plus associated system cycles count.
Definition: pcpsdev.h:1369
Status of the time capture FIFO buffer.
Definition: pcpsdefs.h:1529
int mbgclock_default_get_fast_hr_timestamp(PCPS_TIME_STAMP *p_ts)
Read a high resolution PCPS_TIME_STAMP structure via memory mapped access.
int mbgclock_default_get_fast_hr_timestamp_cycles(PCPS_TIME_STAMP_CYCLES *p_ts_cyc)
Read a high resolution PCPS_TIME_STAMP_CYCLES structure via memory mapped access. ...
int(* MBGCLOCK_DEFAULT_GET_FAST_HR_TIMESTAMP_FNC)(PCPS_TIME_STAMP *p_ts)
Definition: mbgclock.h:128
int(* MBGCLOCK_DEFAULT_GET_UCAP_ENTRIES_FNC)(PCPS_UCAP_ENTRIES *p)
Definition: mbgclock.h:132
int(* MBGCLOCK_DEFAULT_GET_FAST_HR_TIMESTAMP_CYCLES_FNC)(PCPS_TIME_STAMP_CYCLES *p_ts_cyc)
Definition: mbgclock.h:129
int(* MBGCLOCK_DEFAULT_CLR_UCAP_BUFF_FNC)(void)
Definition: mbgclock.h:131
int mbgclock_default_get_ucap_entries(PCPS_UCAP_ENTRIES *p)
Read user capture FIFO information.
int(* MBGCLOCK_DEFAULT_GET_UCAP_EVENT_FNC)(PCPS_HR_TIME *p)
Definition: mbgclock.h:133
High resolution time including status and local time offset.
Definition: pcpsdefs.h:1085
A high resolution time stamp.
Definition: pcpsdefs.h:972
int mbgclock_default_clr_ucap_buff(void)
Clear the on-board user capture FIFO buffer.