Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
use1401.h File Reference
#include "machine.h"

Go to the source code of this file.

Macros

#define U14API(retType)   retType
 
#define U14LONG   long
 
#define U14ERR_NOERROR   0
 Error codes: We need them here as user space can see them.
 
#define U14ERR_STD   4
 Device error codes, but these don't need to be extended - a succession is assumed.
 
#define U14ERR_U1401   5
 
#define U14ERR_PLUS   6
 
#define U14ERR_POWER   7
 
#define U14ERR_U14012   8
 
#define U14ERR_POWER2   9
 
#define U14ERR_U14013   10
 
#define U14ERR_POWER3   11
 
#define U14ERR(n)   (n+U14ERRBASE)
 NBNB Error numbers need shifting as some linux error codes start at 512.
 
#define U14ERR_OFF   U14ERR(0) /* 1401 there but switched off */
 
#define U14ERR_NC   U14ERR(-1) /* 1401 not connected */
 
#define U14ERR_ILL   U14ERR(-2) /* if present it is ill */
 
#define U14ERR_NOIF   U14ERR(-3) /* I/F card missing */
 
#define U14ERR_TIME   U14ERR(-4) /* 1401 failed to come ready */
 
#define U14ERR_BADSW   U14ERR(-5) /* I/F card bad switches */
 
#define U14ERR_PTIME   U14ERR(-6) /* 1401plus failed to come ready */
 
#define U14ERR_NOINT   U14ERR(-7) /* couldn't grab the int vector */
 
#define U14ERR_INUSE   U14ERR(-8) /* 1401 is already in use */
 
#define U14ERR_NODMA   U14ERR(-9) /* couldn't get DMA channel */
 
#define U14ERR_BADHAND   U14ERR(-10) /* handle provided was bad */
 
#define U14ERR_BAD1401NUM   U14ERR(-11) /* 1401 number provided was bad */
 
#define U14ERR_NO_SUCH_FN   U14ERR(-20) /* no such function */
 
#define U14ERR_NO_SUCH_SUBFN   U14ERR(-21) /* no such sub function */
 
#define U14ERR_NOOUT   U14ERR(-22) /* no room in output buffer */
 
#define U14ERR_NOIN   U14ERR(-23) /* no input in buffer */
 
#define U14ERR_STRLEN   U14ERR(-24) /* string longer than buffer */
 
#define U14ERR_ERR_STRLEN   U14ERR(-24) /* string longer than buffer */
 
#define U14ERR_LOCKFAIL   U14ERR(-25) /* failed to lock memory */
 
#define U14ERR_UNLOCKFAIL   U14ERR(-26) /* failed to unlock memory */
 
#define U14ERR_ALREADYSET   U14ERR(-27) /* area already set up */
 
#define U14ERR_NOTSET   U14ERR(-28) /* area not set up */
 
#define U14ERR_BADAREA   U14ERR(-29) /* illegal area number */
 
#define U14ERR_FAIL   U14ERR(-30) /* we failed for some other reason*/
 
#define U14ERR_NOFILE   U14ERR(-40) /* command file not found */
 
#define U14ERR_READERR   U14ERR(-41) /* error reading command file */
 
#define U14ERR_UNKNOWN   U14ERR(-42) /* unknown command */
 
#define U14ERR_HOSTSPACE   U14ERR(-43) /* not enough host space to load */
 
#define U14ERR_LOCKERR   U14ERR(-44) /* could not lock resource/command*/
 
#define U14ERR_CLOADERR   U14ERR(-45) /* CLOAD command failed */
 
#define U14ERR_TOXXXERR   U14ERR(-60) /* tohost/1401 failed */
 
#define U14ERR_NO386ENH   U14ERR(-80) /* not 386 enhanced mode */
 
#define U14ERR_NO1401DRIV   U14ERR(-81) /* no device driver */
 
#define U14ERR_DRIVTOOOLD   U14ERR(-82) /* device driver too old */
 
#define U14ERR_TIMEOUT   U14ERR(-90) /* timeout occurred */
 
#define U14ERR_BUFF_SMALL   U14ERR(-100) /* buffer for getstring too small */
 
#define U14ERR_CBALREADY   U14ERR(-101) /* there is already a callback */
 
