2
3
4
5
6
7
8
9
10
11
12#ifndef EVMU_PERIPHERAL_H
13#define EVMU_PERIPHERAL_H
18
19
20
21#define EVMU_PERIPHERAL_TYPE (GBL_TYPEID
(EvmuPeripheral))
22#define EVMU_PERIPHERAL(self) (GBL_CAST(EvmuPeripheral, self))
24#define EVMU_PERIPHERAL_GET_CLASS(self) (GBL_CLASSOF(EvmuPeripheral, self))
28
29
30
31
32
33
35#define GBL_SELF_TYPE EvmuPeripheral
39GBL_FORWARD_DECLARE_STRUCT(EvmuMemoryEvent);
40GBL_FORWARD_DECLARE_STRUCT(EvmuClockEvent);
41GBL_FORWARD_DECLARE_STRUCT(EvmuDevice);
42GBL_FORWARD_DECLARE_STRUCT(EvmuPeripheral);
44GBL_DECLARE_ENUM(EVMU_PERIPHERAL_LOG_LEVEL) {
45 EVMU_PERIPHERAL_LOG_LEVEL_ERROR,
46 EVMU_PERIPHERAL_LOG_LEVEL_WARNING,
47 EVMU_PERIPHERAL_LOG_LEVEL_VERBOSE,
48 EVMU_PERIPHERAL_LOG_LEVEL_DEBUG,
49 EVMU_PERIPHERAL_LOG_LEVEL_DISABLED
53
54
55
56
57
58
59
60
61
62GBL_CLASS_DERIVE(EvmuPeripheral, GblObject, EvmuIBehavior)
64 EVMU_RESULT (*pFnMemoryEvent)(GBL_SELF, EvmuMemoryEvent* pEvent);
66 EVMU_RESULT (*pFnClockEvent) (GBL_SELF, EvmuClockEvent* pEvent);
70
71
72
73
74
75
76
77
78
79
88
89
90
91
#define EVMU_EXPORT
Define used for adding attributes to export public symbols.
GblType EvmuPeripheral_type(void)
Returns the GblType UUID corresponding to the EvmuPeripheral type.
Emulated hardware component of an EvmuDevice.
GblFlags logLevel
Active log level filter for peripheral.
EvmuDevice * EvmuPeripheral_device(const EvmuPeripheral *pSelf)
Returns the EvmuDevice to which the given peripheral is attached to.
#define GBL_CLASS_CAST(cType, klass)
#define GBL_CLASSOF(cType, self)
#define GBL_CAST(cType, self)