Thank you so much, Matt and Tim.
If someone reads this in the future, as Tim said, you need to set the GPIO port as a bidirectional port.
e.g. "reg_mprj_io_18 = GPIO_MODE_MGMT_STD_BIDIRECTIONAL;"
Linen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.