/* Returns the most recent received data by the SPIx peripheral.  */
uint32_t SPI_ReceiveData(SPI_TypeDef *SPIx)
/* Returns the most recent received data by the SPIx peripheral.  */
uint32_t SPI_ReceiveData(SPI_TypeDef *SPIx)
{
	  u32 temp=0;
    assert_param(IS_SPI_ALL_PERIPH(SPIx));
	temp =(u32)SPIx->RXREG;
	if(SPIx->EXTCTL>8||SPIx->EXTCTL==0)    temp |=(u32) (SPIx->RXREG)<<8;
	if(SPIx->EXTCTL>16||SPIx->EXTCTL==0)  	temp |=(u32)( SPIx->RXREG)<<16;
	if(SPIx->EXTCTL>24||SPIx->EXTCTL==0)	temp |=(u32)( SPIx->RXREG)<<24;
	return temp;
}