I'm building a board where I want to support multiple types of interfaces like RS422/RS485, CAN Bus, RS232 and connect these to my MCU using UART. If I only have one free UART on the MCU, what is the best way I can switch between those different options?
For example I might have a MAX3488AE IC to connect UART for Rs422/RS485 and also maybe an ST202CDR for RS232 communication and also a CAN Transceiver (MAX 14878 maybe). Is there a good/standard way to wire all of these to a single UART RX/TX pair? Then either via firmware using GPIOs to activate some switch IC to switch between those or even a physical switch to let the user do it manually (since likely they won't need all of those). Would it be acceptable for example to just control which of those interface ICs gets VCC and is therefore on, or do I need to switch all the Rx/Tx lines?
The goal is not to use any of these simultaneously but just to allow choice (preferably via firmware by setting GPIO to some switcher) as to which is active.