Using new IO Port

This commit is contained in:
Jaby
2022-08-31 23:02:40 +02:00
parent f056972b15
commit bcb6191431
3 changed files with 9 additions and 16 deletions

View File

@@ -100,11 +100,11 @@ public:
return this->value;
}
constexpr IOPort<T>& operator=(T value) {
constexpr void operator=(T value) {
this->value = value;
}
constexpr volatile IOPort<T>& operator=(T value) volatile {
constexpr void operator=(T value) volatile {
this->value = value;
}
};

View File

@@ -1,8 +1,10 @@
#ifndef __JABYENGINE_SPU_IO_HPP__
#define __JABYENGINE_SPU_IO_HPP__
#include "../../Auxiliary/io_class_helper.hpp"
#include "IOPort.hpp"
#include <limits.h>
#include "../../Auxiliary/io_class_helper.hpp"
namespace SPU {
struct __no_align ubus32_t
{
@@ -213,10 +215,9 @@ namespace SPU {
io_class__2option_map_getter_is(bool, cd_audio_disable, cd_audio_enable, 0);
};
struct __no_align DataTransferControl {
static inline __always_inline auto& Register = *reinterpret_cast<DataTransferControl*>(0x1F801DAC);
uint16_t raw_value = 0;
struct DataTransferControl {
static inline __always_inline auto& Register = *reinterpret_cast<IOPort<uint16_t>*>(0x1F801DAC);
static inline __always_inline volatile auto& vRegister = *reinterpret_cast<IOPort<uint16_t>*>(0x1F801DAC);
};
}