'\" t .\" Title: usb_get_status .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: USB Core APIs .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "USB_GET_STATUS" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "USB Core APIs" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" usb_get_status \- issues a GET_STATUS call .SH "SYNOPSIS" .HP \w'int\ usb_get_status('u .BI "int usb_get_status(struct\ usb_device\ *\ " "dev" ", int\ " "type" ", int\ " "target" ", void\ *\ " "data" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 the device whose status is being checked .RE .PP \fItype\fR .RS 4 USB_RECIP_*; for device, interface, or endpoint .RE .PP \fItarget\fR .RS 4 zero (for device), else interface or endpoint number .RE .PP \fIdata\fR .RS 4 pointer to two bytes of bitmap data .RE .SH "CONTEXT" .PP !in_interrupt () .SH "DESCRIPTION" .PP Returns device, interface, or endpoint status\&. Normally only of interest to see if the device is self powered, or has enabled the remote wakeup facility; or whether a bulk or interrupt endpoint is halted (\(lqstalled\(rq)\&. .PP Bits in these status bitmaps are set using the SET_FEATURE request, and cleared using the CLEAR_FEATURE request\&. The \fBusb_clear_halt\fR function should be used to clear halt (\(lqstall\(rq) status\&. .PP This call is synchronous, and may not be used in an interrupt context\&. .PP Returns 0 and the status value in *\fIdata\fR (in host byte order) on success, or else the status code from the underlying \fBusb_control_msg\fR call\&. .SH "COPYRIGHT" .br