Skip to content

Commit 95df63d

Browse files
committed
fix for pico sdk 1.5.0 change.
Add a flush after usb write
1 parent 1ad99d0 commit 95df63d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ void cmd_handle(pio_jtag_inst_t* jtag, uint8_t* rxbuf, uint32_t count, uint8_t*
202202
if (tx_buf != output_buffer)
203203
{
204204
tud_vendor_write(tx_buf, output_buffer - tx_buf);
205+
tud_vendor_flush();
205206
}
206207
return;
207208
}
@@ -229,7 +230,7 @@ static uint32_t cmd_xfer(pio_jtag_inst_t* jtag, const uint8_t *commands, bool ex
229230
// Ensure we don't do over-read
230231
if (transferred_bits > 62 * 8)
231232
{
232-
return transferred_bits = 62 * 8;
233+
transferred_bits = 62 * 8;
233234
}
234235

235236
/* Fill the output buffer with zeroes */

0 commit comments

Comments
 (0)