/* SPI flash write disable. 
Disable SPI flash write  */
static void spi_flash_write_disable(void)
/* SPI flash write disable. 
Disable SPI flash write  */
static void spi_flash_write_disable(void)
{
	SPI_FLASH0->READ_CTRL.reg = SPI_FLASH_READ_CTRL_RDATA_COUNT(0);
	SPI_FLASH0->CMD_BUFFER0.reg = SPI_FLASH_CMD_WRITE_DISABLE;
	SPI_FLASH0->DIRECTION.reg = SPI_FLASH_DIRECTION_CMD;
	SPI_FLASH0->DMA_START_ADDRESS.reg = SPI_FLASH_DMA_START_ADDRESS_MASK;
	SPI_FLASH0->TRANSACTION_CTRL.reg = \
			SPI_FLASH_TRANSACTION_CTRL_FLASH_TRANS_START | \
			SPI_FLASH_TRANSACTION_CTRL_CMD_COUNT(0x01);
	while (SPI_FLASH0->IRQ_STATUS.bit.FLASH_TRANS_DONE != \
			SPI_FLASH_IRQ_STATUS_FLASH_TRANS_DONE) {
	}
}