mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 20:44:39 +08:00
cdcacm: check present bit
When close the serial tool in PC, only the persent bit is cleared on Windows but all bits are cleared on linux. Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
This commit is contained in:
@@ -3138,7 +3138,7 @@ ssize_t cdcacm_write(FAR const char *buffer, size_t buflen)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
||||
if (!priv || !priv->ctrlline)
|
||||
if (!priv || !(priv->ctrlline & CDC_DTE_PRESENT))
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user