diff options
author | Elena Ufimtseva <ufimtseva@gmail.com> | 2013-05-15 12:57:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-15 13:16:21 -0400 |
commit | d9f8374ba0c05262c9ee8816ee35fc13ece1ad3c (patch) | |
tree | 8057693872cd1dc3ce0c9665be75bca5a08db517 /drivers/staging/ced1401 | |
parent | d1cc1b861e48d05138e2b67e052c6c7f5f767840 (diff) | |
download | linux-d9f8374ba0c05262c9ee8816ee35fc13ece1ad3c.tar.gz linux-d9f8374ba0c05262c9ee8816ee35fc13ece1ad3c.tar.bz2 linux-d9f8374ba0c05262c9ee8816ee35fc13ece1ad3c.zip |
Staging: ced1401: Fixes white spaces and indentations.
Fixes white spaces and indentations warnings from checkpatch.
Signed-off-by: Elena Ufimtseva <ufimtseva@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ced1401')
-rw-r--r-- | drivers/staging/ced1401/machine.h | 39 | ||||
-rw-r--r-- | drivers/staging/ced1401/usb1401.h | 170 | ||||
-rw-r--r-- | drivers/staging/ced1401/use1401.h | 140 | ||||
-rw-r--r-- | drivers/staging/ced1401/use14_ioc.h | 492 |
4 files changed, 420 insertions, 421 deletions
diff --git a/drivers/staging/ced1401/machine.h b/drivers/staging/ced1401/machine.h index 2b0ceecc77d4..57c915519e8f 100644 --- a/drivers/staging/ced1401/machine.h +++ b/drivers/staging/ced1401/machine.h @@ -77,20 +77,20 @@ #endif #if defined(LINUX) || defined(MAXOSX) - #define FAR + #define FAR - typedef int BOOL; /* To match Windows */ - typedef char *LPSTR; - typedef const char *LPCSTR; - typedef unsigned short WORD; - typedef unsigned int DWORD; - typedef unsigned char BYTE; - typedef BYTE BOOLEAN; - typedef unsigned char UCHAR; - #define __packed __attribute__((packed)) - typedef BYTE *LPBYTE; - #define HIWORD(x) (WORD)(((x)>>16) & 0xffff) - #define LOWORD(x) (WORD)((x) & 0xffff) + typedef int BOOL; /* To match Windows */ + typedef char *LPSTR; + typedef const char *LPCSTR; + typedef unsigned short WORD; + typedef unsigned int DWORD; + typedef unsigned char BYTE; + typedef BYTE BOOLEAN; + typedef unsigned char UCHAR; + #define __packed __attribute__((packed)) + typedef BYTE *LPBYTE; + #define HIWORD(x) (WORD)(((x)>>16) & 0xffff) + #define LOWORD(x) (WORD)((x) & 0xffff) #endif #ifdef _IS_WINDOWS_ @@ -104,21 +104,20 @@ ** a synonym. */ #ifdef GNUC - #define DllExport __attribute__((dllexport)) - #define DllImport __attribute__((dllimport)) + #define DllExport __attribute__((dllexport)) + #define DllImport __attribute__((dllimport)) #endif #ifndef DllExport #ifdef _IS_WINDOWS_ - #define DllExport __declspec(dllexport) - #define DllImport __declspec(dllimport) + #define DllExport __declspec(dllexport) + #define DllImport __declspec(dllimport) #else - #define DllExport - #define DllImport + #define DllExport + #define DllImport #endif #endif /* _IS_WINDOWS_ */ - #ifndef TRUE #define TRUE 1 #define FALSE 0 diff --git a/drivers/staging/ced1401/usb1401.h b/drivers/staging/ced1401/usb1401.h index 46d45efb4db4..ce1723806051 100644 --- a/drivers/staging/ced1401/usb1401.h +++ b/drivers/staging/ced1401/usb1401.h @@ -95,39 +95,39 @@ /* A structure holding information about a block of memory for use in circular transfers */ typedef struct circBlk { - volatile UINT dwOffset; /* Offset within area of block start */ - volatile UINT dwSize; /* Size of the block, in bytes (0 = unused) */ + volatile UINT dwOffset; /* Offset within area of block start */ + volatile UINT dwSize; /* Size of the block, in bytes (0 = unused) */ } CIRCBLK; /* A structure holding all of the information about a transfer area - an area of */ /* memory set up for use either as a source or destination in DMA transfers. */ typedef struct transarea { - void *lpvBuff; /* User address of xfer area saved for completeness */ - UINT dwBaseOffset; /* offset to start of xfer area in first page */ - UINT dwLength; /* Length of xfer area, in bytes */ - struct page **pPages; /* Points at array of locked down pages */ - int nPages; /* number of pages that are locked down */ - bool bUsed; /* Is this structure in use? */ - bool bCircular; /* Is this area for circular transfers? */ - bool bCircToHost; /* Flag for direction of circular transfer */ - bool bEventToHost; /* Set event on transfer to host? */ - int iWakeUp; /* Set 1 on event, cleared by TestEvent() */ - UINT dwEventSt; /* Defines section within xfer area for... */ - UINT dwEventSz; /* ...notification by the event SZ is 0 if unset */ - CIRCBLK aBlocks[2]; /* Info on a pair of circular blocks */ - wait_queue_head_t wqEvent; /* The wait queue for events in this area MUST BE LAST */ + void *lpvBuff; /* User address of xfer area saved for completeness */ + UINT dwBaseOffset; /* offset to start of xfer area in first page */ + UINT dwLength; /* Length of xfer area, in bytes */ + struct page **pPages; /* Points at array of locked down pages */ + int nPages; /* number of pages that are locked down */ + bool bUsed; /* Is this structure in use? */ + bool bCircular; /* Is this area for circular transfers? */ + bool bCircToHost; /* Flag for direction of circular transfer */ + bool bEventToHost; /* Set event on transfer to host? */ + int iWakeUp; /* Set 1 on event, cleared by TestEvent() */ + UINT dwEventSt; /* Defines section within xfer area for... */ + UINT dwEventSz; /* ...notification by the event SZ is 0 if unset */ + CIRCBLK aBlocks[2]; /* Info on a pair of circular blocks */ + wait_queue_head_t wqEvent; /* The wait queue for events in this area MUST BE LAST */ } TRANSAREA; /* The DMADESC structure is used to hold information on the transfer in progress. It */ /* is set up by ReadDMAInfo, using information sent by the 1401 in an escape sequence. */ typedef struct dmadesc { - unsigned short wTransType; /* transfer type as TM_xxx above */ - unsigned short wIdent; /* identifier word */ - unsigned int dwSize; /* bytes to transfer */ - unsigned int dwOffset; /* offset into transfer area for trans */ - bool bOutWard; /* true when data is going TO 1401 */ + unsigned short wTransType; /* transfer type as TM_xxx above */ + unsigned short wIdent; /* identifier word */ + unsigned int dwSize; /* bytes to transfer */ + unsigned int dwOffset; /* offset into transfer area for trans */ + bool bOutWard; /* true when data is going TO 1401 */ } DMADESC; #define INBUF_SZ 256 /* input buffer size */ @@ -138,69 +138,69 @@ typedef struct dmadesc /* can to the Windows driver to help in our understanding of what is going on. */ typedef struct _DEVICE_EXTENSION { - char inputBuffer[INBUF_SZ]; /* The two buffers */ - char outputBuffer[OUTBUF_SZ]; /* accessed by the host functions */ - volatile unsigned int dwNumInput; /* num of chars in input buffer */ - volatile unsigned int dwInBuffGet; /* where to get from input buffer */ - volatile unsigned int dwInBuffPut; /* where to put into input buffer */ - volatile unsigned int dwNumOutput; /* num of chars in output buffer */ - volatile unsigned int dwOutBuffGet; /* where to get from output buffer*/ - volatile unsigned int dwOutBuffPut; /* where to put into output buffer*/ - - volatile bool bSendCharsPending; /* Flag to indicate sendchar active */ - volatile bool bReadCharsPending; /* Flag to indicate a read is primed */ - char *pCoherCharOut; /* special aligned buffer for chars to 1401 */ - struct urb *pUrbCharOut; /* urb used for chars to 1401 */ - char *pCoherCharIn; /* special aligned buffer for chars to host */ - struct urb *pUrbCharIn; /* urb used for chars to host */ - - spinlock_t charOutLock; /* to protect the outputBuffer and outputting */ - spinlock_t charInLock; /* to protect the inputBuffer and char reads */ - __u8 bInterval; /* Interrupt end point interval */ - - volatile unsigned int dwDMAFlag; /* state of DMA */ - TRANSAREA rTransDef[MAX_TRANSAREAS];/* transfer area info */ - volatile DMADESC rDMAInfo; /* info on current DMA transfer */ - volatile bool bXFerWaiting; /* Flag set if DMA transfer stalled */ - volatile bool bInDrawDown; /* Flag that we want to halt transfers */ - - /* Parameters relating to a block read\write that is in progress. Some of these values */ - /* are equivalent to values in rDMAInfo. The values here are those in use, while those */ - /* in rDMAInfo are those received from the 1401 via an escape sequence. If another */ - /* escape sequence arrives before the previous xfer ends, rDMAInfo values are updated while these */ - /* are used to finish off the current transfer. */ - volatile short StagedId; /* The transfer area id for this transfer */ - volatile bool StagedRead; /* Flag TRUE for read from 1401, FALSE for write */ - volatile unsigned int StagedLength; /* Total length of this transfer */ - volatile unsigned int StagedOffset; /* Offset within memory area for transfer start */ - volatile unsigned int StagedDone; /* Bytes transferred so far */ - volatile bool bStagedUrbPending; /* Flag to indicate active */ - char *pCoherStagedIO; /* buffer used for block transfers */ - struct urb *pStagedUrb; /* The URB to use */ - spinlock_t stagedLock; /* protects ReadWriteMem() and circular buffer stuff */ - - short s1401Type; /* type of 1401 attached */ - short sCurrentState; /* current error state */ - bool bIsUSB2; /* type of the interface we connect to */ - bool bForceReset; /* Flag to make sure we get a real reset */ - __u32 statBuf[2]; /* buffer for 1401 state info */ - - unsigned long ulSelfTestTime; /* used to timeout self test */ - - int nPipes; /* Should be 3 or 4 depending on 1401 usb chip */ - int bPipeError[4]; /* set non-zero if an error on one of the pipe */ - __u8 epAddr[4]; /* addresses of the 3/4 end points */ - - struct usb_device *udev; /* the usb device for this device */ - struct usb_interface *interface; /* the interface for this device, NULL if removed */ - struct usb_anchor submitted; /* in case we need to retract our submissions */ - struct mutex io_mutex; /* synchronize I/O with disconnect, one user-mode caller at a time */ - - int errors; /* the last request tanked */ - int open_count; /* count the number of openers */ - spinlock_t err_lock; /* lock for errors */ - struct kref kref; -}DEVICE_EXTENSION, *PDEVICE_EXTENSION; + char inputBuffer[INBUF_SZ]; /* The two buffers */ + char outputBuffer[OUTBUF_SZ]; /* accessed by the host functions */ + volatile unsigned int dwNumInput; /* num of chars in input buffer */ + volatile unsigned int dwInBuffGet; /* where to get from input buffer */ + volatile unsigned int dwInBuffPut; /* where to put into input buffer */ + volatile unsigned int dwNumOutput; /* num of chars in output buffer */ + volatile unsigned int dwOutBuffGet; /* where to get from output buffer*/ + volatile unsigned int dwOutBuffPut; /* where to put into output buffer*/ + + volatile bool bSendCharsPending; /* Flag to indicate sendchar active */ + volatile bool bReadCharsPending; /* Flag to indicate a read is primed */ + char *pCoherCharOut; /* special aligned buffer for chars to 1401 */ + struct urb *pUrbCharOut; /* urb used for chars to 1401 */ + char *pCoherCharIn; /* special aligned buffer for chars to host */ + struct urb *pUrbCharIn; /* urb used for chars to host */ + + spinlock_t charOutLock; /* to protect the outputBuffer and outputting */ + spinlock_t charInLock; /* to protect the inputBuffer and char reads */ + __u8 bInterval; /* Interrupt end point interval */ + + volatile unsigned int dwDMAFlag; /* state of DMA */ + TRANSAREA rTransDef[MAX_TRANSAREAS];/* transfer area info */ + volatile DMADESC rDMAInfo; /* info on current DMA transfer */ + volatile bool bXFerWaiting; /* Flag set if DMA transfer stalled */ + volatile bool bInDrawDown; /* Flag that we want to halt transfers */ + + /* Parameters relating to a block read\write that is in progress. Some of these values */ + /* are equivalent to values in rDMAInfo. The values here are those in use, while those */ + /* in rDMAInfo are those received from the 1401 via an escape sequence. If another */ + /* escape sequence arrives before the previous xfer ends, rDMAInfo values are updated while these */ + /* are used to finish off the current transfer. */ + volatile short StagedId; /* The transfer area id for this transfer */ + volatile bool StagedRead; /* Flag TRUE for read from 1401, FALSE for write */ + volatile unsigned int StagedLength; /* Total length of this transfer */ + volatile unsigned int StagedOffset; /* Offset within memory area for transfer start */ + volatile unsigned int StagedDone; /* Bytes transferred so far */ + volatile bool bStagedUrbPending; /* Flag to indicate active */ + char *pCoherStagedIO; /* buffer used for block transfers */ + struct urb *pStagedUrb; /* The URB to use */ + spinlock_t stagedLock; /* protects ReadWriteMem() and circular buffer stuff */ + + short s1401Type; /* type of 1401 attached */ + short sCurrentState; /* current error state */ + bool bIsUSB2; /* type of the interface we connect to */ + bool bForceReset; /* Flag to make sure we get a real reset */ + __u32 statBuf[2]; /* buffer for 1401 state info */ + + unsigned long ulSelfTestTime; /* used to timeout self test */ + + int nPipes; /* Should be 3 or 4 depending on 1401 usb chip */ + int bPipeError[4]; /* set non-zero if an error on one of the pipe */ + __u8 epAddr[4]; /* addresses of the 3/4 end points */ + + struct usb_device *udev; /* the usb device for this device */ + struct usb_interface *interface; /* the interface for this device, NULL if removed */ + struct usb_anchor submitted; /* in case we need to retract our submissions */ + struct mutex io_mutex; /* synchronize I/O with disconnect, one user-mode caller at a time */ + + int errors; /* the last request tanked */ + int open_count; /* count the number of openers */ + spinlock_t err_lock; /* lock for errors */ + struct kref kref; +} DEVICE_EXTENSION, *PDEVICE_EXTENSION; #define to_DEVICE_EXTENSION(d) container_of(d, DEVICE_EXTENSION, kref) /* Definitions of routimes used between compilation object files */ @@ -209,7 +209,7 @@ extern int Allowi(DEVICE_EXTENSION *pdx); extern int SendChars(DEVICE_EXTENSION *pdx); extern void ced_draw_down(DEVICE_EXTENSION *pdx); extern int ReadWriteMem(DEVICE_EXTENSION *pdx, bool Read, unsigned short wIdent, - unsigned int dwOffs, unsigned int dwLen); + unsigned int dwOffs, unsigned int dwLen); /* in ced_ioc.c */ extern int ClearArea(DEVICE_EXTENSION *pdx, int nArea); diff --git a/drivers/staging/ced1401/use1401.h b/drivers/staging/ced1401/use1401.h index 4812bbdd0dfb..0ebadd504bd0 100644 --- a/drivers/staging/ced1401/use1401.h +++ b/drivers/staging/ced1401/use1401.h @@ -157,19 +157,19 @@ typedef struct /* used for U14_GetTransfer results */ { /* Info on a single mapped block */ - U14LONG physical; - U14LONG size; + U14LONG physical; + U14LONG size; } TXENTRY; typedef struct TGetTxBlock /* used for U14_GetTransfer results */ { /* matches structure in VXD */ - U14LONG size; - U14LONG linear; - short seg; - short reserved; - short avail; /* number of available entries */ - short used; /* number of used entries */ - TXENTRY entries[GET_TX_MAXENTRIES]; /* Array of mapped block info */ + U14LONG size; + U14LONG linear; + short seg; + short reserved; + short avail; /* number of available entries */ + short used; /* number of used entries */ + TXENTRY entries[GET_TX_MAXENTRIES]; /* Array of mapped block info */ } TGET_TX_BLOCK; typedef TGET_TX_BLOCK *LPGET_TX_BLOCK; @@ -180,19 +180,19 @@ typedef TGET_TX_BLOCK *LPGET_TX_BLOCK; #ifdef LINUX typedef struct /* used for U14_GetTransfer results */ { /* Info on a single mapped block */ - long long physical; - long size; + long long physical; + long size; } TXENTRY; typedef struct TGetTxBlock /* used for U14_GetTransfer results */ { /* matches structure in VXD */ - long long linear; /* linear address */ - long size; /* total size of the mapped area, holds id when called */ - short seg; /* segment of the address for Win16 */ - short reserved; - short avail; /* number of available entries */ - short used; /* number of used entries */ - TXENTRY entries[GET_TX_MAXENTRIES]; /* Array of mapped block info */ + long long linear; /* linear address */ + long size; /* total size of the mapped area, holds id when called */ + short seg; /* segment of the address for Win16 */ + short reserved; + short avail; /* number of available entries */ + short used; /* number of used entries */ + TXENTRY entries[GET_TX_MAXENTRIES]; /* Array of mapped block info */ } TGET_TX_BLOCK; #endif @@ -201,83 +201,83 @@ extern "C" { #endif U14API(int) U14WhenToTimeOut(short hand); /* when to timeout in ms */ -U14API(short) U14PassedTime(int iTime); /* non-zero if iTime passed */ +U14API(short) U14PassedTime(int iTime); /* non-zero if iTime passed */ -U14API(short) U14LastErrCode(short hand); +U14API(short) U14LastErrCode(short hand); -U14API(short) U14Open1401(short n1401); -U14API(short) U14Close1401(short hand); -U14API(short) U14Reset1401(short hand); -U14API(short) U14ForceReset(short hand); -U14API(short) U14TypeOf1401(short hand); -U14API(short) U14NameOf1401(short hand, char *pBuf, WORD wMax); +U14API(short) U14Open1401(short n1401); +U14API(short) U14Close1401(short hand); +U14API(short) U14Reset1401(short hand); +U14API(short) U14ForceReset(short hand); +U14API(short) U14TypeOf1401(short hand); +U14API(short) U14NameOf1401(short hand, char *pBuf, WORD wMax); -U14API(short) U14Stat1401(short hand); -U14API(short) U14CharCount(short hand); -U14API(short) U14LineCount(short hand); +U14API(short) U14Stat1401(short hand); +U14API(short) U14CharCount(short hand); +U14API(short) U14LineCount(short hand); -U14API(short) U14SendString(short hand, const char *pString); -U14API(short) U14GetString(short hand, char *pBuffer, WORD wMaxLen); -U14API(short) U14SendChar(short hand, char cChar); -U14API(short) U14GetChar(short hand, char *pcChar); +U14API(short) U14SendString(short hand, const char *pString); +U14API(short) U14GetString(short hand, char *pBuffer, WORD wMaxLen); +U14API(short) U14SendChar(short hand, char cChar); +U14API(short) U14GetChar(short hand, char *pcChar); -U14API(short) U14LdCmd(short hand, const char *command); +U14API(short) U14LdCmd(short hand, const char *command); U14API(DWORD) U14Ld(short hand, const char *vl, const char *str); -U14API(short) U14SetTransArea(short hand, WORD wArea, void *pvBuff, - DWORD dwLength, short eSz); -U14API(short) U14UnSetTransfer(short hand, WORD wArea); -U14API(short) U14SetTransferEvent(short hand, WORD wArea, BOOL bEvent, - BOOL bToHost, DWORD dwStart, DWORD dwLength); +U14API(short) U14SetTransArea(short hand, WORD wArea, void *pvBuff, + DWORD dwLength, short eSz); +U14API(short) U14UnSetTransfer(short hand, WORD wArea); +U14API(short) U14SetTransferEvent(short hand, WORD wArea, BOOL bEvent, + BOOL bToHost, DWORD dwStart, DWORD dwLength); U14API(int) U14TestTransferEvent(short hand, WORD wArea); U14API(int) U14WaitTransferEvent(short hand, WORD wArea, int msTimeOut); -U14API(short) U14GetTransfer(short hand, TGET_TX_BLOCK *pTransBlock); +U14API(short) U14GetTransfer(short hand, TGET_TX_BLOCK *pTransBlock); -U14API(short) U14ToHost(short hand, char *pAddrHost,DWORD dwSize,DWORD dw1401, - short eSz); -U14API(short) U14To1401(short hand, const char *pAddrHost,DWORD dwSize,DWORD dw1401, - short eSz); +U14API(short) U14ToHost(short hand, char *pAddrHost, DWORD dwSize, DWORD dw1401, + short eSz); +U14API(short) U14To1401(short hand, const char *pAddrHost, DWORD dwSize, DWORD dw1401, + short eSz); -U14API(short) U14SetCircular(short hand, WORD wArea, BOOL bToHost, void *pvBuff, - DWORD dwLength); +U14API(short) U14SetCircular(short hand, WORD wArea, BOOL bToHost, void *pvBuff, + DWORD dwLength); U14API(int) U14GetCircBlk(short hand, WORD wArea, DWORD *pdwOffs); U14API(int) U14FreeCircBlk(short hand, WORD wArea, DWORD dwOffs, DWORD dwSize, - DWORD *pdwOffs); + DWORD *pdwOffs); -U14API(short) U14StrToLongs(const char *pszBuff, U14LONG *palNums, short sMaxLongs); -U14API(short) U14LongsFrom1401(short hand, U14LONG *palBuff, short sMaxLongs); +U14API(short) U14StrToLongs(const char *pszBuff, U14LONG *palNums, short sMaxLongs); +U14API(short) U14LongsFrom1401(short hand, U14LONG *palBuff, short sMaxLongs); U14API(void) U14SetTimeout(short hand, int lTimeout); U14API(int) U14GetTimeout(short hand); -U14API(short) U14OutBufSpace(short hand); +U14API(short) U14OutBufSpace(short hand); U14API(int) U14BaseAddr1401(short hand); U14API(int) U14DriverVersion(short hand); U14API(int) U14DriverType(short hand); -U14API(short) U14DriverName(short hand, char *pBuf, WORD wMax); -U14API(short) U14GetUserMemorySize(short hand, DWORD *pMemorySize); -U14API(short) U14KillIO1401(short hand); - -U14API(short) U14BlkTransState(short hand); -U14API(short) U14StateOf1401(short hand); - -U14API(short) U14Grab1401(short hand); -U14API(short) U14Free1401(short hand); -U14API(short) U14Peek1401(short hand, DWORD dwAddr, int nSize, int nRepeats); -U14API(short) U14Poke1401(short hand, DWORD dwAddr, DWORD dwValue, int nSize, int nRepeats); -U14API(short) U14Ramp1401(short hand, DWORD dwAddr, DWORD dwDef, DWORD dwEnable, int nSize, int nRepeats); -U14API(short) U14RampAddr(short hand, DWORD dwDef, DWORD dwEnable, int nSize, int nRepeats); -U14API(short) U14StopDebugLoop(short hand); -U14API(short) U14GetDebugData(short hand, U14LONG *plValue); - -U14API(short) U14StartSelfTest(short hand); -U14API(short) U14CheckSelfTest(short hand, U14LONG *pData); -U14API(short) U14TransferFlags(short hand); +U14API(short) U14DriverName(short hand, char *pBuf, WORD wMax); +U14API(short) U14GetUserMemorySize(short hand, DWORD *pMemorySize); +U14API(short) U14KillIO1401(short hand); + +U14API(short) U14BlkTransState(short hand); +U14API(short) U14StateOf1401(short hand); + +U14API(short) U14Grab1401(short hand); +U14API(short) U14Free1401(short hand); +U14API(short) U14Peek1401(short hand, DWORD dwAddr, int nSize, int nRepeats); +U14API(short) U14Poke1401(short hand, DWORD dwAddr, DWORD dwValue, int nSize, int nRepeats); +U14API(short) U14Ramp1401(short hand, DWORD dwAddr, DWORD dwDef, DWORD dwEnable, int nSize, int nRepeats); +U14API(short) U14RampAddr(short hand, DWORD dwDef, DWORD dwEnable, int nSize, int nRepeats); +U14API(short) U14StopDebugLoop(short hand); +U14API(short) U14GetDebugData(short hand, U14LONG *plValue); + +U14API(short) U14StartSelfTest(short hand); +U14API(short) U14CheckSelfTest(short hand, U14LONG *pData); +U14API(short) U14TransferFlags(short hand); U14API(void) U14GetErrorString(short nErr, char *pStr, WORD wMax); U14API(int) U14MonitorRev(short hand); U14API(void) U14CloseAll(void); -U14API(short) U14WorkingSet(DWORD dwMinKb, DWORD dwMaxKb); +U14API(short) U14WorkingSet(DWORD dwMinKb, DWORD dwMaxKb); U14API(int) U14InitLib(void); #ifdef __cplusplus diff --git a/drivers/staging/ced1401/use14_ioc.h b/drivers/staging/ced1401/use14_ioc.h index bb8227a5cb58..3a5678a339d6 100644 --- a/drivers/staging/ced1401/use14_ioc.h +++ b/drivers/staging/ced1401/use14_ioc.h @@ -19,270 +19,270 @@ ** The IOCTL function codes from 0x80 to 0xFF are for developer use. */ #define FILE_DEVICE_CED1401 0x8001 -#define FNNUMBASE 0x800 - -#define U14_OPEN1401 CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_CLOSE1401 CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+1, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_SENDSTRING CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+2, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_RESET1401 CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+3, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_GETCHAR CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+4, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_SENDCHAR CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+5, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_STAT1401 CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+6, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_LINECOUNT CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+7, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_GETSTRING CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+8, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_REGCALLBACK CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+9, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_GETMONITORBUF CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+10, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_SETTRANSFER CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+11, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_UNSETTRANSFER CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+12, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_SETTRANSEVENT CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+13, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_GETOUTBUFSPACE CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+14, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_GETBASEADDRESS CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+15, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_GETDRIVERREVISION CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+16, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_GETTRANSFER CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+17, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_KILLIO1401 CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+18, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_BLKTRANSSTATE CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+19, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_BYTECOUNT CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+20, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_ZEROBLOCKCOUNT CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+21, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_STOPCIRCULAR CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+22, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_STATEOF1401 CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+23, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_REGISTERS1401 CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+24, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_GRAB1401 CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+25, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_FREE1401 CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+26, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_STEP1401 CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+27, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_SET1401REGISTERS CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+28, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_STEPTILL1401 CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+29, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_SETORIN CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+30, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_STARTSELFTEST CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+31, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_CHECKSELFTEST CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+32, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_TYPEOF1401 CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+33, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_TRANSFERFLAGS CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+34, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_DBGPEEK CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+35, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_DBGPOKE CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+36, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_DBGRAMPDATA CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+37, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_DBGRAMPADDR CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+38, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_DBGGETDATA CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+39, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_DBGSTOPLOOP CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+40, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_FULLRESET CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+41, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_SETCIRCULAR CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+42, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_GETCIRCBLK CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+43, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) - -#define U14_FREECIRCBLK CTL_CODE( FILE_DEVICE_CED1401, \ - FNNUMBASE+44, \ - METHOD_BUFFERED, \ - FILE_ANY_ACCESS) + FNNUMBASE 0x800 + +#define U14_OPEN1401 CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_CLOSE1401 CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+1, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_SENDSTRING CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+2, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS + +#define U14_RESET1401 CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+3, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_GETCHAR CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+4, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_SENDCHAR CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+5, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_STAT1401 CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+6, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_LINECOUNT CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+7, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_GETSTRING CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+8, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_REGCALLBACK CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+9, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_GETMONITORBUF CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+10, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_SETTRANSFER CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+11, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_UNSETTRANSFER CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+12, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_SETTRANSEVENT CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+13, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_GETOUTBUFSPACE CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+14, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_GETBASEADDRESS CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+15, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_GETDRIVERREVISION CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+16, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_GETTRANSFER CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+17, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_KILLIO1401 CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+18, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_BLKTRANSSTATE CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+19, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_BYTECOUNT CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+20, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_ZEROBLOCKCOUNT CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+21, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_STOPCIRCULAR CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+22, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_STATEOF1401 CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+23, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_REGISTERS1401 CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+24, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_GRAB1401 CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+25, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_FREE1401 CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+26, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_STEP1401 CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+27, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_SET1401REGISTERS CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+28, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_STEPTILL1401 CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+29, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_SETORIN CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+30, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_STARTSELFTEST CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+31, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_CHECKSELFTEST CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+32, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_TYPEOF1401 CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+33, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_TRANSFERFLAGS CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+34, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_DBGPEEK CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+35, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_DBGPOKE CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+36, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_DBGRAMPDATA CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+37, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_DBGRAMPADDR CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+38, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_DBGGETDATA CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+39, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_DBGSTOPLOOP CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+40, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_FULLRESET CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+41, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_SETCIRCULAR CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+42, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_GETCIRCBLK CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+43, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) + +#define U14_FREECIRCBLK CTL_CODE(FILE_DEVICE_CED1401, \ + FNNUMBASE+44, \ + METHOD_BUFFERED, \ + FILE_ANY_ACCESS) /*--------------- Structures that are shared with the driver ------------- */ #pragma pack(1) typedef struct /* used for get/set standard 1401 registers */ { - short sPC; - char A; - char X; - char Y; - char stat; - char rubbish; + short sPC; + char A; + char X; + char Y; + char stat; + char rubbish; } T1401REGISTERS; typedef union /* to communicate with 1401 driver status & control funcs */ { - char chrs[22]; - short ints[11]; - long longs[5]; - T1401REGISTERS registers; + char chrs[22]; + short ints[11]; + long longs[5]; + T1401REGISTERS registers; } TCSBLOCK; typedef TCSBLOCK* LPTCSBLOCK; typedef struct paramBlk { - short sState; - TCSBLOCK csBlock; + short sState; + TCSBLOCK csBlock; } PARAMBLK; typedef PARAMBLK* PPARAMBLK; typedef struct TransferDesc /* Structure and type for SetTransArea */ { - WORD wArea; /* number of transfer area to set up */ - void FAR *lpvBuff; /* address of transfer area */ - DWORD dwLength; /* length of area to set up */ - short eSize; /* size to move (for swapping on MAC) */ + WORD wArea; /* number of transfer area to set up */ + void FAR *lpvBuff; /* address of transfer area */ + DWORD dwLength; /* length of area to set up */ + short eSize; /* size to move (for swapping on MAC) */ } TRANSFERDESC; typedef TRANSFERDESC FAR *LPTRANSFERDESC; @@ -290,10 +290,10 @@ typedef TRANSFERDESC FAR *LPTRANSFERDESC; /* This is the structure used to set up a transfer area */ typedef struct VXTransferDesc /* use1401.c and use1432x.x use only */ { - WORD wArea; /* number of transfer area to set up */ - WORD wAddrSel; /* 16 bit selector for area */ - DWORD dwAddrOfs; /* 32 bit offset for area start */ - DWORD dwLength; /* length of area to set up */ + WORD wArea; /* number of transfer area to set up */ + WORD wAddrSel; /* 16 bit selector for area */ + DWORD dwAddrOfs; /* 32 bit offset for area start */ + DWORD dwLength; /* length of area to set up */ } VXTRANSFERDESC; #pragma pack() |