Add a callback function for gpio state changed
To version 0.0.4