Changing the GPIO mode from input to output has to be done using "USB serial configuration utility". You can refer to the Knowledge Base article available in the link:
Is the API for doing this not released? Using the configuration utility doesn't make sense because switching GPIO modes is necessary for getting reliable values for GPIO inputs. I would rather not capture the data being sent by the "USB serial configuration utility" and reverse engineer it to read from a GPIO.