Ignore:
File:
1 edited

Legend:

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

    rdd3eda2 r3facf63a  
    3939#include <errno.h>
    4040#include <str_error.h>
    41 #include <bool.h>
    4241
    4342#include <usbhid_iface.h>
     
    6564    size_t size, size_t *act_size, unsigned int flags);
    6665
    67 static int usb_generic_hid_client_connected(ddf_fun_t *fun);
    68 
    6966/*----------------------------------------------------------------------------*/
    7067
     
    7572
    7673static ddf_dev_ops_t usb_generic_hid_ops = {
    77         .interfaces[USBHID_DEV_IFACE] = &usb_generic_iface,
    78         .open = usb_generic_hid_client_connected
     74        .interfaces[USBHID_DEV_IFACE] = &usb_generic_iface
    7975};
    8076
     
    108104       
    109105        /*! @todo This should probably be atomic. */
    110         if (usb_hid_report_ready()) {
    111                 memcpy(buffer, hid_dev->input_report,
    112                     hid_dev->input_report_size);
    113                 *act_size = hid_dev->input_report_size;
    114                 usb_hid_report_received();
    115         }
     106        memcpy(buffer, hid_dev->input_report, hid_dev->input_report_size);
     107        *act_size = hid_dev->input_report_size;
    116108       
    117109        // clear the buffer so that it will not be received twice
    118         //memset(hid_dev->input_report, 0, hid_dev->input_report_size);
     110        memset(hid_dev->input_report, 0, hid_dev->input_report_size);
    119111       
    120         // note that we already received this report
    121 //      report_received = true;
    122        
    123         return EOK;
    124 }
    125 
    126 /*----------------------------------------------------------------------------*/
    127 
    128 static int usb_generic_hid_client_connected(ddf_fun_t *fun)
    129 {
    130         usb_hid_report_received();
    131112        return EOK;
    132113}
Note: See TracChangeset for help on using the changeset viewer.