fixed gpio_portg stuff again, finally back to square 1: a working lab8 without the api
merge/rebase changes with previous mistake