beaglebone: fixed small bugs in gpio func