Nonvolatile memory

Some adapters contain non-volatile memory containing a number of bytes The number of data words is adapter dependant and can be obtained from the *pwSizeInBytes parameter returned from the Open function. More...

Functions

HPI_ERR HPI_NvMemoryOpen (HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HPI_HNVMEMORY *phNvMemory, HW16 *pwSizeInBytes)
 Opens the non-volatile memory on a particular adapter for reading and writing.
HPI_ERR HPI_NvMemoryReadByte (HPI_HSUBSYS *phSubSys, HPI_HNVMEMORY hNvMemory, HW16 wIndex, HW16 *pwData)
 Reads a byte from an adapters non-volatile memory.
HPI_ERR HPI_NvMemoryWriteByte (HPI_HSUBSYS *phSubSys, HPI_HNVMEMORY hNvMemory, HW16 wIndex, HW16 wData)
 Writes a byte to an adapters non-volatile memory.

Detailed Description

Some adapters contain non-volatile memory containing a number of bytes The number of data words is adapter dependant and can be obtained from the *pwSizeInBytes parameter returned from the Open function.

There can be at most one nvmemory object per adapter.


Function Documentation

HPI_ERR HPI_NvMemoryOpen HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HPI_HNVMEMORY *  phNvMemory,
HW16 *  pwSizeInBytes
 

Opens the non-volatile memory on a particular adapter for reading and writing.

It takes as input the handle to the subsytem (phSubSys) and the adapter index (wAdapterIndex) and returns a handle to the non-volatile memory (hNvMemory) and the size of the memory in bytes (wSizeInBytes). If the adapter does not have any non-volatile memory, the function will return an error.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  Subsystem handle
wAdapterIndex  Get nvmemory handle on this adapter
phNvMemory  Handle to an HPI_NVMEMORY object
pwSizeInBytes  size of the nv memory in bytes

HPI_ERR HPI_NvMemoryReadByte HPI_HSUBSYS *  phSubSys,
HPI_HNVMEMORY  hNvMemory,
HW16  wIndex,
HW16 *  pwData
 

Reads a byte from an adapters non-volatile memory.

The input is a handle to the non-volatile memory (hNvMemory - returned from HPI_NvMemoryOpen() ) and an index which addresses one of the bytes in the memory (wIndex). The index may range from 0 to SizeInBytes-1 (returned by HPI_NvMemoryOpen() ). The byte is returned in *pwData. ). An error return of HPI_ERROR_NVMEM_BUSY indicates that an attempt to access the NvMem was made before the previous operation has completed. The call should be re-tried.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  Subsystem handle
hNvMemory  Handle to an HPI_NVMEMORY object
wIndex  An Index that may range from 0 to SizeInBytes-1 (returned by HPI_NvMemoryOpen() )
pwData  Returned data byte

HPI_ERR HPI_NvMemoryWriteByte HPI_HSUBSYS *  phSubSys,
HPI_HNVMEMORY  hNvMemory,
HW16  wIndex,
HW16  wData
 

Writes a byte to an adapters non-volatile memory.

The input is a handle to the non-volatile memory ( hNvMemory - returned from HPI_NvMemoryOpen() ), an index which addresses one of the bytes in the memory (wIndex) and the data to write (wData). The index may range from 0 to SizeInBytes-1 (returned by HPI_NvMemoryOpen() ). An error return of HPI_ERROR_NVMEM_BUSY indicates that an attempt to access the NvMem was made before the previous operation has completed. The call should be re-tried.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  Subsystem handle
hNvMemory  Handle to an HPI_NVMEMORY object
wIndex  An Index that may range from 0 to SizeInBytes-1 (returned by HPI_NvMemoryOpen() )
wData  > Byte of data to write


Generated on Tue Nov 18 12:59:31 2008 for AudioScience HPI by  doxygen 1.4.6-NO