Date: Thu, 2 Sep 2010 03:44:56 +0000 (UTC) From: Andrew Thompson <thompsa@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r212129 - head/sys/dev/usb/input Message-ID: <201009020344.o823iuhk090657@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: thompsa Date: Thu Sep 2 03:44:56 2010 New Revision: 212129 URL: http://svn.freebsd.org/changeset/base/212129 Log: Add support for extra buttons on the Kensington Slimblade Trackball. Submitted by: Lee, Chung-Yeol Modified: head/sys/dev/usb/input/ums.c Modified: head/sys/dev/usb/input/ums.c ============================================================================== --- head/sys/dev/usb/input/ums.c Thu Sep 2 03:42:26 2010 (r212128) +++ head/sys/dev/usb/input/ums.c Thu Sep 2 03:44:56 2010 (r212129) @@ -399,6 +399,7 @@ ums_hid_parse(struct ums_softc *sc, devi struct ums_info *info = &sc->sc_info[index]; uint32_t flags; uint8_t i; + uint8_t j; if (hid_locate(buf, len, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), hid_input, index, &info->sc_loc_x, &flags, &info->sc_iid_x)) { @@ -476,6 +477,17 @@ ums_hid_parse(struct ums_softc *sc, devi break; } } + + /* detect other buttons */ + + for (j = 0; (i < UMS_BUTTONS_MAX) && (j < 2); i++, j++) { + if (!hid_locate(buf, len, HID_USAGE2(HUP_MICROSOFT, (j + 1)), + hid_input, index, &info->sc_loc_btn[i], NULL, + &info->sc_iid_btn[i])) { + break; + } + } + info->sc_buttons = i; if (i > sc->sc_buttons)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009020344.o823iuhk090657>