fix gpio.c bug and checkout gpio.c code style