New concept for IOPorts
This commit is contained in:
@@ -4,11 +4,16 @@
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace Memory_IO {
|
||||
struct COM_DELAY {
|
||||
typedef uint32_t Type;
|
||||
template<template<typename> typename T>
|
||||
struct COM_DELAY_base {
|
||||
T<uint32_t>::Value value;
|
||||
|
||||
static constexpr uint32_t SetupValue = 0x1325;
|
||||
void setup() {
|
||||
this->value = 0x1325;
|
||||
}
|
||||
};
|
||||
typedef COM_DELAY_base<VolatileValue> COM_DELAY_v;
|
||||
typedef COM_DELAY_base<NormalValue> COM_DELAY_t;
|
||||
|
||||
struct CD_DELAY {
|
||||
typedef uint32_t Type;
|
||||
@@ -16,7 +21,9 @@ namespace JabyEngine {
|
||||
static constexpr uint32_t SetupValue = 0x20943;
|
||||
};
|
||||
|
||||
__declare_io_port_global_simple(COM_DELAY::Type, COM_DELAY, 0x1F801020);
|
||||
static auto& COM_DELAY = *reinterpret_cast<COM_DELAY_v*>(0x1F801020);
|
||||
|
||||
//__declare_io_port_global_simple(COM_DELAY::Type, COM_DELAY, 0x1F801020);
|
||||
__declare_io_port_global_simple(CD_DELAY::Type, CD_DELAY, 0x1F801018);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user