Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 7bb8036 in mainline


Ignore:
Timestamp:
2011-05-06T13:01:27Z (11 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master
Children:
f8e549b
Parents:
04c1524
Message:

Mouse subdriver for generic mouse.

Location:
uspace/drv/usbhid
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/usbhid/subdrivers.c

    r04c1524 r7bb8036  
    3636#include "subdrivers.h"
    3737#include "usb/classes/hidut.h"
     38#include "usb/classes/hidpath.h"
    3839
    3940#include "lgtch-ultrax/lgtch-ultrax.h"
     41#include "mouse/mousedev.h"
    4042
    4143static usb_hid_subdriver_usage_t path_kbd[] = {
    4244        {USB_HIDUT_PAGE_KEYBOARD, 0},
     45        {0, 0}
     46};
     47
     48static usb_hid_subdriver_usage_t path_mouse[] = {
     49        {USB_HIDUT_PAGE_GENERIC_DESKTOP, USB_HIDUT_USAGE_GENERIC_DESKTOP_MOUSE},
     50        {USB_HIDUT_PAGE_GENERIC_DESKTOP,
     51         USB_HIDUT_USAGE_GENERIC_DESKTOP_POINTER},
     52        {0, 0}
     53};
     54
     55static usb_hid_subdriver_usage_t path_mouse2[] = {
     56        {USB_HIDUT_PAGE_GENERIC_DESKTOP, USB_HIDUT_USAGE_GENERIC_DESKTOP_X},
    4357        {0, 0}
    4458};
     
    7993                }
    8094        },
     95        {
     96                path_mouse,
     97                -1,
     98                USB_HID_PATH_COMPARE_COLLECTION_ONLY,
     99                -1,
     100                -1,
     101                {
     102                        .init = usb_mouse_init,
     103                        .deinit = usb_mouse_deinit,
     104                        .poll = usb_mouse_polling_callback,
     105                        .poll_end = NULL
     106                }
     107        },
     108        {
     109                path_mouse2,
     110                -1,
     111                USB_HID_PATH_COMPARE_END
     112                | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY,
     113                -1,
     114                -1,
     115                {
     116                        .init = usb_mouse_init,
     117                        .deinit = usb_mouse_deinit,
     118                        .poll = usb_mouse_polling_callback,
     119                        .poll_end = NULL
     120                }
     121        },
    81122        {NULL, -1, 0, -1, -1, {NULL, NULL, NULL, NULL}}
    82123};
  • uspace/drv/usbhid/usbhid.c

    r04c1524 r7bb8036  
    415415       
    416416        // TODO: remove the mouse hack
    417         if (hid_dev->poll_pipe_index == USB_HID_MOUSE_POLL_EP_NO ||
    418             fallback) {
     417        if (fallback) {
    419418                // fall back to boot protocol
    420419                switch (hid_dev->poll_pipe_index) {
Note: See TracChangeset for help on using the changeset viewer.