Add pin mode change