Skip to content

Commit

Permalink
fix for pico sdk 1.5.0 change.
Browse files Browse the repository at this point in the history
Add a flush after usb write
  • Loading branch information
phdussud committed Feb 15, 2023
1 parent 1ad99d0 commit 95df63d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ void cmd_handle(pio_jtag_inst_t* jtag, uint8_t* rxbuf, uint32_t count, uint8_t*
if (tx_buf != output_buffer)
{
tud_vendor_write(tx_buf, output_buffer - tx_buf);
tud_vendor_flush();
}
return;
}
Expand Down Expand Up @@ -229,7 +230,7 @@ static uint32_t cmd_xfer(pio_jtag_inst_t* jtag, const uint8_t *commands, bool ex
// Ensure we don't do over-read
if (transferred_bits > 62 * 8)
{
return transferred_bits = 62 * 8;
transferred_bits = 62 * 8;
}

/* Fill the output buffer with zeroes */
Expand Down

0 comments on commit 95df63d

Please sign in to comment.