/* Send command to set or reset WEL bit. 
The WREN instruction is for setting Write Enable Latch (WEL) bit. The WRDI instruction is to reset Write Enable Latch (WEL) bit. */
static enum status_code _mx25l_send_cmd_write_latch(uint8_t cmd)
/* Send command to set or reset WEL bit. 
The WREN instruction is for setting Write Enable Latch (WEL) bit. The WRDI instruction is to reset Write Enable Latch (WEL) bit. */
static enum status_code _mx25l_send_cmd_write_latch(uint8_t cmd)
{
	enum status_code status;
	uint8_t tx_buf[1] = {cmd};
	_mx25l_chip_select();
	status = spi_write_buffer_wait(&_mx25l_spi, tx_buf, 1);
	if (status != STATUS_OK) {
		return STATUS_ERR_IO;
	}
	_mx25l_chip_deselect();
	return STATUS_OK;
}