This is retired content. This content is outdated and is no
longer being maintained. It is provided as a courtesy for
individuals who are still using these technologies. This content
may contain URLs that were valid when originally published, but now
link to sites or pages that no longer exist.
This structure stores function pointers to the functions that
serial port drivers must implement.
A function which performs the required initialization for the
serial port driver's PDD layer.
A function which performs any required work, such as freeing
allocated data structures, when the driver is deinitialized.
A function that is called when an application opens a serial
port. Typically this function is responsible for powering the
serial port hardware and initializing its state, if it is not
A function that is called when an application closes a serial
port. Typically this function is responsible for freeing any data
HWOpenand removing power from serial port hardware.
A function that is called by the MDD layer to retrieve received
characters from the UART when RX_INTR is returned from the
HWGetIntrTypefunction. The return value indicates number of
received bytes, if any, that were dropped by the UART or the PDD.
A function that returns the address of the start of the
hardware receive buffer. This is subsequently passed to the
This function is called by the MDD layer when an interrupt
event is signaled. This function determines the cause of the
interrupt and returns an interrupt mask composed of the possible
types INTR_RX, INTR_TX, INTR_MODEM, INTR_LINE, or INTR_NONE.
This function is called by the MDD layer to handle an
This function is called by the MDD layer to handle an INTR_LINE
This function returns the number of bytes which can be held in
the receive buffer or FIFO.
This function is called by the MDD layer to handle an INTR_TX
This function is called by the MDD layer's
COM_Writefunction to transmit data. It loads the data in
first-in, first-out (FIFO) order and returns to the MDD. A non-zero
return code indicates that the MDD must perform polling to detect
changes in the flow control state. Hardware which supports
interrupt generation when the line state changes should return 0.
The return value indicates number of milliseconds to wait before
This function is called as part of the system's power-down
sequence. This function may make no system calls, and should
perform the minimum work required to save the serial port
This function is called as part of the system's power-on
sequence. It should use data saved in
HWPowerOffto restore the state of the serial port hardware.
This function may not make system calls.
This function clears the Data Terminal Ready (DTR) signal.
This function sets the DTR signal.
This function clears the Request to Send (RTS) line
This function sets the RTS line.
This function enables the infrared (IR) interface for ports
which support IR mode. Typically, this involves switching the UART
outputs from a standard line driver to an IR LED interface.
This function disables IR mode on ports which support it.
This function clears the break condition on the TX line.
This function sets the break condition on the TX line. It is
not supported by all UART chips.
This function transmits the specified character ahead of any
other data which may already have been queued by the
HWPutBytesroutine. Not supported by all hardware.
This function is called in response to the
IOCTL_SERIAL_GET_COMMSTATUS I/O control code. It returns the serial
port's current status. This function must also clear the
This function resets the ComStatus structure used by
This function is called in response to the
IOCTL_SERIAL_GET_MODEMSTATUS I/O control code. See the Win32
documentation for a description of the
This function fills in the
CommPropertiesstructure with information about the serial
port's device capabilities.
This function clears the UART data as indicated by the
TX_CLEAR, RX_CLEAR, TX_ABORT, and RX_ABORT flags.
This function sets the port characteristics as indicated by the
DCBstructure passed as input to the function.
This function sets communications time-out values as indicated.
One of the primary tasks of the MDD layer is to handle
communications time-outs. The PDD layer typically does not have to
do anything in its implementation of this function.
This function handles any I/O control codes. In addition to the
standard Win32 codes, any PDD layer may choose to implement
additional codes specific to the underlying hardware capabilities.
Windows CE OS
1.0 and later
Note This API is part of the
complete Windows CE OS package as provided by Microsoft. The
functionality of a particular platform is determined by the
original equipment manufacturer (OEM) and some devices may not
support this API.