driver/uart_rpmsg: clear transmit buffer when remote exception occurred

Make uart rpmsg work normally when restart the remote core

Signed-off-by: yintao <yintao@xiaomi.com>
This commit is contained in:
yintao 2023-10-25 11:22:15 +08:00 committed by GUIDINGLI
parent b3727f67be
commit a1dc6dc7fc
1 changed files with 3 additions and 0 deletions

View File

@ -344,6 +344,9 @@ static void uart_rpmsg_device_destroy(FAR struct rpmsg_device *rdev,
{
rpmsg_destroy_ept(&priv->ept);
}
dev->dmatx.nbytes = dev->dmatx.length + dev->dmatx.nlength;
uart_xmitchars_done(dev);
}
static int uart_rpmsg_ept_cb(FAR struct rpmsg_endpoint *ept, FAR void *data,