Add a text for the new composite USB device

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4341 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2012-01-26 23:14:27 +00:00
parent 22a1b8dfe5
commit 23a8f1d218
18 changed files with 1886 additions and 21 deletions

View File

@@ -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 */