Fix: incorrect base adr for gpio portD
Removed unused code

(unused var warning)