l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2004 Mar 16 11:35

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Receiving an interrupt from a parallel port using xlib
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Receiving an interrupt from a parallel port using xlib

On Tue, Mar 16, 2004 at 02:58:29PM +1100, Julie Russell wrote:
> Hi everyone,
> I have written an application in xlib that currently takes an xevent and
> processes it from the keyboard. Due to changes in hardware constraints I now
> have to take that event from a parallel port by receiving an interrupt. Does
> anyone know how if you can receive this signal using x libraries, or the
> best way to talk to the port via x?

This is beyond the scope of Xlib itself.  X doesn't go much further than
your mouse/keyboard/videocard.  :^)

Of course, that's not stopping you from using some /other/ libraries to
talk to the parallel port within the same (Xlib-based) application. :^)

Unfortunately, I've never done parallel port code, so I wouldn't know where
to begin, except I guess you want to talk to "/dev/lp0" or "/dev/lp1".

> I would like to implement this without
> making too many changes to the event handler and the architecture of the
> application.

Been a while since I did straight Xlib, but I suppose it could be possible
to have your own 'user-specified' events come in (and get handled by your
main event loop, just like the keyboard events that X gives you directly),
and have some code that 'pushes' events into the queue when parallel port
action happens.

I'm sure someone else here can explain all this better than I. ;^)

Good luck!

bill@newbreedsoftware.com          Check out the new, improved Tux Paint site!
http://newbreedsoftware.com/bill/        http://newbreedsoftware.com/tuxpaint/
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.