public static void SdCardFromFile(this Machine machine, string file, IPeripheralRegister <SDCard, NullRegistrationPoint> attachTo, bool persistent = true, long?size = null) { var card = new SDCard(file, size, persistent); attachTo.Register(card, NullRegistrationPoint.Instance); machine.SetLocalName(card, String.Format("SD card: {0}", file)); }
public static void PendriveFromFile(this Machine machine, string file, string name, IPeripheralRegister <IUSBDevice, NumberRegistrationPoint <int> > attachTo, int port, bool persistent = true) { var pendrive = new USBPendrive(file, persistent: persistent); attachTo.Register(pendrive, new NumberRegistrationPoint <int>(port)); machine.SetLocalName(pendrive, name); }
public static void SdhcCardFromFile(this Machine machine, string file, IPeripheralRegister <SDCard, NullRegistrationPoint> attachTo, bool persistent = true, long?size = null, string name = null) { var card = new SDCard(file, size, persistent, highCapacityMode: true); attachTo.Register(card, NullRegistrationPoint.Instance); machine.SetLocalName(card, name ?? "sdCard"); }
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); }
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); }
public static void SdCardFromFile(this Machine machine, string file, IPeripheralRegister<ISDDevice, NullRegistrationPoint> attachTo, bool persistent = true, long? size = null) { var card = new SDCard(file, size, persistent); attachTo.Register(card, NullRegistrationPoint.Instance); machine.SetLocalName(card, String.Format("SD card: {0}", file)); }