Changeset deb4ba7 in mainline for uspace/drv/usbmouse/mouse.h


Ignore:
Timestamp:
2011-03-13T21:39:46Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1b0b86e6, 92b41f33
Parents:
335382d (diff), adfe5ec (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Initial work on USB device driver framework

See messages in individual commits and discussion on
https://sourceforge.net/apps/trac/helenos-usb/ticket/85
for more details.

Only the mouse driver uses this framework.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbmouse/mouse.h

    r335382d rdeb4ba7  
    3737#define USBMOUSE_MOUSE_H_
    3838
    39 #include <ddf/driver.h>
     39#include <usb/devdrv.h>
    4040#include <usb/pipes.h>
    4141#include <time.h>
     
    4646typedef struct {
    4747        /** Generic device container. */
    48         ddf_dev_t *device;
     48        usb_device_t *dev;
    4949        /** Function representing the device. */
    5050        ddf_fun_t *mouse_fun;
    51         /** Representation of connection to the device. */
    52         usb_device_connection_t wire;
    53         /** Default (zero) control pipe. */
    54         usb_endpoint_pipe_t ctrl_pipe;
    55         /** Polling (in) pipe. */
    56         usb_endpoint_pipe_t poll_pipe;
    5751        /** Polling interval in microseconds. */
    5852        suseconds_t poll_interval_us;
     
    6155} usb_mouse_t;
    6256
    63 int usb_mouse_create(ddf_dev_t *);
     57#define POLL_PIPE(dev) ((dev)->pipes[0].pipe)
    6458
    65 int usb_mouse_polling_fibril(void *);
     59extern usb_endpoint_description_t poll_endpoint_description;
     60
     61int usb_mouse_create(usb_device_t *);
     62
     63bool usb_mouse_polling_callback(usb_device_t *, uint8_t *, size_t, void *);
     64void usb_mouse_polling_ended_callback(usb_device_t *, bool, void *);
    6665
    6766#endif
Note: See TracChangeset for help on using the changeset viewer.