mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 19:36:35 +08:00
composite: return ok when host send a duplicate setconfig message
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
@@ -579,10 +579,18 @@ static int composite_setup(FAR struct usbdevclass_driver_s *driver,
|
|||||||
|
|
||||||
case USB_REQ_SETCONFIGURATION:
|
case USB_REQ_SETCONFIGURATION:
|
||||||
{
|
{
|
||||||
if (ctrl->type == 0 && value != priv->config)
|
if (ctrl->type == 0)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (priv->config == value)
|
||||||
|
{
|
||||||
|
/* Already configured -- Do nothing */
|
||||||
|
|
||||||
|
ret = OK;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* Save the configuration and inform the constituent
|
/* Save the configuration and inform the constituent
|
||||||
* classes
|
* classes
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user