Build mode string.
Set parity value
Set baudrate value
Set data bits value
Use mode string for setting baudrate, data bits, parity and stop bits.
Set stop bits value
Construct config, parse mode to it and return.
See Implementation