Implementing pull-up/down support in mitpi (almost functional)