mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
A little more USB host logic
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3178 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -134,7 +134,40 @@ struct usbhost_registry_s
|
||||
*/
|
||||
|
||||
uint8_t nids; /* Number of IDs in the id[] array */
|
||||
struct usbhost_id_s id[1]; /* Actual dimension is nids */
|
||||
const struct usbhost_id_s *id; /* An array of ID info. Actual dimension is nids */
|
||||
};
|
||||
|
||||
/* struct usbhost_class_s provides access from the USB host driver to the USB host
|
||||
* class implementation.
|
||||
*/
|
||||
|
||||
struct usbhost_class_s
|
||||
{
|
||||
/* Provides the configuration descripor to the class. The configuration
|
||||
* descriptor contains critical information needed by the class in order to
|
||||
* initialize properly (such as endpoint selections).
|
||||
*/
|
||||
|
||||
int (*configdesc)(struct usbhost_class_s *class, const uint8_t *confidesc, int desclen);
|
||||
};
|
||||
|
||||
/* struct usbhost_driver_s provides access to the USB host driver from the USB host
|
||||
* class implementation.
|
||||
*/
|
||||
|
||||
struct usbhost_driver_s
|
||||
{
|
||||
/* Receive a process a transfer descriptor */
|
||||
|
||||
int (*transfer)();
|
||||
|
||||
/* Enumerate the connected device */
|
||||
|
||||
int (*enumerate)();
|
||||
|
||||
/* Receive control information */
|
||||
|
||||
int (*rcvctrl)();
|
||||
};
|
||||
|
||||
/************************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user