/* Selects the data transfer direction in bi-directional mode for the specified SPI.  */
void SPI_BiDirectionalLineConfig(SPI_TypeDef *SPIx, uint16_t SPI_Direction)
/* Selects the data transfer direction in bi-directional mode for the specified SPI.  */
void SPI_BiDirectionalLineConfig(SPI_TypeDef *SPIx, uint16_t SPI_Direction)
{
    assert_param(IS_SPI_ALL_PERIPH(SPIx));
    assert_param(IS_SPI_DIRECTION(SPI_Direction));
    if(SPI_Direction==SPI_Direction_Tx)
    {
        SPIx->GCTL |= SPI_Direction_Tx;
    }
    if(SPI_Direction==SPI_Direction_Rx)
    {
        SPIx->GCTL |= SPI_Direction_Rx;
    }
    if(SPI_Direction==SPI_Disable_Tx)
    {
        SPIx->GCTL &= SPI_Disable_Tx;
    }
    if(SPI_Direction==SPI_Disable_Rx)
    {
        SPIx->GCTL &= SPI_Disable_Rx;
    }
}