SERIAL_LINE_CONTROL structure

The SERIAL_LINE_CONTROL structure describes the control settings for the serial line.

Syntax


typedef struct _SERIAL_LINE_CONTROL {
  UCHAR StopBits;
  UCHAR Parity;
  UCHAR WordLength;
} SERIAL_LINE_CONTROL, *PSERIAL_LINE_CONTROL;

Members

StopBits

The number of stop bits used at the end of each character that is transmitted or received. This member is set to one of the following values.

ValueDescription
STOP_BIT_1One stop bit.
STOP_BITS_1_5One and a half stop bits.
STOP_BITS_2Two stop bits. Not valid if WordLength = 5.

 

Parity

The type of parity checking used for each character that is transmitted or received. This member is set to one of the following values.

ValueDescription
NO_PARITYNo parity bit is used.
ODD_PARITYOdd parity is used. The parity bit is 0 if the number of 1s in the character value is odd. Otherwise, the parity bit is 1.
EVEN_PARITYEven parity is used. The parity bit is 0 if the number of 1s in the character value is even. Otherwise, the parity bit is 1.
MARK_PARITYThe parity bit is always set to 1.
SPACE_PARITYThe parity bit is always set to 0.

 

WordLength

Data bits per character. This member indicates the number of data bits in each character value that is transmitted or received, and does not include parity bits or stop bits. WordLength values in the range 5 to 8 are typically supported.

Remarks

This structure is used by the IOCTL_SERIAL_GET_LINE_CONTROL and IOCTL_SERIAL_SET_LINE_CONTROL requests.

Requirements

Header

Ntddser.h

See also

IOCTL_SERIAL_GET_LINE_CONTROL
IOCTL_SERIAL_SET_LINE_CONTROL

 

 

Send comments about this topic to Microsoft

Show: