psm.c (48557) | psm.c (48773) |
---|---|
1/*- 2 * Copyright (c) 1992, 1993 Erik Forsberg. 3 * Copyright (c) 1996, 1997 Kazutaka YOKOTA. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 6 unchanged lines hidden (view full) --- 15 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 16 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 17 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 18 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 19 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 20 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 21 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * | 1/*- 2 * Copyright (c) 1992, 1993 Erik Forsberg. 3 * Copyright (c) 1996, 1997 Kazutaka YOKOTA. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 6 unchanged lines hidden (view full) --- 15 * NO EVENT SHALL I BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 16 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 17 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 18 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 19 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 20 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 21 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 * |
23 * $Id: psm.c,v 1.11 1999/06/03 12:40:53 yokota Exp $ | 23 * $Id: psm.c,v 1.12 1999/07/04 14:58:34 phk Exp $ |
24 */ 25 26/* 27 * Ported to 386bsd Oct 17, 1992 28 * Sandi Donno, Computer Science, University of Cape Town, South Africa 29 * Please send bug reports to sandi@cs.uct.ac.za 30 * 31 * Thanks are also due to Rick Macklem, rick@snowhite.cis.uoguelph.ca - --- 955 unchanged lines hidden (view full) --- 987 sc->dflt_mode.syncmask[0] = vendortype[i].syncmask; 988 if (sc->config & PSM_CONFIG_FORCETAP) 989 sc->mode.syncmask[0] &= ~MOUSE_PS2_TAP; 990 sc->dflt_mode.syncmask[1] = 0; /* syncbits */ 991 sc->mode = sc->dflt_mode; 992 sc->mode.packetsize = vendortype[i].packetsize; 993 994 /* set mouse parameters */ | 24 */ 25 26/* 27 * Ported to 386bsd Oct 17, 1992 28 * Sandi Donno, Computer Science, University of Cape Town, South Africa 29 * Please send bug reports to sandi@cs.uct.ac.za 30 * 31 * Thanks are also due to Rick Macklem, rick@snowhite.cis.uoguelph.ca - --- 955 unchanged lines hidden (view full) --- 987 sc->dflt_mode.syncmask[0] = vendortype[i].syncmask; 988 if (sc->config & PSM_CONFIG_FORCETAP) 989 sc->mode.syncmask[0] &= ~MOUSE_PS2_TAP; 990 sc->dflt_mode.syncmask[1] = 0; /* syncbits */ 991 sc->mode = sc->dflt_mode; 992 sc->mode.packetsize = vendortype[i].packetsize; 993 994 /* set mouse parameters */ |
995#if 0 996 /* 997 * A version of Logitech FirstMouse+ won't report wheel movement, 998 * if SET_DEFAULTS is sent... Don't use this command. 999 * This fix was found by Takashi Nishida. 1000 */ |
|
995 i = send_aux_command(sc->kbdc, PSMC_SET_DEFAULTS); 996 if (verbose >= 2) 997 printf("psm%d: SET_DEFAULTS return code:%04x\n", unit, i); | 1001 i = send_aux_command(sc->kbdc, PSMC_SET_DEFAULTS); 1002 if (verbose >= 2) 1003 printf("psm%d: SET_DEFAULTS return code:%04x\n", unit, i); |
1004#endif |
|
998 if (sc->config & PSM_CONFIG_RESOLUTION) { 999 sc->mode.resolution 1000 = set_mouse_resolution(sc->kbdc, | 1005 if (sc->config & PSM_CONFIG_RESOLUTION) { 1006 sc->mode.resolution 1007 = set_mouse_resolution(sc->kbdc, |
1001 (sc->config & PSM_CONFIG_RESOLUTION) - 1); | 1008 (sc->config & PSM_CONFIG_RESOLUTION) - 1); 1009 } else if (sc->mode.resolution >= 0) { 1010 sc->mode.resolution 1011 = set_mouse_resolution(sc->kbdc, sc->dflt_mode.resolution); |
1002 } | 1012 } |
1013 if (sc->mode.rate > 0) { 1014 sc->mode.rate = set_mouse_sampling_rate(sc->kbdc, sc->dflt_mode.rate); 1015 } 1016 set_mouse_scaling(sc->kbdc, 1); |
|
1003 1004 /* request a data packet and extract sync. bits */ 1005 if (get_mouse_status(sc->kbdc, stat, 1, 3) < 3) { 1006 printf("psm%d: failed to get data.\n", unit); 1007 sc->mode.syncmask[0] = 0; 1008 } else { 1009 sc->mode.syncmask[1] = stat[0] & sc->mode.syncmask[0]; /* syncbits */ 1010 /* the NetScroll Mouse will send three more bytes... Ignore them */ --- 1287 unchanged lines hidden --- | 1017 1018 /* request a data packet and extract sync. bits */ 1019 if (get_mouse_status(sc->kbdc, stat, 1, 3) < 3) { 1020 printf("psm%d: failed to get data.\n", unit); 1021 sc->mode.syncmask[0] = 0; 1022 } else { 1023 sc->mode.syncmask[1] = stat[0] & sc->mode.syncmask[0]; /* syncbits */ 1024 /* the NetScroll Mouse will send three more bytes... Ignore them */ --- 1287 unchanged lines hidden --- |