Beispiel #1
0
        internal DmaController(VirtualMachine vm)
        {
            for (int i = 0; i < 8; i++)
            {
                var channel = new DmaChannel();
                this.channels.Add(channel);
            }

            this.Channels = new ReadOnlyCollection <DmaChannel>(channels);
        }
Beispiel #2
0
 /// <summary>
 /// Sets DMA channel mode information.
 /// </summary>
 /// <param name="channel">Channel whose mode is to be set.</param>
 /// <param name="value">Flags specifying channel's new mode information.</param>
 private void SetChannelMode(DmaChannel channel, int value)
 {
     if ((value & AutoInitFlag) != 0)
     {
         channel.TransferMode = DmaTransferMode.AutoInitialize;
     }
     else
     {
         channel.TransferMode = DmaTransferMode.SingleCycle;
     }
 }