/* MSS_SPI_set_slave_select() See "mss_spi.h" for details of how to use this function.  */
void MSS_SPI_set_slave_select(mss_spi_instance_t *this_spi, mss_spi_slave_t slave)
/* MSS_SPI_set_slave_select() See "mss_spi.h" for details of how to use this function.  */
void MSS_SPI_set_slave_select(mss_spi_instance_t *this_spi, mss_spi_slave_t slave)
{
    ASSERT( (this_spi == &g_mss_spi0) || (this_spi == &g_mss_spi1) );
    ASSERT( this_spi->hw_reg_bit->CTRL_MASTER == MSS_SPI_MODE_MASTER );
    ASSERT( this_spi->slaves_cfg[slave].ctrl_reg != NOT_CONFIGURED );
    this_spi->hw_reg_bit->CTRL_ENABLE = 0U;
    this_spi->hw_reg->CONTROL = this_spi->slaves_cfg[slave].ctrl_reg;
    this_spi->hw_reg->CLK_GEN = this_spi->slaves_cfg[slave].clk_gen;
    this_spi->hw_reg->TXRXDF_SIZE = this_spi->slaves_cfg[slave].txrxdf_size_reg;
    this_spi->hw_reg_bit->CTRL_ENABLE = 1U;
    this_spi->hw_reg->SLAVE_SELECT |= ((uint32_t)1 << (uint32_t)slave);
}