fix(openthread): resolve the RCP data transmission issue over USB Serial JTAG

This commit is contained in:
Xu Si Yu
2025-09-02 11:39:54 +08:00
committed by BOT
parent aae5071dff
commit 132db34cfe

View File

@@ -25,6 +25,9 @@
#include "utils/uart.h"
#include "driver/usb_serial_jtag_vfs.h"
#include "driver/usb_serial_jtag.h"
#if CONFIG_OPENTHREAD_RCP_USB_SERIAL_JTAG
#include "hal/usb_serial_jtag_ll.h"
#endif
static int s_uart_port;
static int s_uart_fd;
@@ -51,6 +54,11 @@ otError otPlatUartSend(const uint8_t *buf, uint16_t buf_length)
{
int rval = write(s_uart_fd, buf, buf_length);
// DIG-727
#if CONFIG_OPENTHREAD_RCP_USB_SERIAL_JTAG
usb_serial_jtag_ll_txfifo_flush();
#endif
if (rval != (int)buf_length) {
return OT_ERROR_FAILED;
}