#define U14ERR_BADDEREG   U14ERR(-102) /* bad parameter to deregcallback */
 
#define U14ERR_NOMEMORY   U14ERR(-103) /* no memory for allocation */
 
#define U14ERR_DRIVCOMMS   U14ERR(-110) /* failed talking to driver */
 
#define U14ERR_OUTOFMEMORY   U14ERR(-111) /* needed memory and couldnt get it*/
 
#define U14TYPE1401   0 /* standard 1401 */
 1401 type codes.
 
#define U14TYPEPLUS   1 /* 1401 plus */
 
#define U14TYPEU1401   2 /* u1401 */
 
#define U14TYPEPOWER   3 /* power1401 */
 
#define U14TYPEU14012   4 /* u1401 mk II */
 
#define U14TYPEPOWER2   5 /* power1401 mk II */
 
#define U14TYPEU14013   6 /* u1401-3 */
 
#define U14TYPEPOWER3   7 /* power1401-3 */
 
#define U14TYPEUNKNOWN   -1 /* dont know */
 
#define U14TF_USEDMA   1 /* Transfer flag for use DMA */
 Transfer flags to allow driver capabilities to be interrogated.
 
#define U14TF_MULTIA   2 /* Transfer flag for multi areas */
 
#define U14TF_FIFO   4 /* for FIFO interface card */
 
#define U14TF_USB2   8 /* for USB2 interface and 1401 */
 
#define U14TF_NOTIFY   16 /* for event notifications */
 
#define U14TF_SHORT   32 /* for PCI can short cycle */
 
#define U14TF_PCI2   64 /* for new PCI card 1401-70 */
 
#define U14TF_CIRCTH   128 /* Circular-mode to host */
 
#define U14TF_DIAG   256 /* Diagnostics/debug functions */
 
#define U14TF_CIRC14   512 /* Circular-mode to 1401 */
 
#define ESZBYTES   0 /* BYTE element size value */
 Definitions of element sizes for DMA transfers - to allow byte-swapping.
 
#define ESZWORDS   1 /* WORD element size value */
 
#define ESZLONGS   2 /* long element size value */
 
#define ESZUNKNOWN   0 /* unknown element size value */
 
#define BYTE_SIZE   1 /* 8-bit access */
 These define required access types for the debug/diagnostics function.
 
#define WORD_SIZE   2 /* 16-bit access */
 
#define LONG_SIZE   3 /* 32-bit access */
 
#define GET_TX_MAXENTRIES   257 /* (max length / page size + 1) */
 Stuff used by U14_GetTransfer.
 

