Hi everybody ,
a) To communicate with the parallel port using open/read/write.
//I coded the following
ByteRead=read(fd, buffer, BytesToRead)
However, when i printf the content of the buffer, i do not get what i expect (eg there are nothing inside the buffer).
I check the fd and it is returning a positive value.
Having been trying hard to debug but failed.
I tried to check the linux website for examples, but it did not work in QNX
Need advice and help in this.
Not to use interrupt.
multi-threaded environment, therefore approach should not consume too much CPU resource, in the event when the port is empty.
Hence, this implies that the command should have BLOCKING feature.
[What i have done]
1)Successfully tried using in32 & out32.
However, these approach consume CPU resources and i have to keep
polling to check if there are any incomming data.