reverse gpio port direction