Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/usbhid/usbhid.h

    rf317490 r5f6e25e  
    102102        /** Structure holding generic USB device information. */
    103103        usb_device_t *usb_dev;
    104 
     104       
    105105        /** Index of the polling pipe in usb_hid_endpoints array. */
    106         unsigned poll_pipe_index;
    107 
     106        int poll_pipe_index;
     107       
    108108        /** Subdrivers. */
    109109        usb_hid_subdriver_t *subdrivers;
    110 
     110       
    111111        /** Number of subdrivers. */
    112         unsigned subdriver_count;
    113 
     112        int subdriver_count;
     113       
    114114        /** Report descriptor. */
    115115        uint8_t *report_desc;
     
    117117        /** Report descriptor size. */
    118118        size_t report_desc_size;
    119 
     119       
    120120        /** HID Report parser. */
    121         usb_hid_report_t report;
    122 
     121        usb_hid_report_t *report;
     122       
    123123        uint8_t report_id;
    124 
     124       
    125125        uint8_t *input_report;
    126 
     126       
    127127        size_t input_report_size;
    128128        size_t max_input_report_size;
    129 
     129       
    130130        int report_nr;
    131         volatile bool running;
    132131};
    133132
     
    141140};
    142141
    143 extern const usb_endpoint_description_t *usb_hid_endpoints[];
     142usb_endpoint_description_t *usb_hid_endpoints[USB_HID_POLL_EP_COUNT + 1];
    144143
    145144/*----------------------------------------------------------------------------*/
    146145
     146usb_hid_dev_t *usb_hid_new(void);
     147
    147148int usb_hid_init(usb_hid_dev_t *hid_dev, usb_device_t *dev);
    148149
    149 void usb_hid_deinit(usb_hid_dev_t *hid_dev);
     150bool usb_hid_polling_callback(usb_device_t *dev, uint8_t *buffer,
     151    size_t buffer_size, void *arg);
    150152
    151 bool usb_hid_polling_callback(usb_device_t *dev,
    152     uint8_t *buffer, size_t buffer_size, void *arg);
    153 
    154 void usb_hid_polling_ended_callback(usb_device_t *dev, bool reason, void *arg);
     153void usb_hid_polling_ended_callback(usb_device_t *dev, bool reason,
     154     void *arg);
    155155
    156156void usb_hid_new_report(usb_hid_dev_t *hid_dev);
    157157
    158 int usb_hid_report_number(const usb_hid_dev_t *hid_dev);
     158int usb_hid_report_number(usb_hid_dev_t *hid_dev);
     159
     160void usb_hid_destroy(usb_hid_dev_t *hid_dev);
    159161
    160162#endif /* USB_HID_USBHID_H_ */
Note: See TracChangeset for help on using the changeset viewer.