Deleted Added
full compact
mse.c (3745) mse.c (3816)
1/*
2 * Copyright 1992 by the University of Guelph
3 *
4 * Permission to use, copy and modify this
5 * software and its documentation for any purpose and without
6 * fee is hereby granted, provided that the above copyright
7 * notice appear in all copies and that both that copyright
8 * notice and this permission notice appear in supporting
9 * documentation.
10 * University of Guelph makes no representations about the suitability of
11 * this software for any purpose. It is provided "as is"
12 * without express or implied warranty.
13 *
1/*
2 * Copyright 1992 by the University of Guelph
3 *
4 * Permission to use, copy and modify this
5 * software and its documentation for any purpose and without
6 * fee is hereby granted, provided that the above copyright
7 * notice appear in all copies and that both that copyright
8 * notice and this permission notice appear in supporting
9 * documentation.
10 * University of Guelph makes no representations about the suitability of
11 * this software for any purpose. It is provided "as is"
12 * without express or implied warranty.
13 *
14 * $Id: mse.c,v 1.6 1994/08/13 03:50:10 wollman Exp $
14 * $Id: mse.c,v 1.7 1994/10/21 01:19:07 wollman Exp $
15 */
16/*
17 * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
18 * the X386 port, courtesy of
19 * Rick Macklem, rick@snowhite.cis.uoguelph.ca
20 * Caveats: The driver currently uses spltty(), but doesn't use any
21 * generic tty code. It could use splmse() (that only masks off the
22 * bus mouse interrupt, but that would require hacking in i386/isa/icu.s.

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

48#include <sys/systm.h>
49#include <sys/proc.h>
50#include <sys/user.h>
51#include <sys/buf.h>
52#include <sys/kernel.h>
53#include <sys/ioctl.h>
54#include <sys/tty.h>
55#include <sys/uio.h>
15 */
16/*
17 * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
18 * the X386 port, courtesy of
19 * Rick Macklem, rick@snowhite.cis.uoguelph.ca
20 * Caveats: The driver currently uses spltty(), but doesn't use any
21 * generic tty code. It could use splmse() (that only masks off the
22 * bus mouse interrupt, but that would require hacking in i386/isa/icu.s.

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

48#include <sys/systm.h>
49#include <sys/proc.h>
50#include <sys/user.h>
51#include <sys/buf.h>
52#include <sys/kernel.h>
53#include <sys/ioctl.h>
54#include <sys/tty.h>
55#include <sys/uio.h>
56#include <sys/devconf.h>
56
57#include <i386/isa/isa_device.h>
58#include <i386/isa/icu.h>
59
60static int mseprobe(struct isa_device *);
61static int mseattach(struct isa_device *);
62void mseintr(int);
63

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

169 sc->sc_getmouse = mse_types[i].m_get;
170 return (1);
171 }
172 i++;
173 }
174 return (0);
175}
176
57
58#include <i386/isa/isa_device.h>
59#include <i386/isa/icu.h>
60
61static int mseprobe(struct isa_device *);
62static int mseattach(struct isa_device *);
63void mseintr(int);
64

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

170 sc->sc_getmouse = mse_types[i].m_get;
171 return (1);
172 }
173 i++;
174 }
175 return (0);
176}
177
178static struct kern_devconf kdc_mse[NMSE] = { {
179 0, 0, 0, /* filled in by dev_attach */
180 "mse", 0, { MDDT_ISA, 0, "tty" },
181 isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
182 &kdc_isa0, /* parent */
183 0, /* parentdata */
184 DC_UNKNOWN, /* not supported */
185 "ATI or Logitech bus mouse adapter"
186} };
187
188static inline void
189mse_registerdev(struct isa_device *id)
190{
191 if(id->id_unit)
192 kdc_mse[id->id_unit] = kdc_mse[0];
193 kdc_mse[id->id_unit].kdc_unit = id->id_unit;
194 kdc_mse[id->id_unit].kdc_isa = id;
195 dev_attach(&kdc_mse[id->id_unit]);
196}
197
177int
178mseattach(idp)
179 struct isa_device *idp;
180{
181 struct mse_softc *sc = &mse_sc[idp->id_unit];
182
183 sc->sc_port = idp->id_iobase;
198int
199mseattach(idp)
200 struct isa_device *idp;
201{
202 struct mse_softc *sc = &mse_sc[idp->id_unit];
203
204 sc->sc_port = idp->id_iobase;
205 mse_registerdev(idp);
184 return (1);
185}
186
187/*
188 * Exclusive open the mouse, initialize it and enable interrupts.
189 */
190int
191mseopen(dev, flag)

--- 310 unchanged lines hidden ---
206 return (1);
207}
208
209/*
210 * Exclusive open the mouse, initialize it and enable interrupts.
211 */
212int
213mseopen(dev, flag)

--- 310 unchanged lines hidden ---