def get_serial_port():
port = Serial(port='<STR_LIT>', baudrate=<NUM_LIT>, parity=PARITY_NONE,<EOL>stopbits=<NUM_LIT:1>, bytesize=<NUM_LIT:8>, timeout=<NUM_LIT:1>)<EOL>fh = port.fileno()<EOL>serial_rs485 = struct.pack('<STR_LIT>', <NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>)<EOL>fcntl.ioctl(fh, <NUM_LIT>, serial_rs485)<EOL>return port<EOL>
Return serial.Serial instance, ready to use for RS485.