dcrp_get_serial_settings

Gets the serial port parameters. The user_open_port() routine is passed only baud rate and parity. Use this routine to access data bits, stop bits, and flow control settings.

Syntax

void dcrp_get_serial_settings(char *port_id,
                              COR_I2 data_bits,
                              COR_I2 stop_bits,
                              COR_BOOLEAN *rts_cts_control,
                              COR_BOOLEAN *xon_xoff_control)

Input Parameters


            port_id
         

Is the identifier of the port whose settings you want to get.

Output Parameters


            data_bits
         

Is the number of data bits supported by the protocol. Valid value is 6, 7, or 8.


            stop_bits
         

Is the number of stop bits supported by the protocol value. Valid value is 1 or 2.


            rts_cts_control
         

Indicates whether the RTS (Ready To Send) and CTS (Clear To Send) lines are used for hardware flow control. This field contains one of the following:

TRUE Raise RTS and check CTS before transmitting data. This usually suggests that your serial port Data Control Block (DCB) setup includes the following:
dcb.fOutxCtsFlow = TRUE;
dcb.fRtsControl = RTS_CONTROL_TOGGLE;
FALSE The protocol does not use hardware flow control.

xon_xoff_control

Indicates whether the XON/XOFF software flow control is to be used. This field contains one of the following:

TRUE XON/XOFF flow control is used. This usually suggests that your serial port Data Control Block (DCB) setup includes the following:
dcb.fOutX = TRUE;

dcb.fInX = TRUE;

FALSE The protocol does not use software flow control.