public SunxiDMADescriptor(uint address, DmaEngine dmaEngine) { Address = address; byte[] descriptorData = new byte[16]; Request getDescriptorData = new Request((long)Address, new Place(descriptorData, 0), 16, TransferType.DoubleWord, TransferType.DoubleWord); dmaEngine.IssueCopy(getDescriptorData); Status = BitConverter.ToUInt32(descriptorData, 0); BufferSize = BitConverter.ToUInt32(descriptorData, 4); BufferAddress = BitConverter.ToUInt32(descriptorData, 8); NextDescriptor = BitConverter.ToUInt32(descriptorData, 12); if (BufferSize == 0) // the driver assumes 0-sized blocks to be 64kB, which is inconsistent with the Allwinner user manual. { BufferSize = 0x10000; } }
public SunxiMMC(Machine machine) : base(machine) { SetupRegisters(); IRQ = new GPIO(); dmaEngine = new DmaEngine(machine); }