Re: Example "short" of LDD / Parallel port

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

 



On 6/14/06, Nelson Castillo <nelsoneci@xxxxxxxxx> wrote:
Hi.

I'm trying to run the example "short" of LDD3.
It doesn't work with the parallel port.

The parallel port is ok, and the circuit for testing is ok.

I run a counter in user-space and it works[1].

If I enable the interrupts and I set the line 10 to
1 (using the output of the data7 bit, see [2]) then it
generates the interrupts (I verified using /proc/interrupts).


The problem is that when I try to run the example, I have
to unload the module parport_pc, and then I can hook the interrupt
handler of the example of LDD, but somehow I cannot write to it.
I tried to make the simplest code that would work, but it does not.
Note that when I unload module parport_pc, the kernel logs the
following message:

pnp: Device 00:07 disabled.

So it might be the problem. I have Linux  2.6.16 (Debian).

What should I try?


This is the code I tested:

http://svn.arhuaco.org/svn/src/linux/examples/modules/parallel/par.c

I expect the initialization function to set the output bits to 1
but nothing happens.

(from /proc/interrupts)
  7:         0          0    IO-APIC-edge  par

The lines

     outb(0x10,par_base+2);
     outb(0xFF,par_base);

In the following snippet of code don't work.

What should I do? I need to use an interrupt for a training course. I
could also use User Mode LInux but I don't know how[3]. Not yet. I'd
like to use the real parallel port.


try using outb_p(). i think it can handle slow ports.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux