/* MSS_SPI_clear_slave_select() See "mss_spi.h" for details of how to use this function.  */
void MSS_SPI_clear_slave_select(mss_spi_instance_t *this_spi, mss_spi_slave_t slave)
/* MSS_SPI_clear_slave_select() See "mss_spi.h" for details of how to use this function.  */
void MSS_SPI_clear_slave_select(mss_spi_instance_t *this_spi, mss_spi_slave_t slave)
{
    uint32_t rx_overflow;
    ASSERT((this_spi == &g_mss_spi0) || (this_spi == &g_mss_spi1));
    ASSERT((this_spi->hw_reg->CONTROL & CTRL_MASTER_MASK) == CTRL_MASTER_MASK);
    rx_overflow = this_spi->hw_reg->STATUS & RX_OVERFLOW_MASK;
    if(rx_overflow)
    {
         recover_from_rx_overflow(this_spi);
    }
    this_spi->hw_reg->SLAVE_SELECT &= ~((uint32_t)1 << (uint32_t)slave);
}