コード例 #1
0
ファイル: MassStorageExtensions.cs プロジェクト: rte-se/emul8
 public static void PendriveFromFile(this Machine machine, string file, string name, IPeripheralRegister<IUSBPeripheral, USBRegistrationPoint> attachTo, byte port, bool persistent = true)
 {
     // TODO: note that port is here (or is nondefault) only due to bug/deficiency in EHCI
     // i.e. that one cannot register by first free port
     var pendrive = new MassStorage(file, persistent: persistent);
     attachTo.Register(pendrive, new USBRegistrationPoint(port));
     machine.SetLocalName(pendrive, name);
 }
コード例 #2
0
        public static void PendriveFromFile(this Machine machine, string file, string name, IPeripheralRegister <IUSBPeripheral, USBRegistrationPoint> attachTo, byte port, bool persistent = true)
        {
            // TODO: note that port is here (or is nondefault) only due to bug/deficiency in EHCI
            // i.e. that one cannot register by first free port
            var pendrive = new MassStorage(file, persistent: persistent);

            attachTo.Register(pendrive, new USBRegistrationPoint(port));
            machine.SetLocalName(pendrive, name);
        }