/* Deselect the given device on the SPI bus. 
Call board chip deselect. */
void spi_deselect_device(Spi *p_spi, struct spi_device *device)
/* Deselect the given device on the SPI bus. 
Call board chip deselect. */
void spi_deselect_device(Spi *p_spi, struct spi_device *device)
{
	UNUSED(device);
	while (!spi_is_tx_empty(p_spi)) {
	}
	spi_set_peripheral_chip_select_value(p_spi, NONE_CHIP_SELECT_ID);
	spi_set_lastxfer(p_spi);
}