Support DMA with new IO

This commit is contained in:
2023-09-17 12:30:43 +02:00
parent 19c5485658
commit 87a7a349cc
6 changed files with 72 additions and 63 deletions

View File

@@ -91,10 +91,10 @@ namespace JabyEngine {
}
static void start(uint16_t blockCount, uint16_t wordsPerBlock = 0x10) {
typedef DMA_IO::BCR_t::SyncMode1 SyncMode1;
typedef DMA_IO::BCR::SyncMode1 SyncMode1;
DMA_IO::GPU.block_ctrl = DMA_IO::BCR_t::from(SyncMode1::BlockSize.with(wordsPerBlock), SyncMode1::BlockAmount.with(blockCount));
DMA_IO::GPU.channel_ctrl = DMA_IO::CHCHR_t::StartGPUReceive();
DMA_IO::GPU.block_ctrl.write(DMA_IO::BCR::from(SyncMode1::BlockSize.with(wordsPerBlock), SyncMode1::BlockAmount.with(blockCount)));
DMA_IO::GPU.channel_ctrl.write(DMA_IO::CHCHR::StartGPUReceive());
}
}
}