1.2.9.3 WDRV_WINC_NVMRead Function

C

WDRV_WINC_STATUS WDRV_WINC_NVMRead
(
DRV_HANDLE handle,
WDRV_WINC_NVM_REGION region,
void *pBuffer,
uint32_t offset,
uint32_t size
);

Summary

Reads data from an NVM region.

Description

Reads the number of bytes specified from the NVM region.

Precondition

WDRV_WINC_Initialize should have been called. WDRV_WINC_Open should have been called with the intent DRV_IO_INTENT_EXCLUSIVE to obtain a valid handle.

Parameters

ParamDescription
handleClient handle obtained by a call to WDRV_WINC_Open.
regionRegion of NVM to read.
pBufferPointer to buffer to write the data read into.
offsetOffset within NVM region to read the data from.
sizeNumber of bytes to be read.

Returns

WDRV_WINC_STATUS_OK - The read completed successfully.

WDRV_WINC_STATUS_INVALID_ARG - The parameters were incorrect.

WDRV_WINC_STATUS_REQUEST_ERROR - The request encountered an error.

Remarks

The WINC driver must have been opened for exclusive access to the flash to ensure the WINC firmware is not operating when manipulating the SPI flash.