vmicvme.h

Go to the documentation of this file.
00001 /*********************************************************************
00002   Name:         vmicvme.h
00003   Created by:   Pierre-Andre Amaudruz
00004 
00005   Contents:     VME interface for the VMIC VME board processor
00006                 using the mvmestd vme call convention.
00007                 
00008   $Log: vmicvme.h,v $
00009   Revision 1.2  2005/09/29 03:35:38  amaudruz
00010   VMIC VME driver following the mvmestd
00011 
00012 *********************************************************************/
00013 
00014 #ifndef  __VMICVME_H__
00015 #define  __VMICVME_H__
00016 
00017 #include <stdio.h>
00018 #include <string.h>
00019 #include <vme/universe.h>
00020 #include <vme/vme.h>
00021 #include <vme/vme_api.h>
00022 
00023 #include "mvmestd.h"
00024 
00025 #ifndef MIDAS_TYPE_DEFINED
00026 typedef  unsigned long int   DWORD;
00027 typedef  unsigned short int   WORD;
00028 typedef  unsigned char        BYTE;
00029 #endif
00030 
00031 #ifndef  SUCCESS
00032 #define  SUCCESS             (int) 1
00033 #endif
00034 #define  ERROR               (int) -1000
00035 #define  MVME_ERROR          (int) -1000
00036 
00037 #define  MAX_VME_SLOTS       (int) 32
00038 
00039 #define  DEFAULT_SRC_ADD     0x000000
00040 #define  DEFAULT_NBYTES      0xFFFFFF    /* 16MB */
00041 #define  DEFAULT_DMA_NBYTES  0x100000    /* max DMA size in bytes */
00042 
00043 /* Used for managing the map segments.
00044    DMA_INFO is setup using internal defined memory block for now. 
00045 */
00046 typedef struct {
00047   vme_master_handle_t  wh;
00048   int              am;
00049   mvme_size_t  nbytes;
00050   void           *ptr;
00051   mvme_addr_t     low;
00052   mvme_addr_t    high;
00053   int           valid;
00054 } VME_TABLE;
00055 
00056 typedef struct {
00057   vme_dma_handle_t  dma_handle;
00058   void             *dma_ptr;
00059 } DMA_INFO;
00060 
00061 typedef struct {
00062   vme_interrupt_handle_t  handle;
00063   int               level;
00064   int               vector;
00065   int               flags;
00066 } INT_INFO;
00067 
00068 #endif

Midas DOC Version 3.0.0 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Sergio Ballestrero - Suzannah Daviel - Doxygen - Peter Green - Qing Gu - Greg Hackman - Gertjan Hofman - Paul Knowles - Exaos Lee - Rudi Meier - Glenn Moloney - Dave Morris - John M O'Donnell - Konstantin Olchanski - Renee Poutissou - Tamsen Schurman - Andreas Suter - Jan M.Wouters - Piotr Adam Zolnierczuk