Date: Wed, 6 Feb 2002 15:28:45 +0300 From: Juriy Goloveshkin <j@gu.ru> To: Will Andrews <will@csociety.org> Cc: Jerry A! <jerry@thehutt.org>, Akira Funahashi <funa@funa.org>, freebsd-mobile@freebsd.org Subject: Re: vaio's jogdial & moused Message-ID: <20020206122845.GA57922@aviaport.ru> In-Reply-To: <20020205190419.GM82640@squall.waterspout.com> References: <20020114223408.GA4272@aviaport.ru> <20020205.202905.71116296.funa@funa.org> <20020205175018.GA327@nomad.thehutt.org> <20020205190419.GM82640@squall.waterspout.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Feb 05, 2002 at 02:04:19PM -0500, Will Andrews wrote:
> > Anyway, thanks for getting this working. I hope this information is
> > useful to other -stable users with VAIOs.
> I've agreed to work with nsayer to get these updates added to
> -CURRENT and later MFC'd. Watch this space for updates...
> I have a Sony Vaio Superslim R505JL.
Are you planning to commit moused patch too? Or I have to do send-pr?
Actualy, it has a bad c-style ;)
1)I rewrote one 'if' to 'switch'
2)You may ask about string with <<"foo", // hmmm... >>
may be "foo" needs to replase with "versapad"...
anyway the final moused-patch for CURRECT is:
diff -ruN /usr/src/sys/sys/mouse.h.orig /usr/src/sys/sys/mouse.h
--- /usr/src/sys/sys/mouse.h.orig Thu Jul 5 19:38:36 2001
+++ /usr/src/sys/sys/mouse.h Tue Jan 15 01:18:39 2002
@@ -158,6 +158,7 @@
#define MOUSE_PROTO_X10MOUSEREM 13 /* X10 MouseRemote, 3 bytes */
#define MOUSE_PROTO_KIDSPAD 14 /* Genius Kidspad */
#define MOUSE_PROTO_VERSAPAD 15 /* Interlink VersaPad, 6 bytes */
+#define MOUSE_PROTO_JOGDIAL 16 /* Vaio's JogDial */
#define MOUSE_RES_UNKNOWN (-1)
#define MOUSE_RES_DEFAULT 0
diff -ruN /usr/src/usr.sbin/moused.orig/moused.c /usr/src/usr.sbin/moused/moused.c
--- /usr/src/usr.sbin/moused.orig/moused.c Wed Aug 29 00:22:14 2001
+++ /usr/src/usr.sbin/moused/moused.c Tue Jan 15 01:13:50 2002
@@ -200,6 +200,8 @@
"sysmouse",
"x10mouseremote",
"kidspad",
+ "foo", // hmmm...
+ "jogdial",
#if notyet
"mariqua",
#endif
@@ -362,6 +364,7 @@
(CS7 | CREAD | CLOCAL | HUPCL ), /* X10 MouseRemote */
(CS8 | PARENB | PARODD | CREAD | CLOCAL | HUPCL ), /* kidspad etc. */
(CS8 | CREAD | CLOCAL | HUPCL ), /* VersaPad */
+ 0, /* JogDial */
#if notyet
(CS8 | CSTOPB | CREAD | CLOCAL | HUPCL ), /* Mariqua */
#endif
@@ -1082,6 +1085,7 @@
{ 0x40, 0x40, 0x40, 0x00, 3, ~0x23, 0x00 }, /* X10 MouseRem */
{ 0x80, 0x80, 0x00, 0x00, 5, 0x00, 0xff }, /* KIDSPAD */
{ 0xc3, 0xc0, 0x00, 0x00, 6, 0x00, 0xff }, /* VersaPad */
+ { 0x00, 0x00, 0x00, 0x00, 1, 0x00, 0xff }, /* JogDial */
#if notyet
{ 0xf8, 0x80, 0x00, 0x00, 5, ~0x2f, 0x10 }, /* Mariqua */
#endif
@@ -1361,6 +1365,8 @@
}
break;
+ case MOUSE_PROTO_JOGDIAL:
+ break;
case MOUSE_PROTO_MSC:
setmousespeed(1200, rodent.baudrate, rodentcflags[rodent.rtype]);
if (rodent.flags & ClearDTR) {
@@ -1618,6 +1624,8 @@
*/
break;
#endif /* notyet */
+ case MOUSE_PROTO_JOGDIAL:
+ break;
/*
* IntelliMouse, NetMouse (including NetMouse Pro) and Mie Mouse
@@ -1716,7 +1724,25 @@
act->dx = (char)(pBuf[1]) + (char)(pBuf[3]);
act->dy = - ((char)(pBuf[2]) + (char)(pBuf[4]));
break;
-
+
+ case MOUSE_PROTO_JOGDIAL: /* JogDial */
+ switch (rBuf)
+ {
+ case 0x6c:
+ act->dz=-1;
+ break;
+ case 0x72:
+ act->dz=1;
+ break;
+ case 0x64:
+ act->button = MOUSE_BUTTON1DOWN;
+ break;
+ case 0x75:
+ act->button = 0;
+ break;
+ }
+ break;
+
case MOUSE_PROTO_HITTAB: /* MM HitTablet */
act->button = butmaphit[pBuf[0] & 0x07];
act->dx = (pBuf[0] & MOUSE_MM_XPOSITIVE) ? pBuf[1] : - pBuf[1];
--
bye
Juriy Goloveshkin
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020206122845.GA57922>
