mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 06:13:33 +08:00
The composite USB device is basically functional (more testing needed)
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4343 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -189,13 +189,13 @@ static int composite_classsetup(FAR struct composite_dev_s *priv,
|
||||
index = GETUINT16(ctrl->index);
|
||||
interface = (uint8_t)(index & 0xff);
|
||||
|
||||
if (interface >= DEV1_FIRSTINTERFACE && interface <= (DEV1_FIRSTINTERFACE + DEV1_NINTERFACES))
|
||||
if (interface >= DEV1_FIRSTINTERFACE && interface < (DEV1_FIRSTINTERFACE + DEV1_NINTERFACES))
|
||||
{
|
||||
ret = CLASS_SETUP(priv->dev1, dev, ctrl);
|
||||
}
|
||||
else if (interface >= DEV2_FIRSTINTERFACE && interface <= (DEV2_FIRSTINTERFACE + DEV2_NINTERFACES))
|
||||
else if (interface >= DEV2_FIRSTINTERFACE && interface < (DEV2_FIRSTINTERFACE + DEV2_NINTERFACES))
|
||||
{
|
||||
ret = CLASS_SETUP(priv->dev1, dev, ctrl);
|
||||
ret = CLASS_SETUP(priv->dev2, dev, ctrl);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -505,7 +505,7 @@ static int composite_setup(FAR struct usbdevclass_driver_s *driver,
|
||||
|
||||
if (ret >= 0)
|
||||
{
|
||||
ret = CLASS_SETUP(priv->dev1, dev, ctrl);
|
||||
ret = CLASS_SETUP(priv->dev2, dev, ctrl);
|
||||
if (ret >= 0)
|
||||
{
|
||||
priv->config = value;
|
||||
|
||||
Reference in New Issue
Block a user