/* Configures the NSS pin control mode for the selected SPI.  */
void SPI_NSSInternalSoftwareConfig(SPI_TypeDef *spi, SPI_NSS_TypeDef nss)
/* Configures the NSS pin control mode for the selected SPI.  */
void SPI_NSSInternalSoftwareConfig(SPI_TypeDef *spi, SPI_NSS_TypeDef nss)
{
    (nss != SPI_NSS_Soft) ? SET_BIT(spi->GCR, SPI_NSS_Hard) : CLEAR_BIT(spi->GCR, SPI_NSS_Hard);
}