Commit | Line | Data |
---|---|---|
60f56dfc KM |
1 | /* |
2 | * Copyright (c) 1982, 1990 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * %sccs.include.redist.c% | |
6 | * | |
7 | * @(#)hpibvar.h 7.1 (Berkeley) %G% | |
8 | */ | |
9 | ||
10 | #define HPIB_IPL(x) ((((x) >> 4) & 0x3) + 3) | |
11 | ||
12 | #define HPIBA 32 | |
13 | #define HPIBB 1 | |
14 | #define HPIBC 8 | |
15 | #define HPIBA_BA 21 | |
16 | #define HPIBC_BA 30 | |
17 | #define HPIBA_IPL 3 | |
18 | ||
19 | #define CSA_BA 0x1F | |
20 | ||
21 | #define IDS_WDMA 0x04 | |
22 | #define IDS_WRITE 0x08 | |
23 | #define IDS_IR 0x40 | |
24 | #define IDS_IE 0x80 | |
25 | #define IDS_DMA(x) (1 << (x)) | |
26 | ||
27 | #define C_DCL 0x14 | |
28 | #define C_LAG 0x20 | |
29 | #define C_UNL 0x3f | |
30 | #define C_TAG 0x40 | |
31 | #define C_UNA 0x5e | |
32 | #define C_UNT 0x5f | |
33 | #define C_SCG 0x60 | |
34 | ||
35 | struct hpib_softc { | |
36 | struct hp_ctlr *sc_hc; | |
37 | int sc_flags; | |
38 | struct devqueue sc_dq; | |
39 | struct devqueue sc_sq; | |
40 | int sc_ba; | |
41 | int sc_type; | |
42 | char *sc_addr; | |
43 | int sc_count; | |
44 | int sc_curcnt; | |
45 | }; | |
46 | ||
47 | /* sc_flags */ | |
48 | #define HPIBF_IO 0x1 | |
49 | #define HPIBF_DONE 0x2 | |
50 | #define HPIBF_PPOLL 0x4 | |
51 | #define HPIBF_READ 0x8 | |
52 | #define HPIBF_DMA16 0x8000 | |
53 | ||
54 | #ifdef KERNEL | |
55 | extern struct hpib_softc hpib_softc[]; | |
56 | extern int internalhpib; | |
57 | #endif |