Deleted Added
full compact
ppbconf.h (38061) ppbconf.h (39134)
1/*-
2 * Copyright (c) 1997, 1998 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1997, 1998 Nicolas Souchu
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $Id: ppbconf.h,v 1.6 1998/06/07 19:44:21 phk Exp $
26 * $Id: ppbconf.h,v 1.7 1998/08/03 19:14:31 msmith Exp $
27 *
28 */
29#ifndef __PPBCONF_H
30#define __PPBCONF_H
31
32#include <sys/queue.h>
33
34/*

--- 11 unchanged lines hidden (view full) ---

46#define PPB_PS2 0x2 /* PS/2 byte mode */
47#define PPB_EPP 0x4 /* EPP mode, 32 bit */
48#define PPB_ECP 0x8 /* ECP mode */
49
50#define PPB_SPP PPB_NIBBLE|PPB_PS2
51
52#define PPB_IS_EPP(mode) (mode & PPB_EPP)
53#define PPB_IN_EPP_MODE(dev) (PPB_IS_EPP (ppb_get_mode (dev)))
27 *
28 */
29#ifndef __PPBCONF_H
30#define __PPBCONF_H
31
32#include <sys/queue.h>
33
34/*

--- 11 unchanged lines hidden (view full) ---

46#define PPB_PS2 0x2 /* PS/2 byte mode */
47#define PPB_EPP 0x4 /* EPP mode, 32 bit */
48#define PPB_ECP 0x8 /* ECP mode */
49
50#define PPB_SPP PPB_NIBBLE|PPB_PS2
51
52#define PPB_IS_EPP(mode) (mode & PPB_EPP)
53#define PPB_IN_EPP_MODE(dev) (PPB_IS_EPP (ppb_get_mode (dev)))
54#define PPB_IN_NIBBLE_MODE(dev) (ppb_get_mode (dev) & PPB_NIBBLE)
55#define PPB_IN_PS2_MODE(dev) (ppb_get_mode (dev) & PPB_PS2)
54
55#define n(flags) (~(flags) & (flags))
56
57/*
58 * Parallel Port Chipset control bits.
59 */
60#define STROBE 0x01
61#define AUTOFEED 0x02

--- 9 unchanged lines hidden (view full) ---

71#define nPCD n(PCD)
72
73/*
74 * Parallel Port Chipset status bits.
75 */
76#define TIMEOUT 0x01
77#define nFAULT 0x08
78#define SELECT 0x10
56
57#define n(flags) (~(flags) & (flags))
58
59/*
60 * Parallel Port Chipset control bits.
61 */
62#define STROBE 0x01
63#define AUTOFEED 0x02

--- 9 unchanged lines hidden (view full) ---

73#define nPCD n(PCD)
74
75/*
76 * Parallel Port Chipset status bits.
77 */
78#define TIMEOUT 0x01
79#define nFAULT 0x08
80#define SELECT 0x10
79#define ERROR 0x20
81#define PERROR 0x20
80#define nACK 0x40
81#define nBUSY 0x80
82
83/*
84 * Structure to store status information.
85 */
86struct ppb_status {
87 unsigned char status;

--- 22 unchanged lines hidden (view full) ---

110
111/* maximum number of mode dependent
112 * submicrosequences for in/out operations
113 */
114#define PPB_MAX_XFER 6
115
116union ppb_insarg {
117 int i;
82#define nACK 0x40
83#define nBUSY 0x80
84
85/*
86 * Structure to store status information.
87 */
88struct ppb_status {
89 unsigned char status;

--- 22 unchanged lines hidden (view full) ---

112
113/* maximum number of mode dependent
114 * submicrosequences for in/out operations
115 */
116#define PPB_MAX_XFER 6
117
118union ppb_insarg {
119 int i;
118 char c;
119 void *p;
120 int (* f)(void *, char *);
121};
122
123struct ppb_microseq {
124 int opcode; /* microins. opcode */
125 union ppb_insarg arg[PPB_MS_MAXARGS]; /* arguments */
126};

--- 82 unchanged lines hidden (view full) ---

209/*
210 * ppb_link structure.
211 */
212struct ppb_link {
213
214 int adapter_unit; /* unit of the adapter */
215 int base; /* base address of the port */
216 int id_irq; /* != 0 if irq enabled */
120 void *p;
121 int (* f)(void *, char *);
122};
123
124struct ppb_microseq {
125 int opcode; /* microins. opcode */
126 union ppb_insarg arg[PPB_MS_MAXARGS]; /* arguments */
127};

--- 82 unchanged lines hidden (view full) ---

210/*
211 * ppb_link structure.
212 */
213struct ppb_link {
214
215 int adapter_unit; /* unit of the adapter */
216 int base; /* base address of the port */
217 int id_irq; /* != 0 if irq enabled */
218 int accum; /* microseq accum */
219 char *ptr; /* current buffer pointer */
217
218#define EPP_1_9 0x0 /* default */
219#define EPP_1_7 0x1
220
221 int epp_protocol; /* EPP protocol: 0=1.9, 1=1.7 */
222
223 struct ppb_adapter *adapter; /* link to the ppc adapter */
224 struct ppb_data *ppbus; /* link to the ppbus */

--- 125 unchanged lines hidden ---
220
221#define EPP_1_9 0x0 /* default */
222#define EPP_1_7 0x1
223
224 int epp_protocol; /* EPP protocol: 0=1.9, 1=1.7 */
225
226 struct ppb_adapter *adapter; /* link to the ppc adapter */
227 struct ppb_data *ppbus; /* link to the ppbus */

--- 125 unchanged lines hidden ---