mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
USB host CDC/ACM fixes. Still kind of buggy
This commit is contained in:
@@ -1467,7 +1467,7 @@ static int cdcacm_setup(FAR struct usbdevclass_driver_s *driver,
|
||||
{
|
||||
/* Save the new line coding in the private data structure. NOTE:
|
||||
* that this is conditional now because not all device controller
|
||||
* drivers supported provisioni of EP0 OUT data with the setup
|
||||
* drivers supported provision of EP0 OUT data with the setup
|
||||
* command.
|
||||
*/
|
||||
|
||||
@@ -1476,6 +1476,8 @@ static int cdcacm_setup(FAR struct usbdevclass_driver_s *driver,
|
||||
memcpy(&priv->linecoding, dataout, SIZEOF_CDC_LINECODING);
|
||||
}
|
||||
|
||||
/* Respond with a zero length packet */
|
||||
|
||||
ret = 0;
|
||||
|
||||
/* If there is a registered callback to receive line status info, then
|
||||
@@ -1504,7 +1506,7 @@ static int cdcacm_setup(FAR struct usbdevclass_driver_s *driver,
|
||||
index == CDCACM_NOTIFID)
|
||||
{
|
||||
/* Save the control line state in the private data structure. Only bits
|
||||
* 0 and 1 have meaning.
|
||||
* 0 and 1 have meaning. Respond with a zero length packet.
|
||||
*/
|
||||
|
||||
priv->ctrlline = value & 3;
|
||||
@@ -1534,7 +1536,7 @@ static int cdcacm_setup(FAR struct usbdevclass_driver_s *driver,
|
||||
index == CDCACM_NOTIFID)
|
||||
{
|
||||
/* If there is a registered callback to handle the SendBreak request,
|
||||
* then callout now.
|
||||
* then callout now. Respond with a zero length packet.
|
||||
*/
|
||||
|
||||
ret = 0;
|
||||
@@ -1589,6 +1591,8 @@ static int cdcacm_setup(FAR struct usbdevclass_driver_s *driver,
|
||||
}
|
||||
}
|
||||
|
||||
/* Returning a negative value will cause a STALL */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user