/* Configures the CRC calculation length for the selected SPI.  */
void SPI_CRCLengthConfig(SPI_TypeDef *SPIx, uint16_t SPI_CRCLength)
/* Configures the CRC calculation length for the selected SPI.  */
void SPI_CRCLengthConfig(SPI_TypeDef *SPIx, uint16_t SPI_CRCLength)
{
  assert_param(IS_SPI_ALL_PERIPH(SPIx));
  assert_param(IS_SPI_CRC_LENGTH(SPI_CRCLength));
  SPIx->CR1 &= (uint16_t)~((uint16_t)SPI_CR1_CRCL);
  SPIx->CR1 |= SPI_CRCLength;
}