/* SPI Standard Mode selection. 
Set SPI standard Modes  */
void spi_set_standard_mode(uint32_t spi, uint8_t mode)
/* SPI Standard Mode selection. 
Set SPI standard Modes  */
void spi_set_standard_mode(uint32_t spi, uint8_t mode)
{
	if (mode > 3) {
		return;
	}
	uint32_t reg32 = SPI_CR1(spi) & ~(SPI_CR1_CPOL | SPI_CR1_CPHA);
	SPI_CR1(spi) = reg32 | mode;
}