Skip to content

Commit

Permalink
fix(usb_serial_jtag): Fix usb_serial_jtag wrong return value, vfs los…
Browse files Browse the repository at this point in the history
…e data randomly,

Closes #12119,
Closes #11344,
Closes #9318
Closes #11192
  • Loading branch information
mythbuster5 committed Sep 4, 2023
1 parent 93cb3d6 commit e2eb773
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/driver/usb_serial_jtag.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ int usb_serial_jtag_write_bytes(const void* src, size_t size, TickType_t ticks_t

const uint8_t *buff = (const uint8_t *)src;
// Blocking method, Sending data to ringbuffer, and handle the data in ISR.
xRingbufferSend(p_usb_serial_jtag_obj->tx_ring_buf, (void*) (buff), size, ticks_to_wait);
BaseType_t result = xRingbufferSend(p_usb_serial_jtag_obj->tx_ring_buf, (void*) (buff), size, ticks_to_wait);
// Now trigger the ISR to read data from the ring buffer.
usb_serial_jtag_ll_ena_intr_mask(USB_SERIAL_JTAG_INTR_SERIAL_IN_EMPTY);
return size;
return (result == pdFALSE) ? 0 : size;
}

esp_err_t usb_serial_jtag_driver_uninstall(void)
Expand Down

0 comments on commit e2eb773

Please sign in to comment.