ARMio improved GPIO Mode setting
All tweaked so they compile. May not work properly.
Copyright notices.