You can set an I/O domain to either 3.3V or 5V or whatever externally.
1) You could use external MOSFETs to switch the I/O domain levels under program
2) You could use a 3'rd output, open drain, and a zener to clamp a 5V pin to 3.3V at the
pin. You would have to evaluate current draw but should be OK. Also noise margin for
logic 1 level when clamp in effect, eg. zener tolerance.....
3) You could use an open drain and a V divider scheme, switch the leg to ground to effect the
3.3. Evaluate speed, rise time issues would be prudent.
4) If speed not an issue use a PGA and change its gain level
with appropriate API.
Some ways of doing it.