编写函数如下:
/**
* @brief W25QXX写使能,将S1寄存器的WEL置位
* @param none
* @retval
*/
void W25QXX_Write_Enable(void)
{
QSPI_Send_Command(WRITE_ENABLE_CMD, 0, 0, QSPI_INSTRUCTION_1_LINE, QSPI_ADDRESS_NONE, QSPI_ADDRESS_8_BITS, QSPI_DATA_NONE);
W25QXX_Wait_Busy();
}
/**
* @brief W25QXX写禁止,将WEL清零
* @param none
* @retval none
*/
void W25QXX_Write_Disable(void)
{
QSPI_Send_Command(WRITE_DISABLE_CMD, 0, 0, QSPI_INSTRUCTION_1_LINE, QSPI_ADDRESS_NONE, QSPI_ADDRESS_8_BITS, QSPI_DATA_NONE);
W25QXX_Wait_Busy();
}
|