9#ifndef __ADAPTER_BACKENDFUNCTIONS_H__
10#define __ADAPTER_BACKENDFUNCTIONS_H__
15#ifdef ADAPTERBACKEND_EXPORTS
16#define DllExport __declspec(dllexport)
18#define DllExport __declspec(dllimport)
DllExport DDR_ErrorCode DDR_GetDataChunk(int dataHandle, int chunkOffset, uint32_t *value)
Read a single 32-bit value at the given offset in the memory block indicated by the specified handle.
DllExport DDR_ErrorCode DDR_GetMemorySize(int dataHandle, int *memorySizeInChunks)
Retrieve the number of chunks in the memory block indicated by the handle to the successfully opened ...
DDR_ErrorCode
Represents the possible errors that can be returned from the memory block access functions.
@ DDR_ErrorCode_Block_Not_Opened
Memory block is closed and cannot be accessed.
@ DDR_ErrorCode_Block_Already_Opened
Memory block is already open and cannot be opened again.
@ DDR_ErrorCode_Null_Argument
The block name pointer or return handle pointer argument is NULL.
@ DDR_ErrorCode_Invalid_Block_Name
The given name is not a recognized memory block name.
@ DDR_ErrorCode_Invalid_Handle
The handle argument does not correspond to a valid open memory block.
@ DDR_ErrorCode_Success
Operation succeeded.
@ DDR_ErrorCode_Invalid_Offset
The given offset is out of bounds.
DllExport DDR_ErrorCode DDR_CloseMemoryBlock(int dataHandle)
Close access to a previously opened memory block, thus releasing it for others to open.
DllExport DDR_ErrorCode DDR_OpenMemoryBlock(const char *blockName, int *dataHandle)
Open access to a memory block for exclusive use, given the name of the memory block.
DllExport const char * BLOCK_NAME_2
Name of the third block.
DllExport const char * BLOCK_NAME_1
Name of the second block.
DllExport const char * BLOCK_NAME_0
Name of the first block.
@ DDR_MAX_OFFSET
All offsets must from 0 to 1 less than this value.
@ DDR_INVALID_HANDLE
Value indicating the handle is invalid.
DllExport DDR_ErrorCode DDR_SetDataChunk(int dataHandle, int chunkOffset, uint32_t value)
Writes a single 32-bit value to the given offset in the memory block indicated by the specified handl...