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

Changeset 78dbf5b in mainline for uspace/drv/usbhid/usbhid.c


Ignore:
Timestamp:
2011-05-07T08:38:40Z (11 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master
Children:
fb295b6
Parents:
6c6a95d2 (diff), 45a2688 (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:

Fixes (parsing), mouse driver improved, generic HID driver improved

File:
1 edited

Legend:

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

    r6c6a95d2 r78dbf5b  
    6363static const int USB_HID_MAX_SUBDRIVERS = 10;
    6464
     65static fibril_local bool report_received;
     66
    6567/*----------------------------------------------------------------------------*/
    6668
     
    412414        }
    413415       
    414         // TODO: remove the mouse hack
    415         if (hid_dev->poll_pipe_index == USB_HID_MOUSE_POLL_EP_NO ||
    416             fallback) {
     416        if (fallback) {
    417417                // fall back to boot protocol
    418418                switch (hid_dev->poll_pipe_index) {
     
    509509                                free(input_old);
    510510                        }
     511                        usb_hid_new_report();
    511512                }
    512513        }
     
    589590/*----------------------------------------------------------------------------*/
    590591
     592void usb_hid_new_report(void)
     593{
     594        report_received = false;
     595}
     596
     597/*----------------------------------------------------------------------------*/
     598
     599void usb_hid_report_received(void)
     600{
     601        report_received = true;
     602}
     603
     604/*----------------------------------------------------------------------------*/
     605
     606bool usb_hid_report_ready(void)
     607{
     608        return !report_received;
     609}
     610
     611/*----------------------------------------------------------------------------*/
     612
    591613void usb_hid_free(usb_hid_dev_t **hid_dev)
    592614{
Note: See TracChangeset for help on using the changeset viewer.