.TH "usb_control_msg" 9 "usb_control_msg" "25 May 1998" "Kernel Hacker's Manual" LINUX .SH NAME usb_control_msg \- Builds a control urb, sends it off and waits for completion .SH SYNOPSIS .B "int" usb_control_msg .BI "(struct usb_device *" dev "," .BI "unsigned int " pipe "," .BI "__u8 " request "," .BI "__u8 " requesttype "," .BI "__u16 " value "," .BI "__u16 " index "," .BI "void *" data "," .BI "__u16 " size "," .BI "int " timeout ");" .SH ARGUMENTS .IP "dev" 12 pointer to the usb device to send the message to .IP "pipe" 12 endpoint "pipe" to send the message to .IP "request" 12 USB message request value .IP "requesttype" 12 USB message request type value .IP "value" 12 USB message value .IP "index" 12 USB message index value .IP "data" 12 pointer to the data to send .IP "size" 12 length in bytes of the data to send .IP "timeout" 12 time to wait for the message to complete before timing out (if 0 the wait is forever) .SH "DESCRIPTION" This function sends a simple control message to a specified endpoint and waits for the message to complete, or timeout. If successful, it returns the number of bytes transferred; otherwise, it returns a negative error number. Don't use this function from within an interrupt context, like a bottom half handler. If you need a asyncronous message, or need to send a message from within interrupt context, use \fBusb_submit_urb\fP