Changeset 69334af in mainline for uspace/lib/usb/include/usb/devdrv.h


Ignore:
Timestamp:
2011-03-13T17:18:55Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4bf94df
Parents:
489c3e7
Message:

Replace asserts with proper checks

Also, added doxygen comments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usb/include/usb/devdrv.h

    r489c3e7 r69334af  
    3838#include <usb/pipes.h>
    3939
     40/** USB device structure. */
    4041typedef struct {
     42        /** The default control pipe. */
    4143        usb_endpoint_pipe_t ctrl_pipe;
     44        /** Other endpoint pipes.
     45         * This is an array of other endpoint pipes in the same order as
     46         * in usb_driver_t.
     47         */
    4248        usb_endpoint_mapping_t *pipes;
     49        /** Generic DDF device backing this one. */
    4350        ddf_dev_t *ddf_dev;
     51        /** Custom driver data.
     52         * Do not use the entry in generic device, that is already used
     53         * by the framework.
     54         */
    4455        void *driver_data;
     56
     57        /** Connection backing the pipes.
     58         * Typically, you will not need to use this attribute at all.
     59         */
    4560        usb_device_connection_t wire;
    4661} usb_device_t;
    4762
     63/** USB driver ops. */
    4864typedef struct {
     65        /** Callback when new device is about to be controlled by the driver. */
    4966        int (*add_device)(usb_device_t *);
    5067} usb_driver_ops_t;
    5168
     69/** USB driver structure. */
    5270typedef struct {
     71        /** Driver name.
     72         * This name is copied to the generic driver name and must be exactly
     73         * the same as the directory name where the driver executable resides.
     74         */
    5375        const char *name;
     76        /** Expected endpoints description. */
    5477        usb_endpoint_description_t **endpoints;
     78        /** Driver ops. */
    5579        usb_driver_ops_t *ops;
    5680} usb_driver_t;
Note: See TracChangeset for help on using the changeset viewer.