2
3
4
5
6
7
8
9
10
11
16#include <gimbal/meta/instances/gimbal_object.h>
17#include <gimbal/meta/signals/gimbal_signal.h>
20
21
22
23#define EVMU_IMEMORY_TYPE (GBL_TYPEID
(EvmuIMemory))
24#define EVMU_IMEMORY(self) (GBL_CAST(EvmuIMemory, self))
26#define EVMU_IMEMORY_GET_CLASS(self) (GBL_CLASSOF(EvmuIMemory, self))
29#define GBL_SELF_TYPE EvmuIMemory
34
35
36
37
38
39
40
41
42
43
44GBL_INTERFACE_DERIVE(EvmuIMemory)
46 EVMU_RESULT (*pFnRead) (GBL_CSELF,
51 EVMU_RESULT (*pFnWrite)(GBL_SELF,
60
61
62
63
64
65
66
67
70 (dataChanged, GBL_GENERIC, (ABSTRACT, READ, WRITE),
GBL_BOOL_TYPE)
73GBL_SIGNALS(EvmuIMemory,
74 (dataChange, (GBL_UINT32_TYPE, address), (GBL_UINT32_TYPE, bytes), (GBL_POINTER_TYPE, pData))
81
82
83
84
94 size_t* pBytes) GBL_NOEXCEPT;
98
99
100
101
110 size_t* pBytes) GBL_NOEXCEPT;
#define EVMU_EXPORT
Define used for adding attributes to export public symbols.
uint8_t EvmuWord
Represents a single 8-bit CPU word.
uint32_t EvmuAddress
Represents a generic absolute address.
#define GBL_PROPERTIES(object,...)
size_t capacity
Byte size of memory space.
EVMU_RESULT EvmuIMemory_writeBytes(EvmuIMemory *pSelf, EvmuAddress base, const void *pData, size_t *pBytes)
Writes the given buffer to flash, returning nubmer of bytes written (bypassing unlock sequence)
EVMU_RESULT EvmuIMemory_fillBytes(EvmuIMemory *pSelf, EvmuAddress base, size_t regionSize, const void *pData, size_t dataBytes)
Fills the given region with the specified bit pattern data, performing a series of batch writes.
size_t EvmuIMemory_capacity(const EvmuIMemory *pSelf)
Retrives the capacity of the given interface, by grabbing it from its class.
EVMU_RESULT EvmuIMemory_writeByte(EvmuIMemory *pSelf, EvmuAddress address, EvmuWord value)
Writes a value to flash at the given address (bypassing unlock sequence)
EvmuWord EvmuIMemory_readByte(const EvmuIMemory *pSelf, EvmuAddress address)
Reads a value from flash at the given address and returns its value.
EVMU_RESULT EvmuIMemory_readBytes(const EvmuIMemory *pSelf, EvmuAddress base, void *pData, size_t *pBytes)
Reads the given number of bytes from flash into the buffer, returning the number successfully read.
#define GBL_CLASS_CAST(cType, klass)
#define GBL_CLASSOF(cType, self)
#define GBL_CAST(cType, self)