Deleted Added
full compact
mse.c (36735) mse.c (40565)
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.37 1998/01/24 02:54:22 eivind Exp $
14 * $Id: mse.c,v 1.38 1998/06/07 17:10:47 dfr 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.

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

82static d_poll_t msepoll;
83
84#define CDEV_MAJOR 27
85static struct cdevsw mse_cdevsw =
86 { mseopen, mseclose, mseread, nowrite, /*27*/
87 mseioctl, nostop, nullreset, nodevtotty,/* mse */
88 msepoll, nommap, NULL, "mse", NULL, -1 };
89
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.

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

82static d_poll_t msepoll;
83
84#define CDEV_MAJOR 27
85static struct cdevsw mse_cdevsw =
86 { mseopen, mseclose, mseread, nowrite, /*27*/
87 mseioctl, nostop, nullreset, nodevtotty,/* mse */
88 msepoll, nommap, NULL, "mse", NULL, -1 };
89
90static ointhand2_t mseintr;
90
91/*
92 * Software control structure for mouse. The sc_enablemouse(),
93 * sc_disablemouse() and sc_getmouse() routines must be called spl'd().
94 */
95static struct mse_softc {
96 int sc_flags;
97 int sc_mousetype;

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

252
253int
254mseattach(idp)
255 struct isa_device *idp;
256{
257 int unit = idp->id_unit;
258 struct mse_softc *sc = &mse_sc[unit];
259
91
92/*
93 * Software control structure for mouse. The sc_enablemouse(),
94 * sc_disablemouse() and sc_getmouse() routines must be called spl'd().
95 */
96static struct mse_softc {
97 int sc_flags;
98 int sc_mousetype;

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

253
254int
255mseattach(idp)
256 struct isa_device *idp;
257{
258 int unit = idp->id_unit;
259 struct mse_softc *sc = &mse_sc[unit];
260
261 idp->id_ointr = mseintr;
260 sc->sc_port = idp->id_iobase;
261 sc->mode.accelfactor = (idp->id_flags & MSE_CONFIG_ACCEL) >> 4;
262#ifdef DEVFS
263 sc->devfs_token =
264 devfs_add_devswf(&mse_cdevsw, unit << 1, DV_CHR, 0, 0,
265 0600, "mse%d", unit);
266 sc->n_devfs_token =
267 devfs_add_devswf(&mse_cdevsw, (unit<<1)+1, DV_CHR,0, 0,

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

541
542 splx(s);
543 return (revents);
544}
545
546/*
547 * mseintr: update mouse status. sc_deltax and sc_deltay are accumulative.
548 */
262 sc->sc_port = idp->id_iobase;
263 sc->mode.accelfactor = (idp->id_flags & MSE_CONFIG_ACCEL) >> 4;
264#ifdef DEVFS
265 sc->devfs_token =
266 devfs_add_devswf(&mse_cdevsw, unit << 1, DV_CHR, 0, 0,
267 0600, "mse%d", unit);
268 sc->n_devfs_token =
269 devfs_add_devswf(&mse_cdevsw, (unit<<1)+1, DV_CHR,0, 0,

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

543
544 splx(s);
545 return (revents);
546}
547
548/*
549 * mseintr: update mouse status. sc_deltax and sc_deltay are accumulative.
550 */
549void
551static void
550mseintr(unit)
551 int unit;
552{
553 /*
554 * the table to turn MouseSystem button bits (MOUSE_MSC_BUTTON?UP)
555 * into `mousestatus' button bits (MOUSE_BUTTON?DOWN).
556 */
557 static int butmap[8] = {

--- 229 unchanged lines hidden ---
552mseintr(unit)
553 int unit;
554{
555 /*
556 * the table to turn MouseSystem button bits (MOUSE_MSC_BUTTON?UP)
557 * into `mousestatus' button bits (MOUSE_BUTTON?DOWN).
558 */
559 static int butmap[8] = {

--- 229 unchanged lines hidden ---