Share commo DMA related code for use with SPU
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
namespace JabyEngine {
|
||||
namespace SPU {
|
||||
namespace internal {
|
||||
namespace DMA {
|
||||
struct DMA {
|
||||
static void wait() {
|
||||
DMA_IO::SPU.wait();
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace JabyEngine {
|
||||
SPU_IO::ControlRegister.set_transfer_mode(SPU_IO::ControlRegister::Stop);
|
||||
}
|
||||
|
||||
namespace Receive {
|
||||
struct Receive {
|
||||
static void prepare() {
|
||||
SPU_IO::DataTransferControl.write(SPU_IO::DataTransferControl::NormalTransferMode());
|
||||
SPU_IO::ControlRegister.set_transfer_mode(SPU_IO::ControlRegister::Stop);
|
||||
@@ -36,8 +36,8 @@ namespace JabyEngine {
|
||||
DMA_IO::SPU.block_ctrl.write(DMA_IO::BCR::from(SyncMode1::BlockSize.with(wordsPerBlock), SyncMode1::BlockAmount.with(blockCount)));
|
||||
DMA_IO::SPU.channel_ctrl.write(DMA_IO::CHCHR::StartSPUReceive());
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user