mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 16:59:28 +08:00
usb/ft232r: fixed build issue
1. fixed build issue; 2. make sure the read data length must greater than or equal to 2; Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
@@ -1180,7 +1180,7 @@ static void usbhost_rxdata_work(FAR void *arg)
|
|||||||
|
|
||||||
nread = DRVR_TRANSFER(hport->drvr, priv->bulkin,
|
nread = DRVR_TRANSFER(hport->drvr, priv->bulkin,
|
||||||
priv->inbuf, priv->pktsize);
|
priv->inbuf, priv->pktsize);
|
||||||
if (nread < 0)
|
if (nread < 2)
|
||||||
{
|
{
|
||||||
/* The most likely reason for a failure is that the has no
|
/* The most likely reason for a failure is that the has no
|
||||||
* data available now and NAK'ed the IN token OR that the
|
* data available now and NAK'ed the IN token OR that the
|
||||||
@@ -2584,7 +2584,7 @@ static bool usbhost_rxflowcontrol(FAR struct uart_dev_s *uartdev,
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
DEBUGASSERT(uartdev && uartdev->priv);
|
DEBUGASSERT(uartdev && uartdev->priv);
|
||||||
priv = (FAR struct usbhost_ft232r_s *)uartdev->priv
|
priv = (FAR struct usbhost_ft232r_s *)uartdev->priv;
|
||||||
|
|
||||||
/* Is RX flow control enabled? */
|
/* Is RX flow control enabled? */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user