Added routine to test gpio functionality
Fixed gpio sync method