Subversion Repositories f9daq

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
9 f9daq 1
#ifndef __PCILIBLX_H__
2
#define __PCILIBLX_H__
3
 
4
//-------------------------------------------------------------------------------------------
5
// pcilib.h - defaults and interface functions of pcilib.c for LINUX
6
//
7
// (c) 1999-2002 ARW Elektronik
8
//
9
// this source code is published under GPL (Open Source). You can use, redistrubute and 
10
// modify it unless this header   is not modified or deleted. No warranty is given that 
11
// this software will work like expected.
12
// This product is not authorized for use as critical component in life support systems
13
// wihout the express written approval of ARW Elektronik Germany.
14
//
15
// Please announce changes and hints to ARW Elektronik
16
// 
17
// $Log: pcilibLx.h,v $
18
// Revision 1.4  2005/12/29 10:52:04  klaus
19
// CR-LF minor problem solved
20
//
21
// Revision 1.3  2002/10/20 11:49:33  klaus
22
// first parts working
23
//
24
// Revision 1.2  2002/10/19 09:44:37  klaus
25
// first success compiling project
26
//
27
// Revision 1.1.1.1  2002/10/18 22:14:29  klaus
28
//
29
 
30
//-----------------------------------------------------------------------------
31
// DEFINES
32
//
33
#define BUFFERLENGTH 128
34
 
35
//-----------------------------------------------------------------------------
36
// PROTOTYPES
37
//
38
int   Init_Interface(char *szDevicePath, char AdrMode, int *nIfcHandle); /* Inits to DefAModifier */
39
void  DeInit_Interface(int nIfcHandle);         /* de-initializes Interface */
40
void  Reset_VME(int nIfcHandle);                               /* generates SYSRESET on VMEbus */
41
 
42
int   GetError(int nIfcHandle);                                /* checks the ERROR flag */
43
void  ClearError(int nIfcHandle);                              /* clears the ERROR flag */
44
 
45
char  ReadByte(int nIfcHandle, unsigned long,unsigned short);        /* Get byte from any address */
46
void  WriteByte(int nIfcHandle, unsigned long,char,unsigned short);  /* write byte to any address */
47
short ReadWord(int nIfcHandle, unsigned long,unsigned short);        /* get word from any address */
48
void  WriteWord(int nIfcHandle, unsigned long, short,unsigned short);/* write word to any address */
49
long  ReadLong(int nIfcHandle, unsigned long,unsigned short);        /* read longword from any address */
50
void  WriteLong(int nIfcHandle, unsigned long,long,unsigned short);  /* write longword to any address */
51
 
52
char  ReadVectorByte(int nIfcHandle);                          /* reads a vector byte from VME_LEVEL */
53
short ReadVectorWord(int nIfcHandle);                          /* reads a vector word from VME_LEVEL */
54
long  ReadVectorLong(int nIfcHandle);                          /* reads a vector longword from ..    */
55
 
56
char  TAS(int nIfcHandle, unsigned long,unsigned short);             /* 68K TAS (semafore) emulation */
57
void  SetSfail(int nIfcHandle);                                /* set SYSFAIL */
58
void  ClrSfail(int nIfcHandle);                                /* clear SYSFAIL (own) */
59
unsigned short PollSfail(int nIfcHandle);                      /* get SYSFAIL status */
60
 
61
void GetInterfaceInfo(int nIfcHandle, char type);                    /* request some information from driver */
62
 
63
/* set and get register contents of ..  */
64
unsigned long _SetRegister(int nIfcHandle, unsigned long Address, unsigned long Value);
65
unsigned long _GetRegister(int nIfcHandle, unsigned long Address);
66
 
67
int setWordMode(int nMode);
68
 
69
/*-------------------------- End of Prototypes -------------------------------*/
70
 
71
#endif // __PCILIBLX_H__