/* SPI Data Write with Blocking. 
Data is written to the SPI interface after the previous write transfer has finished. */
void spi_send(uint32_t spi, uint16_t data)
/* SPI Data Write with Blocking. 
Data is written to the SPI interface after the previous write transfer has finished. */
void spi_send(uint32_t spi, uint16_t data)
{
	while (!(SPI_SR(spi) & SPI_SR_TXE));
	SPI_DR(spi) = data;
}