Fix IO Port code again

This commit is contained in:
Jaby
2023-01-08 13:56:26 +01:00
parent 7824a2d916
commit 3d57dfdc92
3 changed files with 26 additions and 19 deletions

View File

@@ -74,12 +74,12 @@ namespace JabyEngine {
}
static void wait_ready_for_CMD() {
while(!GPUSTAT.ref().is(GPUStatusRegister::GP0ReadyForCMD));
while(!GPUSTAT.read().is(GPUStatusRegister::GP0ReadyForCMD));
}
namespace DMA {
static void wait() {
while(::JabyEngine::DMA::GPU.channel_ctrl.ref().is(::JabyEngine::DMA::CHCHR::Busy));
while(::JabyEngine::DMA::GPU.channel_ctrl.read().is(::JabyEngine::DMA::CHCHR::Busy));
}
static void end() {
@@ -94,7 +94,7 @@ namespace JabyEngine {
}
static void set_src(uintptr_t adr) {
::JabyEngine::DMA::GPU.adr.ref().set_value(static_cast<uint32_t>(adr), ::JabyEngine::DMA::MADR::MemoryAdr);
::JabyEngine::DMA::GPU.adr.write(::JabyEngine::DMA::MADR::MemoryAdr.with(static_cast<uint32_t>(adr)));
}
static void set_dst(const PositionU16& position, const SizeU16& size) {