-
Notifications
You must be signed in to change notification settings - Fork 0
/
vmicvme_mdpp.h
68 lines (54 loc) · 1.64 KB
/
vmicvme_mdpp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*********************************************************************
Name: vmicvme.h
Created by: Pierre-Andre Amaudruz
Contents: VME interface for the VMIC VME board processor
using the mvmestd vme call convention.
$Log: vmicvme.h,v $
Revision 1.2 2005/09/29 03:35:38 amaudruz
VMIC VME driver following the mvmestd
*********************************************************************/
#ifndef __VMICVME_H__
#define __VMICVME_H__
#include <stdio.h>
#include <string.h>
#include <vme/universe.h>
#include <vme/vme.h>
#include <vme/vme_api.h>
#include "mvmestd.h"
#ifndef MIDAS_TYPE_DEFINED
typedef unsigned long int DWORD;
typedef unsigned short int WORD;
typedef unsigned char BYTE;
#endif
#ifndef SUCCESS
#define SUCCESS (int) 1
#endif
#define ERROR (int) -1000
#define MVME_ERROR (int) -1000
#define MAX_VME_SLOTS (int) 32
#define DEFAULT_SRC_ADD 0x000000
#define DEFAULT_NBYTES 0x8000000 /* 16MB */
#define DEFAULT_DMA_NBYTES 0x80000 /* max DMA size in bytes (0.5Mbytes)*/
/* Used for managing the map segments.
DMA_INFO is setup using internal defined memory block for now.
*/
typedef struct {
vme_master_handle_t wh;
int am;
mvme_size_t nbytes;
void *ptr;
mvme_addr_t low;
mvme_addr_t high;
int valid;
} VME_TABLE;
typedef struct {
vme_dma_handle_t dma_handle;
void *dma_ptr;
} DMA_INFO;
typedef struct {
vme_interrupt_handle_t handle;
int level;
int vector;
int flags;
} INT_INFO;
#endif