public void WriteBytes(byte[] data, uint offset) { lock (_sync) { SendInternal(SwitchCommand.PokeRaw(offset, data)); // give it time to push data back Thread.Sleep((data.Length / 256) + 100); } }
public void WriteBytes(byte[] data, uint offset) { lock (_sync) { AndroidUSBUtils.CurrentInstance.WriteToEndpoint(SwitchCommand.PokeRaw(offset, data)); // give it time to push data back Thread.Sleep((data.Length / 256) + 100); } }
public void WriteBytes(byte[] data, uint offset) { if (data.Length > MaximumTransferSize) { WriteBytesLarge(data, offset); } lock (_sync) { SendInternal(SwitchCommand.PokeRaw(offset, data)); // give it time to push data back Thread.Sleep((data.Length / 256) + UI_Settings.GetThreadSleepTime()); } }
public static byte[] GetPokeCommand(ulong offset, byte[] data, RWMethod method, bool usb) { switch (method) { case RWMethod.Heap when !usb: return(SwitchCommand.Poke((uint)offset, data)); case RWMethod.Heap when usb: return(SwitchCommand.PokeRaw((uint)offset, data)); case RWMethod.Main: return(SwitchCommand.PokeMain(offset, data)); case RWMethod.Absolute: return(SwitchCommand.PokeAbsolute(offset, data)); default: return(SwitchCommand.Poke((uint)offset, data)); } }
public void WriteBytes(byte[] data, uint offset) { if (data.Length > MaximumTransferSize) { WriteBytesLarge(data, offset); } else { lock (_sync) { AndroidUSBUtils.CurrentInstance.WriteToEndpoint(SwitchCommand.PokeRaw(offset, data)); // give it time to push data back Thread.Sleep((data.Length / 256) + UI_Settings.GetThreadSleepTime()); } } }