mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
A little more USB host logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3179 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
* Name: CLASS_CREATE
|
||||
*
|
||||
* Description:
|
||||
* This macro will call the create() method of struct usb_registry_s. The create()
|
||||
* This macro will call the create() method of struct usbhost_registry_s. The create()
|
||||
* method is a callback into the class implementation. It is used to (1) create
|
||||
* a new instance of the USB host class state and to (2) bind a USB host driver
|
||||
* "session" to the class instance. Use of this create() method will support
|
||||
@@ -83,7 +83,29 @@
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#definei CLASS_CREATE(reg, drvr, id) (reg->create(drvr))
|
||||
#define CLASS_CREATE(reg, drvr, id) (reg->create(drvr))
|
||||
|
||||
/************************************************************************************
|
||||
* Name: CLASS_CONFIGDESC
|
||||
*
|
||||
* Description:
|
||||
* This macro will call the configdesc() method of struct usbhost_class_s. This
|
||||
* method is a callback into the class implementation. It is used to provide the
|
||||
* device's configuration descriptor to the class so that the class may initialize
|
||||
* properly
|
||||
*
|
||||
* Input Parameters:
|
||||
* class - The USB host class entry previously obtained from a call to create().
|
||||
* configdesc - A pointer to a uint8_t buffer container the configuration descripor.
|
||||
* desclen - The length in bytes of the configuration descriptor.
|
||||
*
|
||||
* Returned Values:
|
||||
* On success, zero (OK) is returned. On a failure, a negated errno value is
|
||||
* returned indicating the nature of the failure
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
#definei CLASS_CONFIGDESC(class, configdesc, desclen) (class->create(class, configdesc, desclen))
|
||||
|
||||
/************************************************************************************
|
||||
* Public Types
|
||||
|
||||
Reference in New Issue
Block a user