7#ifndef __ADAPTER_FUNCTIONS_H__
8#define __ADAPTER_FUNCTIONS_H__
68bool Adapter_ReadMemory(
int dataHandle,
int byteOffset, uint8_t* buffer,
int maxBytes,
int* bytesRead);
84bool Adapter_WriteMemory(
int dataHandle,
int byteOffset,
const uint8_t* buffer,
int maxBytes,
int* bytesWritten);
bool Adapter_CloseMemory(int dataHandle)
Closes a memory block from access.
bool Adapter_ReadMemory(int dataHandle, int byteOffset, uint8_t *buffer, int maxBytes, int *bytesRead)
Read a requested number of bytes from the memory block associated with the given handle.
bool Adapter_OpenMemory(MemoryBlockNumber blockNumber, int *dataHandle)
Open a memory block for access.
bool Adapter_WriteMemory(int dataHandle, int byteOffset, const uint8_t *buffer, int maxBytes, int *bytesWritten)
Write a requested number of bytes to the memory block associated with the given handle.
bool Adapter_GetMemorySize(int dataHandle, int *sizeInBytes)
Retrieve the number of bytes in the memory block associated with the specified data handle.
const char * Adapter_BufferToString(const uint8_t *data, uint32_t maxBytes, int indent)
Convert the specified data up to the specified number of bytes into a string by performing a "hex dum...
const char * Adapter_GetLastErrorMessage(void)
Retrieve a string describing the last error that occurred in the Adapter.
MemoryBlockNumber
Represents the memory blocks that can be accessed. Hides how memory blocks are actually identified.
@ Memory_Block_0
First block.
@ Memory_Block_1
Second block.
@ Memory_Block_2
Third block.