Functions

 U14API (int) U14WhenToTimeOut(short hand)
 
 U14API (short) U14PassedTime(int iTime)
 
 U14API (DWORD) U14Ld(short hand
 
 U14API (void) U14SetTimeout(short hand
 

Variables

charpBuf
 
char WORD wMax
 
const charpString
 
charpBuffer
 
char WORD wMaxLen
 
char cChar
 
charpcChar
 
const charcommand
 
const charvl
 
const char const charstr
 
WORD wArea
 
WORD voidpvBuff
 
WORD void DWORD dwLength
 
WORD void DWORD short eSz
 
WORD BOOL bEvent
 
WORD BOOL BOOL bToHost
 
WORD BOOL BOOL DWORD dwStart
 
WORD int msTimeOut
 
TGET_TX_BLOCK * pTransBlock
 
charpAddrHost
 
char DWORD dwSize
 
char DWORD DWORD dw1401
 
WORD DWORDpdwOffs
 
WORD DWORD dwOffs
 
U14LONGpalNums
 
U14LONG short sMaxLongs
 
U14LONGpalBuff
 
int lTimeout
 
DWORDpMemorySize
 
DWORD dwAddr
 
DWORD int nSize
 
DWORD int int nRepeats
 
DWORD DWORD dwValue
 
DWORD DWORD dwDef
 
DWORD DWORD DWORD dwEnable
 
U14LONGplValue
 
U14LONGpData
 
charpStr
 
DWORD dwMaxKb
 

Macro Definition Documentation

#define BYTE_SIZE   1 /* 8-bit access */

These define required access types for the debug/diagnostics function.

Definition at line 148 of file use1401.h.

#define ESZBYTES   0 /* BYTE element size value */

Definitions of element sizes for DMA transfers - to allow byte-swapping.

Definition at line 142 of file use1401.h.

#define ESZLONGS   2 /* long element size value */

Definition at line 144 of file use1401.h.

#define ESZUNKNOWN   0 /* unknown element size value */

Definition at line 145 of file use1401.h.

#define ESZWORDS   1 /* WORD element size value */

Definition at line 143 of file use1401.h.

#define GET_TX_MAXENTRIES   257 /* (max length / page size + 1) */

Stuff used by U14_GetTransfer.

Definition at line 153 of file use1401.h.

#define LONG_SIZE   3 /* 32-bit access */

Definition at line 150 of file use1401.h.

#define U14API (   retType)    retType

Definition at line 46 of file use1401.h.

#define U14ERR (   n)    (n+U14ERRBASE)

NBNB Error numbers need shifting as some linux error codes start at 512.

Definition at line 67 of file use1401.h.

#define U14ERR_ALREADYSET   U14ERR(-27) /* area already set up */

Definition at line 89 of file use1401.h.

#define U14ERR_BAD1401NUM   U14ERR(-11) /* 1401 number provided was bad */

Definition at line 79 of file use1401.h.

#define U14ERR_BADAREA   U14ERR(-29) /* illegal area number */

Definition at line 91 of file use1401.h.

#define U14ERR_BADDEREG   U14ERR(-102) /* bad parameter to deregcallback */

Definition at line 110 of file use1401.h.

#define U14ERR_BADHAND   U14ERR(-10) /* handle provided was bad */

Definition at line 78 of file use1401.h.

#define U14ERR_BADSW   U14ERR(-5) /* I/F card bad switches */

Definition at line 73 of file use1401.h.

#define U14ERR_BUFF_SMALL   U14ERR(-100) /* buffer for getstring too small */

Definition at line 108 of file use1401.h.

#define U14ERR_CBALREADY   U14ERR(-101) /* there is already a callback */

Definition at line 109 of file use1401.h.

#define U14ERR_CLOADERR   U14ERR(-45) /* CLOAD command failed */

Definition at line 99 of file use1401.h.

#define U14ERR_DRIVCOMMS   U14ERR(-110) /* failed talking to driver */

Definition at line 113 of file use1401.h.

#define U14ERR_DRIVTOOOLD   U14ERR(-82) /* device driver too old */

Definition at line 104 of file use1401.h.

#define U14ERR_ERR_STRLEN   U14ERR(-24) /* string longer than buffer */

Definition at line 86 of file use1401.h.

#define U14ERR_FAIL   U14ERR(-30) /* we failed for some other reason*/

Definition at line 92 of file use1401.h.

#define U14ERR_HOSTSPACE   U14ERR(-43) /* not enough host space to load */

Definition at line 97 of file use1401.h.

#define U14ERR_ILL   U14ERR(-2) /* if present it is ill */

Definition at line 70 of file use1401.h.

#define U14ERR_INUSE   U14ERR(-8) /* 1401 is already in use */

Definition at line 76 of file use1401.h.

#define U14ERR_LOCKERR   U14ERR(-44) /* could not lock resource/command*/

Definition at line 98 of file use1401.h.

#define U14ERR_LOCKFAIL   U14ERR(-25) /* failed to lock memory */

Definition at line 87 of file use1401.h.

#define U14ERR_NC   U14ERR(-1) /* 1401 not connected */

Definition at line 69 of file use1401.h.

#define U14ERR_NO1401DRIV   U14ERR(-81) /* no device driver */

Definition at line 103 of file use1401.h.

#define U14ERR_NO386ENH   U14ERR(-80) /* not 386 enhanced mode */

Definition at line 102 of file use1401.h.

#define U14ERR_NO_SUCH_FN   U14ERR(-20) /* no such function */

Definition at line 81 of file use1401.h.

#define U14ERR_NO_SUCH_SUBFN   U14ERR(-21) /* no such sub function */

Definition at line 82 of file use1401.h.

#define U14ERR_NODMA   U14ERR(-9) /* couldn't get DMA channel */

Definition at line 77 of file use1401.h.

#define U14ERR_NOERROR   0

Error codes: We need them here as user space can see them.

Definition at line 54 of file use1401.h.

#define U14ERR_NOFILE   U14ERR(-40) /* command file not found */

Definition at line 94 of file use1401.h.

#define U14ERR_NOIF   U14ERR(-3) /* I/F card missing */

Definition at line 71 of file use1401.h.

#define U14ERR_NOIN   U14ERR(-23) /* no input in buffer */

Definition at line 84 of file use1401.h.

#define U14ERR_NOINT   U14ERR(-7) /* couldn't grab the int vector */

Definition at line 75 of file use1401.h.

#define U14ERR_NOMEMORY   U14ERR(-103) /* no memory for allocation */

Definition at line 111 of file use1401.h.

#define U14ERR_NOOUT   U14ERR(-22) /* no room in output buffer */

Definition at line 83 of file use1401.h.

#define U14ERR_NOTSET   U14ERR(-28) /* area not set up */

Definition at line 90 of file use1401.h.

#define U14ERR_OFF   U14ERR(0) /* 1401 there but switched off */

Definition at line 68 of file use1401.h.

#define U14ERR_OUTOFMEMORY   U14ERR(-111) /* needed memory and couldnt get it*/

Definition at line 114 of file use1401.h.

#define U14ERR_PLUS   6

Definition at line 59 of file use1401.h.

#define U14ERR_POWER   7

Definition at line 60 of file use1401.h.

#define U14ERR_POWER2   9

Definition at line 62 of file use1401.h.

#define U14ERR_POWER3   11

Definition at line 64 of file use1401.h.

#define U14ERR_PTIME   U14ERR(-6) /* 1401plus failed to come ready */

Definition at line 74 of file use1401.h.

#define U14ERR_READERR   U14ERR(-41) /* error reading command file */

Definition at line 95 of file use1401.h.

#define U14ERR_STD   4

Device error codes, but these don't need to be extended - a succession is assumed.

Definition at line 57 of file use1401.h.

#define U14ERR_STRLEN   U14ERR(-24) /* string longer than buffer */

Definition at line 85 of file use1401.h.

#define U14ERR_TIME   U14ERR(-4) /* 1401 failed to come ready */

Definition at line 72 of file use1401.h.

#define U14ERR_TIMEOUT   U14ERR(-90) /* timeout occurred */

Definition at line 106 of file use1401.h.

#define U14ERR_TOXXXERR   U14ERR(-60) /* tohost/1401 failed */

Definition at line 101 of file use1401.h.

#define U14ERR_U1401   5

Definition at line 58 of file use1401.h.

#define U14ERR_U14012   8

Definition at line 61 of file use1401.h.

#define U14ERR_U14013   10

Definition at line 63 of file use1401.h.

#define U14ERR_UNKNOWN   U14ERR(-42) /* unknown command */

Definition at line 96 of file use1401.h.

#define U14ERR_UNLOCKFAIL   U14ERR(-26) /* failed to unlock memory */

Definition at line 88 of file use1401.h.

#define U14LONG   long

Definition at line 50 of file use1401.h.

#define U14TF_CIRC14   512 /* Circular-mode to 1401 */

Definition at line 139 of file use1401.h.

#define U14TF_CIRCTH   128 /* Circular-mode to host */

Definition at line 137 of file use1401.h.

#define U14TF_DIAG   256 /* Diagnostics/debug functions */

Definition at line 138 of file use1401.h.

#define U14TF_FIFO   4 /* for FIFO interface card */

Definition at line 132 of file use1401.h.

#define U14TF_MULTIA   2 /* Transfer flag for multi areas */

Definition at line 131 of file use1401.h.

#define U14TF_NOTIFY   16 /* for event notifications */

Definition at line 134 of file use1401.h.

#define U14TF_PCI2   64 /* for new PCI card 1401-70 */

Definition at line 136 of file use1401.h.

#define U14TF_SHORT   32 /* for PCI can short cycle */

Definition at line 135 of file use1401.h.

#define U14TF_USB2   8 /* for USB2 interface and 1401 */

Definition at line 133 of file use1401.h.

#define U14TF_USEDMA   1 /* Transfer flag for use DMA */

Transfer flags to allow driver capabilities to be interrogated.

Constants for transfer flags

Definition at line 130 of file use1401.h.

#define U14TYPE1401   0 /* standard 1401 */

1401 type codes.

Definition at line 117 of file use1401.h.

#define U14TYPEPLUS   1 /* 1401 plus */

Definition at line 118 of file use1401.h.

#define U14TYPEPOWER   3 /* power1401 */

Definition at line 120 of file use1401.h.

#define U14TYPEPOWER2   5 /* power1401 mk II */

Definition at line 122 of file use1401.h.

#define U14TYPEPOWER3   7 /* power1401-3 */

Definition at line 124 of file use1401.h.

#define U14TYPEU1401   2 /* u1401 */

Definition at line 119 of file use1401.h.

#define U14TYPEU14012   4 /* u1401 mk II */

Definition at line 121 of file use1401.h.

#define U14TYPEU14013   6 /* u1401-3 */

Definition at line 123 of file use1401.h.

#define U14TYPEUNKNOWN   -1 /* dont know */

Definition at line 125 of file use1401.h.

#define WORD_SIZE   2 /* 16-bit access */

Definition at line 149 of file use1401.h.

Function Documentation

U14API ( int  )

Definition at line 584 of file use1401.c.

U14API ( short  )

Definition at line 456 of file use1401.c.

U14API ( DWORD  )
U14API ( void  )

Definition at line 1485 of file use1401.c.

Variable Documentation

WORD BOOL bEvent

Definition at line 230 of file use1401.h.

WORD BOOL bToHost

Definition at line 230 of file use1401.h.

char cChar

Definition at line 221 of file use1401.h.

Definition at line 224 of file use1401.h.

Definition at line 236 of file use1401.h.

DWORD dwAddr

Definition at line 266 of file use1401.h.

DWORD dwDef

Definition at line 268 of file use1401.h.

DWORD DWORD dwEnable

Definition at line 268 of file use1401.h.

WORD BOOL void DWORD dwLength

Definition at line 227 of file use1401.h.

DWORD dwMaxKb

Definition at line 280 of file use1401.h.

WORD DWORD dwOffs

Definition at line 245 of file use1401.h.

WORD DWORD DWORD dwSize

Definition at line 236 of file use1401.h.

WORD BOOL BOOL DWORD dwStart

Definition at line 230 of file use1401.h.

DWORD DWORD dwValue

Definition at line 267 of file use1401.h.

Definition at line 227 of file use1401.h.

int lTimeout

Definition at line 251 of file use1401.h.

WORD int msTimeOut

Definition at line 233 of file use1401.h.

DWORD DWORD int int nRepeats

Definition at line 266 of file use1401.h.

DWORD DWORD int nSize

Definition at line 266 of file use1401.h.

const char * pAddrHost

Definition at line 236 of file use1401.h.

U14LONG* palBuff

Definition at line 249 of file use1401.h.

U14LONG* palNums

Definition at line 248 of file use1401.h.

char * pBuf

Definition at line 213 of file use1401.h.

char* pBuffer

Definition at line 220 of file use1401.h.

char* pcChar

Definition at line 222 of file use1401.h.

U14LONG* pData

Definition at line 274 of file use1401.h.

WORD DWORD DWORD DWORD * pdwOffs

Definition at line 244 of file use1401.h.

U14LONG* plValue

Definition at line 271 of file use1401.h.

DWORD* pMemorySize

Definition at line 258 of file use1401.h.

char* pStr

Definition at line 276 of file use1401.h.

const char* pString

Definition at line 219 of file use1401.h.

TGET_TX_BLOCK* pTransBlock

Definition at line 234 of file use1401.h.

WORD BOOL void * pvBuff

Definition at line 227 of file use1401.h.

U14LONG short sMaxLongs

Definition at line 248 of file use1401.h.

Definition at line 225 of file use1401.h.

const char* vl

Definition at line 225 of file use1401.h.

WORD wArea

Definition at line 227 of file use1401.h.

char WORD wMax

Definition at line 213 of file use1401.h.

char WORD wMaxLen

Definition at line 220 of file use1401.h.