mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-03 10:30:58 +02:00
Merge branch 'fix/fix_usb_ot_rcp_send' into 'master'
fix(openthread): resolve the RCP data transmission issue over USB Serial JTAG See merge request espressif/esp-idf!41715
This commit is contained in:
@@ -25,6 +25,9 @@
|
|||||||
#include "utils/uart.h"
|
#include "utils/uart.h"
|
||||||
#include "driver/usb_serial_jtag_vfs.h"
|
#include "driver/usb_serial_jtag_vfs.h"
|
||||||
#include "driver/usb_serial_jtag.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_port;
|
||||||
static int s_uart_fd;
|
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);
|
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) {
|
if (rval != (int)buf_length) {
|
||||||
return OT_ERROR_FAILED;
|
return OT_ERROR_FAILED;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user