Added generic GPIO functions that generate reasonable inline code.