Fixes for GPIO interrupts in BOARD mode

Also fixed incorrect GPIO to pin mapping for GPIO 27.