/* Returns the transmit or the receive CRC register value.  */
uint8_t SPI_GetCRC(SPI_TypeDef *SPIx, SPI_CRC_TypeDef SPI_CRC)
/* Returns the transmit or the receive CRC register value.  */
uint8_t SPI_GetCRC(SPI_TypeDef *SPIx, SPI_CRC_TypeDef SPI_CRC)
{
  uint8_t crcreg = 0;
  assert_param(IS_SPI_CRC(SPI_CRC));
  if (SPI_CRC != SPI_CRC_RX)
  {
    crcreg = SPIx->TXCRCR;
  }
  else
  {
    crcreg = SPIx->RXCRCR;
  }
  return crcreg;
}