/* API provided by hid-core.c for USB HID drivers */ void usbhid_init_reports(struct hid_device *hid); struct usb_interface *usbhid_find_interface(int minor);
/* iofl flags */ #define HID_CTRL_RUNNING 1 #define HID_OUT_RUNNING 2 #define HID_IN_RUNNING 3 #define HID_RESET_PENDING 4 #define HID_SUSPENDED 5 #define HID_CLEAR_HALT 6 #define HID_DISCONNECTED 7 #define HID_STARTED 8 #define HID_KEYS_PRESSED 10 #define HID_NO_BANDWIDTH 11 #define HID_RESUME_RUNNING 12 /* * The device is opened, meaning there is a client that is interested * in data coming from the device.
*/ #define HID_OPENED 13 /* * We are polling input endpoint by [re]submitting IN URB, because * either HID device is opened or ALWAYS POLL quirk is set for the * device.
*/ #define HID_IN_POLLING 14
/* * USB-specific HID struct, to be pointed to * from struct hid_device->driver_data
*/
struct usbhid_device { struct hid_device *hid; /* pointer to corresponding HID dev */
struct usb_interface *intf; /* USB interface */ int ifnum; /* USB interface number */
struct urb *urbctrl; /* Control URB */ struct usb_ctrlrequest *cr; /* Control request struct */ struct hid_control_fifo ctrl[HID_CONTROL_FIFO_SIZE]; /* Control fifo */ unsignedchar ctrlhead, ctrltail; /* Control fifo head & tail */ char *ctrlbuf; /* Control buffer */
dma_addr_t ctrlbuf_dma; /* Control buffer dma */ unsignedlong last_ctrl; /* record of last output for timeouts */
struct urb *urbout; /* Output URB */ struct hid_output_fifo out[HID_CONTROL_FIFO_SIZE]; /* Output pipe fifo */ unsignedchar outhead, outtail; /* Output pipe fifo head & tail */ char *outbuf; /* Output buffer */
dma_addr_t outbuf_dma; /* Output buffer dma */ unsignedlong last_out; /* record of last output for timeouts */
struct mutex mutex; /* start/stop/open/close */
spinlock_t lock; /* fifo spinlock */ unsignedlong iofl; /* I/O flags (CTRL_RUNNING, OUT_RUNNING) */ struct timer_list io_retry; /* Retry timer */ unsignedlong stop_retry; /* Time to give up, in jiffies */ unsignedint retry_delay; /* Delay length in ms */ struct work_struct reset_work; /* Task context for resets */
wait_queue_head_t wait; /* For sleeping */
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.