[SQUASH ME] fixed gpio_read function for sam3x

- removed issue with potential sign problem