AudioScience HPI Version_4.24.1
|
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_t | HPI_NvMemoryOpen (const hpi_hsubsys_t *phSubSys, uint16_t wAdapterIndex, hpi_handle_t *phNvMemory, uint16_t *pwSizeInBytes) |
Opens the non-volatile memory on a particular adapter for reading and writing. | |
hpi_err_t | HPI_NvMemoryReadByte (const hpi_hsubsys_t *phSubSys, hpi_handle_t hNvMemory, uint16_t wIndex, uint16_t *pwData) |
Reads a byte from an adapters non-volatile memory. | |
hpi_err_t | HPI_NvMemoryWriteByte (const hpi_hsubsys_t *phSubSys, hpi_handle_t hNvMemory, uint16_t wIndex, uint16_t wData) |
Writes a byte to an adapters non-volatile 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.
There can be at most one nvmemory object per adapter.
hpi_err_t HPI_NvMemoryOpen | ( | const hpi_hsubsys_t * | phSubSys, |
uint16_t | wAdapterIndex, | ||
hpi_handle_t * | phNvMemory, | ||
uint16_t * | 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.
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
wAdapterIndex | Get nvmemory handle on this adapter |
phNvMemory | Handle to an HPI_NVMEMORY object |
pwSizeInBytes | size of the nv memory in bytes |
References HPI_IndexesToHandle().
hpi_err_t HPI_NvMemoryReadByte | ( | const hpi_hsubsys_t * | phSubSys, |
hpi_handle_t | hNvMemory, | ||
uint16_t | wIndex, | ||
uint16_t * | 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.
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
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_t HPI_NvMemoryWriteByte | ( | const hpi_hsubsys_t * | phSubSys, |
hpi_handle_t | hNvMemory, | ||
uint16_t | wIndex, | ||
uint16_t | 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.
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
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 |