But there are code like these:
/* Event 38: Set nAutoFd low */
parport_frob_control (port,
PARPORT_CONTROL_AUTOFD,
PARPORT_CONTROL_AUTOFD);
that set the slected control to low. There are other codes: like
In ieee1284.c:180
/* Event 68: Set nInit low */
parport_frob_control (port, PARPORT_CONTROL_INIT, 0);
udelay (50);
/* Event 69: Set nInit high, nSelectIn low */
parport_frob_control (port,
PARPORT_CONTROL_SELECT
| PARPORT_CONTROL_INIT,
PARPORT_CONTROL_SELECT
| PARPORT_CONTROL_INIT);
I am totally confused by the usage.
For the low level frob_control function, the control bits are governed by
(old_control & ~mask) ^ value,
That should be what you say about the how frob_control() works.
Tim Waugh wrote:
>
> So, bits not specified in the mask are unchanged, whereas bits
> specified in the mask take on the corresponding bits in 'value'.
>
> frob_control (port, INIT, 0) means set INIT to 0
> frob_control (port, INIT, INIT) means set INIT to 1
> frob_control (port, A | B, A) means set A to 1 and B to 0.
>
> Yes, please review it.
>
> Tim.
> */
>
-- (~._.~) Öì Ⱥ Ó¢ (Qun Ying) (65) 874-6743 ( O ) Kent Ridge Digital Labs (KRDL) ()~*~() 21 Heng Mui Keng Terrace, Singapore 119613 (_)-(_) qyzhu@krdl.org.sg * zhuqy@hotmail.com-- To unsubscribe, send mail to: linux-parport-request@torque.net -- -- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2b29 : Wed Apr 26 2000 - 07:16:52 EDT