Skip to content

Commit

Permalink
hpmicro: usbhost_cdcacm: fix usbhost_rxint()
Browse files Browse the repository at this point in the history
- keep enable status, because usbhost_rxdata_work() executes many times cause usb wrong status.

Signed-off-by: Zhihong Chen <[email protected]>
  • Loading branch information
chenzhihong007 committed Jan 17, 2024
1 parent 2f86fc7 commit 4ec9b68
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions drivers/usbhost/usbhost_cdcacm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2593,17 +2593,11 @@ static void usbhost_rxint(FAR struct uart_dev_s *uartdev, bool enable)
DEBUGASSERT(ret >= 0);
UNUSED(ret);
}
}
else if (!enable && priv->rxena)
{
/* Cancel any pending RX data reception work */

work_cancel(LPWORK, &priv->rxwork);
}

/* Save the new RX enable state */
/* Save the new RX enable state */

priv->rxena = enable;
priv->rxena = enable;
}
}

/****************************************************************************
Expand Down

0 comments on commit 4ec9b68

Please sign in to comment.