Update Gpio.cpp

Added comments, unified error handling.