Deleted Added
full compact
mse.c (46153) mse.c (46568)
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.39 1998/10/22 05:58:39 bde Exp $
14 * $Id: mse.c,v 1.40 1999/04/28 10:52:43 dt 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.

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

523 int events;
524 struct proc *p;
525{
526 register struct mse_softc *sc = &mse_sc[MSE_UNIT(dev)];
527 int s;
528 int revents = 0;
529
530 s = spltty();
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.

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

523 int events;
524 struct proc *p;
525{
526 register struct mse_softc *sc = &mse_sc[MSE_UNIT(dev)];
527 int s;
528 int revents = 0;
529
530 s = spltty();
531 if (events & (POLLIN | POLLRDNORM))
531 if (events & (POLLIN | POLLRDNORM)) {
532 if (sc->sc_bytesread != sc->mode.packetsize ||
533 sc->sc_deltax != 0 || sc->sc_deltay != 0 ||
534 (sc->sc_obuttons ^ sc->sc_buttons) != 0)
535 revents |= events & (POLLIN | POLLRDNORM);
536 else {
537 /*
538 * Since this is an exclusive open device, any previous
539 * proc pointer is trash now, so we can just assign it.
540 */
541 selrecord(p, &sc->sc_selp);
542 }
532 if (sc->sc_bytesread != sc->mode.packetsize ||
533 sc->sc_deltax != 0 || sc->sc_deltay != 0 ||
534 (sc->sc_obuttons ^ sc->sc_buttons) != 0)
535 revents |= events & (POLLIN | POLLRDNORM);
536 else {
537 /*
538 * Since this is an exclusive open device, any previous
539 * proc pointer is trash now, so we can just assign it.
540 */
541 selrecord(p, &sc->sc_selp);
542 }
543
543 }
544 splx(s);
545 return (revents);
546}
547
548/*
549 * mseintr: update mouse status. sc_deltax and sc_deltay are accumulative.
550 */
551static void

--- 237 unchanged lines hidden ---
544 splx(s);
545 return (revents);
546}
547
548/*
549 * mseintr: update mouse status. sc_deltax and sc_deltay are accumulative.
550 */
551static void

--- 237 unchanged lines hidden ---