/* Configures the FIFO reception threshold for the selected SPI.  */
void SPI_RxFIFOThresholdConfig(SPI_TypeDef *SPIx, uint16_t SPI_RxFIFOThreshold)
/* Configures the FIFO reception threshold for the selected SPI.  */
void SPI_RxFIFOThresholdConfig(SPI_TypeDef *SPIx, uint16_t SPI_RxFIFOThreshold)
{
    assert_param(IS_SPI_ALL_PERIPH(SPIx));
    assert_param(IS_SPI_RX_FIFO_THRESHOLD(SPI_RxFIFOThreshold));
    SPIx->CR2 &= (uint16_t)~((uint16_t)SPI_CR2_FRXTH);
    SPIx->CR2 |= SPI_RxFIFOThreshold;
}