* mousemode.c ADB Reset patch
@ 1998-12-22 4:25 Tom Harrington
0 siblings, 0 replies; only message in thread
From: Tom Harrington @ 1998-12-22 4:25 UTC (permalink / raw)
To: linuxppc-dev
Below is a patch for mousemode.c that I hacked up. It adds an "ADB
reset" option to the code. I don't know if it's useful to anyone
not hacking ADB code (and occasionally causing devices to stop responding),
but feel free to use it if you like it.
What happens is, if you do "mousemode -1", the address is caught. Rather
than try to use the address, the new reset_adb() function is called.
Tom Harrington
--- Cut here ---
5a6,9
> * ADB Reset option added by Tom Harrington (tph@rmi.net). Also changed
> * "asm/adb.h" to "asm/adb_mouse.h", which seems to be necessary with
> * LinuxPPC R4.
> *
18c22,23
< #include <asm/adb.h>
---
> /*#include <asm/adb.h>*/
> #include <asm/adb_mouse.h>
109a115,131
> void
> reset_adb(void)
> {
> /* I don't know if this'll be useful to anyone not hacking ADB code, but you never know. */
> unsigned char y[15];
> y[0] = ADB_PACKET;
> y[1] = ADB_BUSRESET;
> send(y,2);
> listen(y);
>
> /* My Apple Extended Keyboard II needs flushing after a reset or it'll start sending repeated CRs.
> * Don't know if this is universal, or even common, but it shouldn't hurt. (tph@rmi.net) */
> y[1] = ADB_FLUSH(2);
> send(y,2);
> listen(y);
> }
>
120a143
> printf(" With addr=-1 and no handler, reset the ADB chain.\n");
136a160,163
> } else if(addr == -1) {
> /* Send a reset */
> printf("Resetting ADB chain\n");
> reset_adb();
--- Cut here ---
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. To unsubscribe from linuxppc-dev, send ]]
[[ the message 'unsubscribe' to linuxppc-dev-request@lists.linuxppc.org ]]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-12-22 4:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-12-22 4:25 mousemode.c ADB Reset patch Tom Harrington
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).