unsigned short SPI_Read(AT91S_SPI *spi) { while ((spi->SPI_SR & AT91C_SPI_RDRF) == 0); return spi->SPI_RDR & 0xFFFF; }