{
spiA->SPI_TDR =data; // Send data - Starts as soon as this completes
while ((spiA->SPI_SR & TRANSFER_DONE) == 0); // Wait for transfer done
}
{
spiA->SPI_TDR =0xFF; //Send data - Starts as soon as this completes
while ((spiA->SPI_SR & TRANSFER_DONE) == 0); // Wait for transfer done
*data = (spiA->SPI_RDR & 0x000000FF);
}