как использовать BB-UART4-RS485?

I need to use modbus RTU Protocol using RS485. To use the modbus library libmodbus. For RS485 decided to use UART 4 and Gpio7 as it is possible to make so that ping switched after data left. What you need to connect to the code and what you need to use.