2.92.6 QMSPIx_Read Function
C
// x - Instance of the QMSPI peripheral
bool QMSPIx_Read(QMSPI_XFER_T *qmspiXfer, void* pReceiveData, size_t rxSize);
Summary
Reads register from the QMSPI slave device.
Description
This function can be used to read a particular register of QMSPI slave device.
Precondition
QMSPIx_Initialize must have been called for the associated QMSPI instance.
Parameters
| Param | Description |
|---|---|
| *qmspiXfer | Pointer to QMSPI transfer structure. |
| *pReceiveData | Pointer to receive buffer where the register value read from QMSPI slave device will be stored. |
| rxSize | Number of bytes to read. |
Returns
-
True on transfer request success.
-
False on transfer request failure.
Example
uint8_t status;
QMSPI_XFER_T qmspiXfer;
memset(&qmspiXfer, 0x00, sizeof(QMSPI_XFER_T));
qmspiXfer.command = APP_CMD_STATUS_REG_READ;
QMSPI0_Read(&qmspiXfer, &status, 1);
