/* Performs a software reset of the specified SPI module */
void SPIReset(unsigned long ulBase)
/* Performs a software reset of the specified SPI module */
void SPIReset(unsigned long ulBase)
{
  HWREG(ulBase + MCSPI_O_SYSCONFIG) |= MCSPI_SYSCONFIG_SOFTRESET;
  while(!(HWREG(ulBase + MCSPI_O_SYSSTATUS)& MCSPI_SYSSTATUS_RESETDONE))
  {
  }
}