2.92.5 QMSPIx_Write Function
C
// x - Instance of the QMSPI peripheral
bool QMSPIx_Write(QMSPI_XFER_T *qmspiXfer, void* pTransmitData, size_t txSize);
Summary
Writes command/register to the QMSPI slave device.
Description
This function can be used to write a command/register of QMSPI slave device.
Precondition
QMSPIx_Initialize must have been called for the associated QMSPI instance. Write enable command has to be sent before write command/register request.
Parameters
| Param | Description |
|---|---|
| *qmspiXfer | Pointer to QMSPI transfer structure. |
| *pTransmitData | Pointer to transmit buffer holding the command/register to write into QMSPI slave device. |
| txSize | Number of bytes to write. |
Returns
-
True on transfer request success.
-
False on transfer request failure.
Example
QMSPI_XFER_T qmspiXfer;
memset(&qmspiXfer, 0x00, sizeof(QMSPI_XFER_T));
qmspiXfer.command = APP_CMD_ENABLE_WRITE;
QMSPI0_Write(&qmspiXfer, NULL, 0);
