diff options
Diffstat (limited to 'src/core/hw/hw.cpp')
| -rw-r--r-- | src/core/hw/hw.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/core/hw/hw.cpp b/src/core/hw/hw.cpp index b5fdbf9c1..9ff8825b2 100644 --- a/src/core/hw/hw.cpp +++ b/src/core/hw/hw.cpp | |||
| @@ -4,15 +4,14 @@ | |||
| 4 | 4 | ||
| 5 | #include "common/common_types.h" | 5 | #include "common/common_types.h" |
| 6 | #include "common/logging/log.h" | 6 | #include "common/logging/log.h" |
| 7 | |||
| 8 | #include "core/hw/hw.h" | ||
| 9 | #include "core/hw/gpu.h" | 7 | #include "core/hw/gpu.h" |
| 8 | #include "core/hw/hw.h" | ||
| 10 | #include "core/hw/lcd.h" | 9 | #include "core/hw/lcd.h" |
| 11 | 10 | ||
| 12 | namespace HW { | 11 | namespace HW { |
| 13 | 12 | ||
| 14 | template <typename T> | 13 | template <typename T> |
| 15 | inline void Read(T &var, const u32 addr) { | 14 | inline void Read(T& var, const u32 addr) { |
| 16 | switch (addr & 0xFFFFF000) { | 15 | switch (addr & 0xFFFFF000) { |
| 17 | case VADDR_GPU: | 16 | case VADDR_GPU: |
| 18 | case VADDR_GPU + 0x1000: | 17 | case VADDR_GPU + 0x1000: |
| @@ -71,10 +70,10 @@ inline void Write(u32 addr, const T data) { | |||
| 71 | 70 | ||
| 72 | // Explicitly instantiate template functions because we aren't defining this in the header: | 71 | // Explicitly instantiate template functions because we aren't defining this in the header: |
| 73 | 72 | ||
| 74 | template void Read<u64>(u64 &var, const u32 addr); | 73 | template void Read<u64>(u64& var, const u32 addr); |
| 75 | template void Read<u32>(u32 &var, const u32 addr); | 74 | template void Read<u32>(u32& var, const u32 addr); |
| 76 | template void Read<u16>(u16 &var, const u32 addr); | 75 | template void Read<u16>(u16& var, const u32 addr); |
| 77 | template void Read<u8>(u8 &var, const u32 addr); | 76 | template void Read<u8>(u8& var, const u32 addr); |
| 78 | 77 | ||
| 79 | template void Write<u64>(u32 addr, const u64 data); | 78 | template void Write<u64>(u32 addr, const u64 data); |
| 80 | template void Write<u32>(u32 addr, const u32 data); | 79 | template void Write<u32>(u32 addr, const u32 data); |
| @@ -82,8 +81,7 @@ template void Write<u16>(u32 addr, const u16 data); | |||
| 82 | template void Write<u8>(u32 addr, const u8 data); | 81 | template void Write<u8>(u32 addr, const u8 data); |
| 83 | 82 | ||
| 84 | /// Update hardware | 83 | /// Update hardware |
| 85 | void Update() { | 84 | void Update() {} |
| 86 | } | ||
| 87 | 85 | ||
| 88 | /// Initialize hardware | 86 | /// Initialize hardware |
| 89 | void Init() { | 87 | void Init() { |
| @@ -98,5 +96,4 @@ void Shutdown() { | |||
| 98 | LCD::Shutdown(); | 96 | LCD::Shutdown(); |
| 99 | LOG_DEBUG(HW, "shutdown OK"); | 97 | LOG_DEBUG(HW, "shutdown OK"); |
| 100 | } | 98 | } |
| 101 | |||
| 102 | } | 99 | } |