mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 07:33:34 +08:00
Add a text for the new composite USB device
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4341 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -108,7 +108,7 @@ static void composite_freereq(FAR struct usbdev_ep_s *ep,
|
||||
/* USB class device ********************************************************/
|
||||
|
||||
static int composite_bind(FAR struct usbdevclass_driver_s *driver,
|
||||
FAR struct usbdev_s *dev)
|
||||
FAR struct usbdev_s *dev);
|
||||
static void composite_unbind(FAR struct usbdevclass_driver_s *driver,
|
||||
FAR struct usbdev_s *dev);
|
||||
static int composite_setup(FAR struct usbdevclass_driver_s *driver,
|
||||
@@ -319,7 +319,7 @@ static int composite_bind(FAR struct usbdevclass_driver_s *driver,
|
||||
return OK;
|
||||
|
||||
errout:
|
||||
composite_unbind(dev);
|
||||
composite_unbind(driver, dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -821,7 +821,7 @@ FAR void *composite_initialize(void)
|
||||
goto errout_with_alloc;
|
||||
}
|
||||
|
||||
return (FAR void *)priv;
|
||||
return (FAR void *)alloc;
|
||||
|
||||
errout_with_alloc:
|
||||
kfree(alloc);
|
||||
@@ -829,7 +829,7 @@ errout_with_alloc:
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: usbmsc_uninitialize
|
||||
* Name: composite_uninitialize
|
||||
*
|
||||
* Description:
|
||||
* Un-initialize the USB composite driver. The handle is the USB composite
|
||||
@@ -846,14 +846,16 @@ errout_with_alloc:
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
void usbmsc_uninitialize(FAR void *handle)
|
||||
void composite_uninitialize(FAR void *handle)
|
||||
{
|
||||
FAR struct composite_dev_s *priv = (FAR struct composite_dev_s *)handle;
|
||||
FAR struct composite_alloc_s *alloc = (FAR struct composite_alloc_s *)handle;
|
||||
FAR struct composite_dev_s *priv;
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
DEBUGASSERT(alloc != NULL);
|
||||
|
||||
/* Uninitialize each of the member classes */
|
||||
|
||||
priv = &alloc->dev;
|
||||
if (priv->dev1)
|
||||
{
|
||||
DEV1_UNINITIALIZE(priv->dev1);
|
||||
@@ -868,9 +870,10 @@ void usbmsc_uninitialize(FAR void *handle)
|
||||
|
||||
/* Then unregister and destroy the composite class */
|
||||
|
||||
usbdev_unregister(&priv->drvr.drvr);
|
||||
usbdev_unregister(&alloc->drvr.drvr);
|
||||
|
||||
/* Free any resources used by the composite driver */
|
||||
/* None */
|
||||
|
||||
/* Then free the composite driver state structure itself */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user