USB host CDC/ACM fixes. Still kind of buggy

This commit is contained in:
Gregory Nutt
2015-05-08 10:58:41 -06:00
parent 513344a084
commit c35bb693a9
3 changed files with 33 additions and 9 deletions
+7 -3
View File
@@ -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;
}