Refactor gpio.s