/* Ends ongoing transfer by releasing CS of QSPI peripheral.  */
static void qspi_end_transfer(Qspi *qspi)
/* Ends ongoing transfer by releasing CS of QSPI peripheral.  */
static void qspi_end_transfer(Qspi *qspi)
{
	assert(qspi);
	while(!(qspi->QSPI_SR & QSPI_SR_TXEMPTY));
	qspi->QSPI_CR = QSPI_CR_LASTXFER;
}