1.1.20.12 WDRV_WINC_NVMRead

C

WDRV_WINC_STATUS WDRV_WINC_NVMRead
(
    DRV_HANDLE handle,
    void *pBuffer,
    uint32_t offset,
    uint32_t length,
    WDRV_WINC_NVM_STATUS_CALLBACK pfUpdateStatusCB
)

Description

Reads a number of bytes from the NVM.

Precondition

WDRV_WINC_Initialize must have been called.

WDRV_WINC_Open must have been called to obtain a valid handle.

Parameters

ParametersDescription
handleClient handle obtained by a call to WDRV_WINC_Open.
pBufferPointer to buffer to write the data read into.
offsetOffset within the NVM to read the data from.
lengthNumber of bytes to be read.
pfUpdateStatusCBCallback to indicate update status.

Returns

  • WDRV_WINC_STATUS_OK - The request has been accepted.

  • WDRV_WINC_STATUS_NOT_OPEN - The driver instance is not open.

  • WDRV_WINC_STATUS_INVALID_ARG - The parameters were incorrect.

  • WDRV_WINC_STATUS_REQUEST_ERROR - The request to the WINC was rejected.

Remarks

When a read operation completes the callback is called with opStatusInfo being the structure WDRV_WINC_READ_STATUS_INFO.

If pBuffer is NULL the callback will be called for each data block read from the NVM, this may be smaller than the requested length, but the callback will be called multiple times with the offset and length reflecting each block as it is received.

If pBuffer is a user supplied buffer the NVM read will accumulate blocks into the buffer and call the callback once it is complete.