mxc: first set GPIO level, then switch direction to output