Of course you can use sysOutByte to control the device.
I think it is the best way to check whether the device works properly.
This is a discussion on set/reset lpt port pins - VxWorks ; Hi all, I'm using VxWorks 6.2 - Workbench 2.5 to develop a realtime automatic test equipment for a x86 board controller. I would like to profile my application using an oscilloscope, so I need to set/reset a parallel port pin ...
Hi all,
I'm using VxWorks 6.2 - Workbench 2.5 to develop a realtime automatic test
equipment for a x86 board controller.
I would like to profile my application using an oscilloscope, so I need to
set/reset a parallel port pin in some points of my code (of course I'm
thinking to connect this pin to the oscilloscope channel).
I included the lpt support in the kernel and I called function
lptDevCreate("/lpt/0",0) to create a device. The function correctly returned
OK.
Then I called function open("/lpt/0", O_RDWR, 0) and it returned a valid
file descriptor (6).
The problem is that function write(6, &cByte, 1) returns ERROR with errno =
5 = "I/O error" (note: cByte is a char variable initialized to 1).
So does function read( ).
Where is the mistake? Note that the bios settings - address and irq - for
parallel port match with the vxWorks kernel settings.
Perhaps, function write( ) returns error due to the absence of some
handshake on the parallel port control pins?
Instead of function write( ), can I use function sysOutByte (0x378, 0x01)
to set the pot pins?
Thanks in advance for your help,
Pablo
Of course you can use sysOutByte to control the device.
I think it is the best way to check whether the device works properly.