/* Checks if the SPI in master mode has shifted out last data, or if the master has ended the transfer in slave mode. 
This function will check if the SPI master module has shifted out last data, or if the slave select pin has been drawn high by the master for the SPI slave module. */
static bool _spi_is_write_complete(Spi *const spi_module)
/* Checks if the SPI in master mode has shifted out last data, or if the master has ended the transfer in slave mode. 
This function will check if the SPI master module has shifted out last data, or if the slave select pin has been drawn high by the master for the SPI slave module. */
static bool _spi_is_write_complete(Spi *const spi_module)
{
	Assert(spi_module);
	return (spi_module->TRANSMIT_STATUS.bit.TX_FIFO_EMPTY);
}