help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Controlling an external device with elisp


From: Ed L Cashin
Subject: Re: Controlling an external device with elisp
Date: Mon, 05 May 2003 11:57:27 -0400
User-agent: Gnus/5.090014 (Oort Gnus v0.14) Emacs/21.2 (i386-debian-linux-gnu)

upro <address@hidden> writes:

> Ed L Cashin <address@hidden> 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/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]