Merge branch 'bugfix/usb_serial_jtag_write_return_val_v4.4' into 'release/v4.4'

fix(usb_serial_jtag): Fix usb_serial_jtag wrong return value, vfs lose data randomly(backport v4.4)

See merge request espressif/esp-idf!25711
pull/9151/merge
Jiang Jiang Jian 2023-09-06 16:39:47 +08:00
commit d152a5bb00
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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)