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
113
114
115
116
117
118
119
120
121
122
|
/* $NetBSD: ppbus_io.h,v 1.6 2005/12/11 12:23:28 christos Exp $ */
/*-
* Copyright (c) 1999 Nicolas Souchu
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* FreeBSD: src/sys/dev/ppbus/ppbio.h,v 1.1 2000/01/14 00:17:57 nsouch Exp
*
*/
#ifndef __PPBUS_IO_H
#define __PPBUS_IO_H
/* Parallel port bus I/O opcodes */
#define PPBUS_OUTSB_EPP 1
#define PPBUS_OUTSW_EPP 2
#define PPBUS_OUTSL_EPP 3
#define PPBUS_INSB_EPP 4
#define PPBUS_INSW_EPP 5
#define PPBUS_INSL_EPP 6
#define PPBUS_RDTR 7
#define PPBUS_RSTR 8
#define PPBUS_RCTR 9
#define PPBUS_REPP_A 10
#define PPBUS_REPP_D 11
#define PPBUS_RECR 12
#define PPBUS_RFIFO 13
#define PPBUS_WDTR 14
#define PPBUS_WSTR 15
#define PPBUS_WCTR 16
#define PPBUS_WEPP_A 17
#define PPBUS_WEPP_D 18
#define PPBUS_WECR 19
#define PPBUS_WFIFO 20
/*
* Set of ppbus i/o routines callable from ppbus device drivers
*/
#define ppbus_outsb_epp(dev,buf,cnt) \
ppbus_io((dev), PPBUS_OUTSB_EPP, (buf), (cnt), 0)
#define ppbus_outsw_epp(dev,buf,cnt) \
ppbus_io((dev), PPBUS_OUTSW_EPP, (buf), (cnt), 0)
#define ppbus_outsl_epp(dev,buf,cnt) \
ppbus_io((dev), PPBUS_OUTSL_EPP, (buf), (cnt), 0)
#define ppbus_insb_epp(dev,buf,cnt) \
ppbus_io((dev), PPBUS_INSB_EPP, (buf), (cnt), 0)
#define ppbus_insw_epp(dev,buf,cnt) \
ppbus_io(( dev), PPBUS_INSW_EPP, (buf), (cnt), 0)
#define ppbus_insl_epp(dev,buf,cnt) \
ppbus_io((dev), PPBUS_INSL_EPP, (buf), (cnt), 0))
#define ppbus_repp_A(dev) \
ppbus_io((dev), PPBUS_REPP_A, NULL, 0, 0)
#define ppbus_repp_D(dev) \
ppbus_io((dev), PPBUS_REPP_D, NULL, 0, 0)
#define ppbus_recr(dev) \
ppbus_io((dev), PPBUS_RECR, NULL, 0, 0)
#define ppbus_rfifo(dev) \
ppbus_io((dev), PPBUS_RFIFO, NULL, 0, 0)
#define ppbus_wepp_A(dev,byte) \
ppbus_io((dev), PPBUS_WEPP_A, NULL, 0, (byte))
#define ppbus_wepp_D(dev,byte) \
ppbus_io((dev), PPBUS_WEPP_D, NULL, 0, (byte))
#define ppbus_wecr(dev,byte) \
ppbus_io((dev), PPBUS_WECR, NULL, 0, (byte))
#define ppbus_wfifo(dev,byte) \
ppbus_io((dev), PPBUS_WFIFO, NULL, 0, (byte))
#define ppbus_rdtr(dev) \
ppbus_io((dev), PPBUS_RDTR, NULL, 0, 0)
#define ppbus_rstr(dev) \
ppbus_io((dev), PPBUS_RSTR, NULL, 0, 0)
#define ppbus_rctr(dev) \
ppbus_io((dev), PPBUS_RCTR, NULL, 0, 0)
#define ppbus_wdtr(dev,byte) \
ppbus_io((dev), PPBUS_WDTR, NULL, 0, (byte))
#define ppbus_wstr(dev,byte) \
ppbus_io((dev), PPBUS_WSTR, NULL, 0, (byte))
#define ppbus_wctr(dev,byte) \
ppbus_io((dev), PPBUS_WCTR, NULL, 0, (byte))
#endif /* __PPBUS_IO_H */
|