1.1.9.3 WDRV_WINC_NVMRead Function

WDRV_WINC_STATUS WDRV_WINC_NVMRead (

DRV_HANDLE handle, WDRV_WINC_NVM_REGION region, void *pBuffer,

uint32_t offset, uint32_t size

);

C

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

Param

Description

handle

Client handle obtained by a call to WDRV_WINC_Open.

region

Region of NVM to read.

pBuffer

Pointer to buffer to write the data read into.

offset

Offset within NVM region to read the data from.

size

Number 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.