summaryrefslogtreecommitdiffstats
path: root/private/ntos/miniport/trantor/include/cardtmv1.h
blob: 366ff74dab10a0a9968cf5c500dbb2885ec2f087 (plain) (blame)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#ifndef _CARDTMV1_H
#define _CARDTMV1_H

//-----------------------------------------------------------------------
//
//  CARDTMV1.H 
//
//  TMV1 Adapter Definitions File
//
//  Revision History:
//
//      01-28-92  KJB   First.
//      03-05-93  JAP  Cleaned comments, modified string in CardGetName()
//                          to conform to ASM Driver names.
//                          NOTE: This file was dated 02-26-93, but with no
//                          corresponding Revision History log.
//      03-08-93  JAP   Added CardGetShortName() to conform to c_name
//                          returned in ASM-Drivers.
//      03-09-93  JAP   Added CardGetType() function and included cardtype.h
//      05-14-93  KJB   CardCheckAdapter now does not take a PBASE_REGISTER
//                      parameter, this parameter is now in the PINIT 
//                      structure.
//
//-----------------------------------------------------------------------

// include general os definitions

#include "osdefs.h"


//
//  Global per Adapter Information
//  
typedef struct tagAdapterInfo {
    PBASE_REGISTER BaseIoAddress; // address of this card
    UCHAR InterruptLevel; // interrupt level this card is using
    UCHAR DRQMask; // mask for DRQ, varies with MV card type
}   ADAPTER_INFO, FARP PADAPTER_INFO;

// they have an n5380

#include "n5380.h"


// all 5380 type cards use the scsifnc module

#include "scsifnc.h"


// all cards have a MV101 chip

#include "mv101.h"


// all port access routines

#include "portio.h"


// CARDTYPE definitions file

#include "cardtype.h"


// include exported function definitions

#include "card.h"

//-----------------------------------------------------------------------
//
// Definitions
//
//-----------------------------------------------------------------------

//-----------------------------------------------------------------------
// Routines used by MV101.c
//-----------------------------------------------------------------------

#define MV101PortTest(g, reg, mask) \
            PortIOTest(&((PUCHAR)g->BaseIoAddress)[reg],mask)

#define MV101PortSet(g, reg, mask) \
            PortIOSet(&((PUCHAR)g->BaseIoAddress)[reg],mask);

#define MV101PortClear(g, reg, mask) \
            PortIOClear(&((PUCHAR)g->BaseIoAddress)[reg],mask);

#define MV101PortPut(g,reg,byte) \
            PortIOPut(&((PUCHAR)g->BaseIoAddress)[reg],byte);

#define MV101PortGet(g,reg,byte) \
            PortIOGet(&((PUCHAR)g->BaseIoAddress)[reg],byte);


//-----------------------------------------------------------------------
//
// Redefined routines
//
//-----------------------------------------------------------------------

#define CardReadBytesFast MV101ReadBytesFast
#define CardWriteBytesFast MV101WriteBytesFast
#define CardWriteBytesCommand ScsiWriteBytesSlow

//
//  Local routines (to the whole lower level driver)
//
VOID CardEnableInterrupt (PADAPTER_INFO g);
VOID CardDisableInterrupt (PADAPTER_INFO g);

#endif // _CARDTMV1_H