Serial Port Line Configuration

On platforms with unidirectional general-purpose I/O (GPIO) lines, serial port lines (or GPIO lines to which serial port lines are mapped) require proper configuration whenever the serial port is in use. The amount of "work you need to do manually" depends on the mode of the serial port (see ser.mode).

ser.mode

TX/W1out/dout output

RX/W1in/din input

RTS/W0out/cout output

CTS/W0&1in/cin input

0 — PL_SER_MODE_UART

Will auto-configure as an output(1)

Will auto-configure as an input(1)

Requires configuration as an output(2)

Requires configuration as an input(2)

1 — PL_SER_MODE_WIEGAND

Requires configuration as an output

Requires configuration as an input

2 — PL_SER_MODE_CLOCKDATA


  1. This line does not require configuration, it will be configured automatically as input or output when the port is opened. When the port is closed the line will return to the input/output and high/low state it had before the port was opened.
  2. If RTS/CTS remapping is supported, you need to configure the I/O pin to which this line of the serial port is currently mapped.