Compartilhar via


Setting and Clearing a Communication Mode for a Parallel Device

A client can set the communication mode of a parallel device using the following device control requests:

  • IOCTL_IEEE1284_GET_MODE returns the current communication protocols set on the device. The port does not have to be locked to use this request.

  • IOCTL_IEEE1284_NEGOTIATE negotiates a new communication mode. The parallel port must be allocated and the IEEE 1284.3 device selected.

  • IOCTL_INTERNAL_DISCONNECT_IDLE sets the communication mode to IEEE_COMPATIBLE. The parallel port must be allocated and the IEEE 1284.3 device selected.

A kernel-mode driver can also use the system-supplied parallel device callback routines. An IOCTL_INTERNAL_PARCLASS_CONNECT request returns a PARCLASS_INFORMATION structure that includes the following pointers to system-supplied callback routines:

  • The DetermineIeeeMode member is a pointer to the PDETERMINE_IEEE_MODES callback, which determines the IEEE communication modes that the parallel port supports.

  • The NegotiateIeeeMode member is a pointer to the PNEGOTIATE_IEEE_MODE callback, which sets the fastest IEEE communication mode that the parallel port bus driver supports from among the modes specified by the caller.

  • The TerminateIeeeMode member is a pointer to the PTERMINATE_IEEE_MODE callback, which sets the communication mode to IEEE 1284-compatibility mode.

  • The IeeeFwdToRev member is a pointer to the PPARALLEL_IEEE_FWD_TO_REV callback, which changes the data transfer direction from forward to reverse (from write to read).

  • The IeeeRevToFwd member is a pointer to the PPARALLEL_IEEE_REV_TO_FWD callback, changes the transfer direction from reverse to forward (from read to write).

For more information about the communication modes that the parallel port bus driver supports, see the modes NONE through ECP_ANY that are defined in the header file ntddpar.h in the Windows Driver Kit (WDK).

 

 

Send comments about this topic to Microsoft