From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ed L Cashin Newsgroups: gmane.emacs.help Subject: Re: Controlling an external device with elisp Date: Mon, 05 May 2003 11:57:27 -0400 Organization: negia.net Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87y91lpes8.fsf@cs.uga.edu> References: <87u1cazl6v.fsf@gmx.net> <87r87epk39.fsf@gmx.net> <87d6iyru0q.fsf@cs.uga.edu> <873cjtzu8b.fsf@gmx.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1052151006 26850 80.91.224.249 (5 May 2003 16:10:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 5 May 2003 16:10:06 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Mon May 05 18:10:00 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19CiUz-0006n9-00 for ; Mon, 05 May 2003 18:07:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19CiPs-0004Wa-00 for gnu-help-gnu-emacs@m.gmane.org; Mon, 05 May 2003 12:02:12 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386-debian-linux-gnu) Cancel-Lock: sha1:m9PkCyg20c5/GGw4XO278r3FQTw= Cache-Post-Path: alpha.negia.net!unknown@ppp63-172-85-115.silverstreakdsl.com X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) Original-X-Complaints-To: abuse@supernews.com Original-Lines: 41 Original-Xref: shelby.stanford.edu gnu.emacs.help:112791 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:9286 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9286 upro writes: > Ed L Cashin writes: ... >> No, it's perfectly possible. The thing is that you can *use* the >> device from emacs but ultimately talking to hardware is a kernel >> thing. Assuming Linux, as your reference to the Coffee mini-HOWTO >> would suggest, your choices are to ... >> >> * build the circuit to recognize codes you can send using an >> existing driver >> >> e.g., you could put the device on your first serial port and >> control it from emacs by writing strings like "please turn on the >> light" or numbers like 101 to /dev/ttyS0. >> >> or >> >> * use IO primitives or write your own driver as suggested in the >> Coffee mini-HOWTO > > Are these IO primitives in C? I don't really understand this. Yes, in fact, this is where our thread becomes off-topic in gnu.emacs.help. It's linux-specific. Remember section 3 in the Coffee mini-HOWTO how they mention ioperm and outb? It's that kind of thing. > I prefer the second suggestion, since I have very few knowledge of how > to build circtios (not to speak of how to recognize signals...) In that case, your work is mostly in creating a simple driver. Using it from emacs will be easy once it's in place. Some leads: I hear the O'Reilley book, _Linux Device Drivers_, is good for learning how to write drivers. You can also search the kernel sources for examples of simple device drivers and think about joining the kernelnewbies mailing list. -- --Ed L Cashin PGP public key: http://noserose.net/e/pgp/