TEMU  2
The Terma Emulator
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Device.h
Go to the documentation of this file.
1 //===------------------------------------------------------------*- C++ -*-===//
2 //
3 // T-EMU: The Terma Emulator
4 // (c) Terma 2015
5 // Authors: Mattias Holm <maho (at) terma.com>
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef TEMU_DEVICE_H
10 #define TEMU_DEVICE_H
11 
12 #include "temu-c/Support/Objsys.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 /* Standard device interface
19  Reset is called when the device is reset.
20  mapDevice is (if defined) called when a device is mapped.
21  */
22 typedef struct temu_DeviceIface {
23  void (*reset)(void *Obj, int ResetType);
24  void (*mapDevice)(void *Obj, uint64_t Address, uint64_t Len);
26 #define TEMU_DEVICE_IFACE_TYPE "DeviceIface"
27 TEMU_IFACE_REFERENCE_TYPE(temu_Device);
28 
29 #ifdef __cplusplus
30 }
31 #endif
32 
33 #endif /* ! TEMU_DEVICE_H */
void(* mapDevice)(void *Obj, uint64_t Address, uint64_t Len)
Definition: Device.h:24
void(* reset)(void *Obj, int ResetType)
Definition: Device.h:23
#define TEMU_IFACE_REFERENCE_TYPE(N)
Definition: Objsys.h:129
struct temu_DeviceIface temu_DeviceIface