/* Enables or disables the CRC value calculation of the transferred bytes.  */
void SPI_CalculateCRC(SPI_TypeDef *SPIx, FunctionalState NewState)
/* Enables or disables the CRC value calculation of the transferred bytes.  */
void SPI_CalculateCRC(SPI_TypeDef *SPIx, FunctionalState NewState)
{
  assert_param(IS_SPI_ALL_PERIPH(SPIx));
  assert_param(IS_FUNCTIONAL_STATE(NewState));
  if (NewState != DISABLE)
  {
    SPIx->CR1 |= CR1_CRCEN_Set;
  }
  else
  {
    SPIx->CR1 &= CR1_CRCEN_Reset;
  }
}