Fix SPI transmit routine, add General I/O Register handling.