1USB_INTERRUPT_MSG(9) USB Core APIs USB_INTERRUPT_MSG(9)
2
3
4
6 usb_interrupt_msg - Builds an interrupt urb, sends it off and waits for
7 completion
8
10 int usb_interrupt_msg(struct usb_device * usb_dev, unsigned int pipe,
11 void * data, int len, int * actual_length,
12 int timeout);
13
15 usb_dev
16 pointer to the usb device to send the message to
17
18 pipe
19 endpoint “pipe” to send the message to
20
21 data
22 pointer to the data to send
23
24 len
25 length in bytes of the data to send
26
27 actual_length
28 pointer to a location to put the actual length transferred in bytes
29
30 timeout
31 time in msecs to wait for the message to complete before timing out
32 (if 0 the wait is forever)
33
35 !in_interrupt ()
36
38 This function sends a simple interrupt message to a specified endpoint
39 and waits for the message to complete, or timeout.
40
41 If successful, it returns 0, otherwise a negative error number. The
42 number of actual bytes transferred will be stored in the actual_length
43 paramater.
44
45 Don't use this function from within an interrupt context, like a bottom
46 half handler. If you need an asynchronous message, or need to send a
47 message from within interrupt context, use usb_submit_urb If a thread
48 in your driver uses this call, make sure your disconnect method can
49 wait for it to complete. Since you don't have a handle on the URB used,
50 you can't cancel the request.
51
53Kernel Hackers Manual 2.6. November 2011 USB_INTERRUPT_MSG(9)