mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-11 20:29:46 +00:00
Add base class for memory-mapped I/O devices.
This commit is contained in:
parent
91c56a3465
commit
a469bcf900
14
mmiodevice.h
Normal file
14
mmiodevice.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef MMIO_DEVICE_H
|
||||
#define MMIO_DEVICE_H
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
/** Abstract class representing a simple, memory-mapped I/O device */
|
||||
class MMIODevice {
|
||||
public:
|
||||
virtual uint32_t read(uint32_t offset, int size) = 0;
|
||||
virtual void write(uint32_t offset, uint32_t value, int size) = 0;
|
||||
virtual ~MMIODevice() = default;
|
||||
};
|
||||
|
||||
#endif /* MMIO_DEVICE_H */
|
Loading…
x
Reference in New Issue
Block a user