예제 #1
0
        public void WriteBytes(byte[] data, ulong offset, RWMethod method = RWMethod.Heap)
        {
            if (data.Length > MaximumTransferSize)
            {
                WriteBytesLarge(data, offset, method);
            }
            lock (_sync)
            {
                SendInternal(SwitchCommandMethodHelper.GetPokeCommand(offset, data, method, true));

                // give it time to push data back
                Thread.Sleep((data.Length / 256) + UI_Settings.GetThreadSleepTime());
            }
        }
예제 #2
0
        public void WriteBytes(byte[] data, ulong offset, RWMethod method = RWMethod.Heap)
        {
            if (data.Length > MaximumTransferSize)
            {
                WriteBytesLarge(data, offset, method);
            }
            else
            {
                lock (_sync)
                {
                    AndroidUSBUtils.CurrentInstance.WriteToEndpoint(SwitchCommandMethodHelper.GetPokeCommand(offset, data, method, true));

                    // give it time to push data back
                    Thread.Sleep((data.Length / 256) + UI_Settings.GetThreadSleepTime());
                }
            }
        }