UART to RS485 converter

I want to use a UART to RS485 Converter, to control devices via modbus Protocol. Home Assistant is installed on raspberry pi. The MAX3485 chip is used as a RS485 driver. This driver requires switching the receive and transmit modes. Can I configure the Home Assistant to control the driver using one of the GPIO outputs?