From 2651b1d8bd00c93984d8a34be4ee868151367945 Mon Sep 17 00:00:00 2001 From: sago35 Date: Wed, 25 May 2022 21:54:48 +0900 Subject: [PATCH] fix packetComplete() --- src/machine/usb/dhw_atsamd51.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine/usb/dhw_atsamd51.go b/src/machine/usb/dhw_atsamd51.go index 95b408abc..f4139bbae 100644 --- a/src/machine/usb/dhw_atsamd51.go +++ b/src/machine/usb/dhw_atsamd51.go @@ -601,7 +601,7 @@ func (t *dhwTransfer) packetStart(data uintptr, size uint32) (next uint32) { } func (t *dhwTransfer) packetComplete(sent uint32) (data uintptr, size uint32) { - t.sent = sent + t.sent += sent if size = t.size - t.sent; size > t.maxPacketSize { size = t.maxPacketSize }