mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-08 21:13:39 +00:00
machine: fix usb truncation?
Remove the sendUSBPacket maxLen param because this greatly confused the compiler. It also fixes a bug where the length provided to the hardware may not match the length of the packet. sendUSBPacket now panics if the sent packet is too big. I also fixed some of the string descriptor logic where we could create a packet without fully populating it. RP2* systems might require some more work since they are implemented very differently? I don't have any of those to test with yet, so maybe someone can deal with them in a seperate PR?
This commit is contained in:
@@ -44,7 +44,7 @@ func TestBinarySize(t *testing.T) {
|
||||
// microcontrollers
|
||||
{"hifive1b", "examples/echo", 3668, 280, 0, 2244},
|
||||
{"microbit", "examples/serial", 2694, 342, 8, 2248},
|
||||
{"wioterminal", "examples/pininterrupt", 7187, 1489, 116, 6888},
|
||||
{"wioterminal", "examples/pininterrupt", 6833, 1491, 120, 6888},
|
||||
|
||||
// TODO: also check wasm. Right now this is difficult, because
|
||||
// wasm binaries are run through wasm-opt and therefore the
|
||||
|
||||
Reference in New Issue
Block a user