From: tph@rmi.net (Tom Harrington)
To: linuxppc-dev@lists.linuxppc.org
Subject: mousemode.c ADB Reset patch
Date: Mon, 21 Dec 1998 21:25:35 -0700 (MST) [thread overview]
Message-ID: <m0zsJO4-001C3VC@shell.rmi.net> (raw)
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 ]]
reply other threads:[~1998-12-22 4:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m0zsJO4-001C3VC@shell.rmi.net \
--to=tph@rmi.net \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).