Minor changes

1) Fixed GPIO initialization bug (Release build)
2) Added static keyword for non gloabal variables