From: Sami T. <fl...@ee...> - 2005-04-25 11:33:58
|
On Mon, Apr 25, 2005 at 04:21:13PM +0800, Wai-Sun Chia wrote: > On 4/24/05, Sami Tapio <fl...@ee...> wrote: > > Hello, > > > > I need a volunteer for small coding project, as it happens that I'm > > totally C illiterate... I think that this might be quite easy > > modification from the LIRC project sources. Brief description: > > > > I need a kernel module that reacts on parallel port IRQ, reads 4 > > You don't need a kernel module to access the parallel port. > A regular userspace program would do. > Please see below for a very good summary: > http://www.faqs.org/docs/Linux-mini/IO-Port-Programming.html From what I've learned from reading various documents, including the one on your link above, I need a kernel module. Because I need a fast reaction on the IRQ... with this slow HW I can't afford the scheduling losses. Or to use polling to find out if the pins have changed states or not. If I have understood this correctly, even to get something happening on parallel port IRQ, I need a kernel module. So kernel module it is. :) > > > input pins state and record those states and the time of the IRQ > > to a file. Time should be atleast 1ms or smaller. And some method > > of getting a output to one pin in parallel port at desired time. > > A daemon would do it. > Actually, the user would start the sequence of things when needed and that would result in a output pulse on one of the parallel port pins, getting the HW running and then there would be nothing to be done before the IRQ gets the states of the input pins read to a file. After couple of IRQs, the user (actually bash script) would remove the kernel module and start to interpret the pin changes from the file. So, I don't know how it could be easily done in the C-code, so that I could make a bash script to get the kernel module to toggle the output pin... Well, this is the headache of the volunteer, if I find one. Flexy |