Re: parallel port problem

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

 



On 3/15/06, taha siddiqi <tawushafeez@xxxxxxxxx> wrote:
> Hi....
> I am trying to read data from my laptop's (thinkpad R51) parallel port
> (similar to the example in Linux Device Drivers 3rd Edition).
> But, everytime i am reading the data it always comes to be 0xFF(255) ....
> I even tried the following loop in my write function (struct file_operations)
> while(count--){
>    printk("writing %x\n", *ptr);
>    out(*(ptr++), port);
>    wmb();
>    printk("reading data : %x\n", inb(port));
> }
> but the debug message in log shows something like
> writing 116
> reading 255
> writing 78
> reading 255
> ...
> ...

There are different modes for Parallel Port (AFAIR like
bi-directional, EPP or so, just google for it) which you have to
configure to bi-directional in your board bios setup (its by-default
not configured as bi-directional). So you are only able to read the
data not able to write and all your write operations does nothing.
CMIIW

I hope this helps.

--
Fawad Lateef

--
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