Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Related Pages  

counter.h

00001 #ifndef COUNTERH
00002 #define COUNTERH
00003 
00004 /*counter.h
00005 12/12/02
00006 
00007 Nathan Z. Gustavson
00008 ngustavson@emacinc.com
00009 Emac.inc
00010 www.emacinc.com
00011 
00012 */
00013 
00025 
00026 
00027 
00028 #include <sys/types.h>
00029 #include <asm/types.h>
00030 #include <coprocessor.h>
00031 
00032 typedef void (*CountHander)(int, void *);
00033 
00034 /*IC modes*/
00036 #define NOE   0
00037 
00038 #define RISEE 1
00039 
00040 #define FALLE 2
00041 
00042 #define ANYE 3
00043 
00044 
00045 /*ioctl counter command codes
00046 these codes are used by E12_CountCommand to send commands to counters.
00047 The counters must be configured by E12_CountConfig before these will have any effect
00048 */
00050 #define ICSTART     0
00051 
00052 #define ICSTOP      1
00053 
00054 #define ICNOTIFYON  2
00055 
00056 #define ICNOTIFYOFF     3
00057 
00058 #define NULLCOMMAND     4
00059 
00060 
00061 /*configuration flags
00062 These are bits to set in the flag variable passed to E12_CountConfig. They define
00063 certain characteristics of the counter
00064 */
00070 #define ANOTE 1
00071 
00073 #define AUTOLOAD 2
00074 
00076 #define AUTOSTOP 4
00077 
00078 #define NOTIFYRESPONSE BITMASK(ICNOTIFY)
00079 #define COUNTRESPONSE BITMASK(COUNTER)
00080 
00081 
00095 int E12_CountConfig(int fd, int counter, int trigger, int threshold,int flags,Cop_Data *Cop);
00096 
00108 int E12_CounterCalcFreq(int counter, Cop_Data *Cop);
00109 
00120 int E12_CounterLoad(int fd, int counter, int data, Cop_Data *Cop);
00121 
00129 int E12_CounterReadRQ(int fd, int counter);
00130 
00137 int E12_CountCommand(int fd, int counter,int command);
00138 
00145 int E12_CountCfg_Req(int fd, int counter);
00146 
00152 int UpdatetHardwareCounterInfo(int fd, Cop_Data *Cop);
00153 
00155 #endif

Generated on Thu Jan 8 09:51:00 2004 for PCM-37e12 by doxygen1.2.15