/* Waits for the word to be received on the specified port. */
void SPIDataGet(unsigned long ulBase, unsigned long *pulData)
/* Waits for the word to be received on the specified port. */
void SPIDataGet(unsigned long ulBase, unsigned long *pulData)
{
  while(!(HWREG(ulBase + MCSPI_O_CH0STAT) & MCSPI_CH0STAT_RXS))
  {
  }
  *pulData = HWREG(ulBase + MCSPI_O_RX0);
}