Direction not assured in write_compat
Brought to you by:
twaugh
I'm using libieee1284 as packaged in Debian Etch, i.e. 0.2.10.4. But since the Bug-Tracker does not mention this issue it's probably still there.
I perform bi-directional communication in byte mode to an external µC. Writing using write_compat() and reading using byte_read(). Whence the first cycle works fine, subsequent writes after the first read fail, because the PC does not issue any data. A strange side effect are glitches on /STB (yes, the matter made me getting a logic analyzer).
Using data_dir() when switching from read to write fixes the problem as a work-around. This apparently also makes the glitches disappear.
For further information you can contact me at
Lars_dot_Hanke_at_T-Systems_dot_com
Logged In: NO
Hi Lars,
I had similar problems, and I figured out that I needed to issue a ieee1284_negotiate() before reading data, and a ieee1284_terminate() just after reading, so that I could write data again. The API documentation does not say about this where it describes the data transfer functions, but it makes this clear when describing the negotiate/terminate functions.
I hope this helps you.
Regards,
Celso.