Results 1 to 2 of 2
Hi,
I have a Linux RedHat 7.3 (2.4.17 gcc 2.95.3) embedded on a PC board.
On this board, there is a small 10-pin non-standard parallel port (He10) that I would ...
- 02-19-2007 #1Just Joined!
- Join Date
- Feb 2007
- Posts
- 2
Controlling a 10-pin non-standard parallel port
Hi,
I have a Linux RedHat 7.3 (2.4.17 gcc 2.95.3) embedded on a PC board.
On this board, there is a small 10-pin non-standard parallel port (He10) that I would like to control thanks to ioctl() calls (PPCLAIM,...).
This should be possible by installing ppdev module (that does not seem to be here right now).
I did not install Linux myself and I am currently trying to find out which "Parallel Port Support" options shall be set in order to control it.
1. Which are the right options to set in that case (non-standard 10-pin port)?
-PC-style hardware
-Multi-IO cards (parallel and serial)
-Support Foreign Harware
-IEEE 1284 transfer modes
...
Or which modules are required ?
Then, what config files/directories should I check to be sure my 10-pin parallel port is accessible and manageable (in /dev, /proc...) ?
2. I think "ppdev" allows me to manage this non-standard port, am I right ?
Thanks for your help.
- 02-28-2007 #2Just Joined!
- Join Date
- Feb 2007
- Posts
- 2
Hi,
I managed to get through this.
I used "outb" calls to write in 0x378 (LPT DATA register address, I checked this address in BIOS).
Nothing was happening.
Then I set the AUTOFEED (bit 1 of CONTROL register) to 1 (output = '0' because AUTOFEED is inverted) and it released the buffer output.
Then my "outb" calls impacted the pins of my parallel port.
This is the init sequence:
ioctl() calls were useless in my case probably because I am using PC Standard Parallel Port mode.Code:int autofeed = 0x2; // 0000 0010 = autofeed set to 1 // Get permission if (ioperm(BASE, 3, 1) < 0) // BASE=0x378 { perror("ioperm() 3 registers"); status = ERROR_OPEN_PORT; } else { outb (autofeed, BASE+2); // BASE+2=CONTROL register address }
But anyway, once ppdev was installed, I could run some ioctl calls successfully.


Reply With Quote