📄 universedmavme_dy4.h
字号:
/* universeDmaVme_dy4.h - DY 4 VME-182 board series vxWorks file. *//* Copyright 2003 DY 4 Systems, Inc. *//* Copyright 1984 - 1997 Wind River Systems, Inc. *//*modification history--------------------01o,29may03, rgs Standard file header added.01n,28jan99, nfh Added prototypes for the usable example async ISR functions.01m,27jan99, nfh Removed prototype for (now defunct) sysVmeDmaReleaseMutex() as this operation is now handled within the sysVmeDmaIsAsyncDone() function.01l,26jan99, nfh Added prototypes to get at the binary and mutex semaphores. Also to gain access to the LastAsyncStatus if this is used in the used defined ISR function.01k,20jan99, nfh As delievered to DY4 15Jan1999.01j,15jan99, nfh Corrected typo.01i,15jan99, nfh Added correct masks for VAS and VDW.01h,14jan99, nfh Added function sysVmeDmaClr to prototypes.01g,11jan99, nfh Fixed typo in UNIT32 vs UINT32.01f,10jan99, nfh Changed DMA block size from int to UINT32 to prevent it going negative.01e,08jan99, nfh Fixed slight problem with comment within a comment.01d,08jan99, nfh Added prototypes for getting and setting the debug flag state.01c,07jan99, nfh Added prototypes for DMA functions.01b,07jan99, nfh Initial revision.01a,15dec98, nfh Created.*//*DESCRIPTION:Tundra UNIVERSE II PCI-VME DMA interface library header file.Contains definitions and declarations which relate to the DMA functionsof the Universe II PCI/VMEbus chip.INCLUDE FILES:SEE ALSO:*/#ifndef __INCuniverseDmaVmeh#define __INCuniverseDmaVmeh#ifdef __cplusplusIMPORT "C" {#endif/* parameter for Set and Get functions */#define UNIVERSE_VME_DMA_ACAP 11#define UNIVERSE_VME_DMA_DCAP 12#define UNIVERSE_VME_DMA_BSIZE 13 /* max VME block size */#define UNIVERSE_VME_DMA_DELAY 14 /* delay between VME blocks */#define UNIVERSE_VME_DMA_UCAP 15 /* User/Supervisor capabilities */#define UNIVERSE_VME_DMA_PCAP 16 /* Program/Data capabilities *//* address capabilities */#define UNIVERSE_ACAP_A16 1#define UNIVERSE_ACAP_A24 2#define UNIVERSE_ACAP_A32 3/* data capabilities */#define UNIVERSE_DCAP_D8 1#define UNIVERSE_DCAP_D16 2#define UNIVERSE_DCAP_D32 3#define UNIVERSE_DCAP_BLT 4#define UNIVERSE_DCAP_MBLT 5#define UNIVERSE_DCAP_D64 6/* dctl mask */#define DCTL_DMA_AM_USR_MASK (3 << 12) /* Bits 13..12 USR/SUP AM code */#define DCTL_DMA_AM_PGM_MASK (3 << 14) /* Bits 15..14 PGM/DATA AM code */#define DCTL_DMA_VAS_MASK (7 << 16) /* Bits 18..16 VME addr space */#define DCTL_DMA_VDW_MASK (3 << 22) /* Bits 23..22 VME data width *//* dgcs mask */#define DGCS_DMA_DELAY_MASK (0xF << 16) /* Bit 19..16 tenure delay */#define DGCS_DMA_SIZE_MASK (0xF << 20) /* Bit 23..20 max block size *//* user/supervisor capabilities */#define UNIVERSE_UCAP_USR 0#define UNIVERSE_UCAP_SUP 1/* program space/data space capabilities */#define PCAP_DATA 0#define PCAP_PGM 1#ifndef _ASMLANGUAGE/* function declarations */#if defined(__STDC__) || defined(__cplusplus)/* * Public functions. */IMPORT STATUS sysVmeDmaGet (UINT8 type, UINT32 * value);IMPORT STATUS sysVmeDmaSet (UINT8 type, UINT32 value);IMPORT STATUS sysVmeDmaCopy (char * local_addr, char * vme_addr, UINT32 xfer_size, BOOL to_vme);IMPORT STATUS sysVmeDmaLock (void);IMPORT STATUS sysVmeDmaUnlock (BOOL force_unlock);IMPORT STATUS sysVmeDmaClr (void);IMPORT STATUS async_sysVmeDmaCopy (char * local_addr, char * vme_addr, UINT32 xfer_size, BOOL toVme);IMPORT STATUS sysVmeDmaConnect ( FUNCPTR routine );IMPORT STATUS sysVmeDmaIsAsyncDone( UINT32 timeout );IMPORT STATUS sysVmeDmaGetLastAsyncStatus ( void );IMPORT STATUS sysVmeDmaSetLastAsyncStatus ( STATUS last_status );/* Usable example async ISR functions */IMPORT void async_sysVmeDmaExampleISR ( void );IMPORT STATUS sysVmeDmaGetLastAsyncStatus ( void );IMPORT STATUS sysVmeDmaSetLastAsyncStatus ( STATUS last_status );/* * Internal function. */IMPORT STATUS sysVmeDmaInit (void);/* * Debug functions. */IMPORT BOOL sysVmeDmaSetDebugState ( BOOL new_state );IMPORT BOOL sysVmeDmaGetDebugState ( void );#else /* __STDC__ */IMPORT STATUS sysVmeDmaInit ();IMPORT STATUS sysVmeDmaClr ();IMPORT STATUS sysVmeDmaGet ();IMPORT STATUS sysVmeDmaSet ();IMPORT STATUS sysVmeDmaCopy ();IMPORT STATUS sysVmeDmaLock ();IMPORT STATUS sysVmeDmaUnlock ();IMPORT STATUS async_sysVmeDmaCopy ();IMPORT STATUS sysVmeDmaConnect ();IMPORT STATUS sysVmeDmaIsAsyncDone ();IMPORT STATUS sysVmeDmaGetLastAsyncStatus ();IMPORT STATUS sysVmeDmaSetLastAsyncStatus ();/* Usable example async ISR functions */IMPORT void async_sysVmeDmaExampleISR ();IMPORT STATUS sysVmeDmaGetLastAsyncStatus ();IMPORT STATUS sysVmeDmaSetLastAsyncStatus ();/* Debug functions. */IMPORT BOOL sysVmeDmaSetDebugState ();IMPORT BOOL sysVmeDmaGetDebugState ();#endif /* __STDC__ */#endif /* _ASMLANGUAGE */#ifdef __cplusplus}#endif#endif /* __INCuniverseDmaVmeh */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -