⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 universedmavme_dy4.h

📁 sbc7410的vxworksbsp
💻 H
字号:
/* ------------------------------------------------------------------------ *\** universeDmaVme_dy4.h - Tundra UNIVERSE II PCI-VME DMA interface library      **** ------------------------------------------------------------------------ ****                                                                          ****  DY 4 Universe II VxWorks demonstration DMA driver for SVME-178          ****                                                                          ****  Copyright (C) 2001                                                      ****  DY 4 Systems, Inc.                                                      ****                                                                          ****  Project: EB955                                                          ****                                                                          **** ------------------------------------------------------------------------ ****                                                                          ****  Prepared by Applied Microelectronics Incorporated                       ****                                                                          **** ------------------------------------------------------------------------ ****                                                                          ****  DESCRIPTION                                                             ****  This library contains macros which relate to the DMA functions of       ****  the Universe II PCI/VMEbus chip.                                        ****                                                                          **** ------------------------------------------------------------------------ ****                                                                          ****  Author:                Neil.Hamilton@appliedmicro.ns.ca                 ****                                                                          ****  Language:              C                                                ****                                                                          **\* ------------------------------------------------------------------------ *//* ------------------------------------------------------------------------ *\    Filename:              $Source: W:\\hamilton\\eb955\\target\\config\\svme178\\h\\drv\\vme\\RCS/universeDmaVme.h,v $    Current Revision:      $Revision: 1.13 $    Last Updated:          $Date: 1999/01/28 15:08:08 $    Last Modified by:      $Author: Neil.Hamilton $    Currently Locked by:   $Locker:  $    Change History:    $Log: universeDmaVme.h,v $    Revision 1.13  1999/01/28 15:08:08  Neil.Hamilton    - Added prototypes for the usable exmple async ISR functions.    Revision 1.12  1999/01/27 15:51:43  Neil.Hamilton    - Removed prototype for (now defunct) sysVmeDmaReleaseMutex() as      this operation is now handled within the sysVmeDmaIsAsyncDone()      function.    Revision 1.11  1999/01/26 19:02:38  Neil.Hamilton    - 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.    Revision 1.10  1999/01/20 19:08:59  Neil.Hamilton    - As delievered to DY4 15Jan1999.    Revision 1.9  1999/01/15 14:15:29  Neil.Hamilton    - Corrected typo.    Revision 1.8  1999/01/15 11:36:51  Neil.Hamilton    - Added correct masks for VAS and VDW.    Revision 1.7  1999/01/14 19:46:35  Neil.Hamilton    - Added function sysVmeDmaClr to prototypes.    Revision 1.6  1999/01/11 15:08:27  Neil.Hamilton    - Fixed typo in UNIT32 vs UINT32.    Revision 1.5  1999/01/10 16:20:01  Neil.Hamilton    - Changed DMA block size from int to UINT32 to prevent it going      negative.    Revision 1.4  1999/01/08 12:07:08  Neil.Hamilton    - Fixed slight problem with comment within a comment.    Revision 1.3  1999/01/08 01:35:25  Neil.Hamilton    - Added prototypes for getiing and setting the debug flag state.    Revision 1.2  1999/01/07 23:58:52  Neil.Hamilton    - Added prototypes for DMA functions.    Revision 1.1  1999/01/07 18:44:59  Neil.Hamilton    Initial revision\* ------------------------------------------------------------------------ *//* universeDmaVme.h - Tundra VMEbus DMA header file *//* Copyright 1998 DY 4 Systems, Inc. *//*modification history--------------------01a,15Dec98,NFH(@AMI) created*/#ifndef __INCuniverseDmaVmeh#define __INCuniverseDmaVmeh/* * This file contains constants for the Universe 2 PCI-VME interface chip * DMA engine. */#ifdef __cplusplusIMPORT "C" {#endif/*DESCRIPTION-----------This header file contains all definitions and declarationsfor the Tundra VME bus DMA functions.*//* 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 + -