\hypertarget{usbhid_8c_source}{}\doxysection{usbhid.\+c}
\label{usbhid_8c_source}\index{dev/usb/input/usbhid.c@{dev/usb/input/usbhid.c}}
\mbox{\hyperlink{usbhid_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/NetBSD}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 1998 The NetBSD Foundation, Inc.}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2019 Vladimir Kondratyev <wulf@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00007}00007 \textcolor{comment}{ * This code is derived from software contributed to The NetBSD Foundation}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00008}00008 \textcolor{comment}{ * by Lennart Augustsson (lennart@augustsson.net) at}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00009}00009 \textcolor{comment}{ * Carlstedt Research \& Technology.}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00011}00011 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00012}00012 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00013}00013 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00014}00014 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00015}00015 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00016}00016 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00017}00017 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00018}00018 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00019}00019 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00020}00020 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00021}00021 \textcolor{comment}{ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00022}00022 \textcolor{comment}{ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00023}00023 \textcolor{comment}{ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00024}00024 \textcolor{comment}{ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00025}00025 \textcolor{comment}{ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00026}00026 \textcolor{comment}{ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00027}00027 \textcolor{comment}{ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00028}00028 \textcolor{comment}{ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00029}00029 \textcolor{comment}{ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00030}00030 \textcolor{comment}{ * POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00031}00031 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00032}00032 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00033}00033 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00034}\mbox{\hyperlink{usbhid_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00034}} \mbox{\hyperlink{usbhid_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00036}00036 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00037}00037 \textcolor{comment}{ * HID spec: https://www.usb.org/sites/default/files/documents/hid1\_11.pdf}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00038}00038 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00039}00039 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/stdint.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/stddef.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/sx.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <sys/callout.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <sys/conf.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <sys/fcntl.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <dev/evdev/input.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00062}00062 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <dev/hid/hid.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00064}00064 \textcolor{preprocessor}{\#include <dev/hid/hidquirk.h>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00067}00067 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi__util_8h}{dev/usb/usbdi\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00069}00069 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbhid_8h}{dev/usb/usbhid.h}}>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00070}00070 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__core_8h}{dev/usb/usb\_core.h}}>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00071}00071 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__ioctl_8h}{dev/usb/usb\_ioctl.h}}>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00072}00072 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__util_8h}{dev/usb/usb\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00074}\mbox{\hyperlink{usbhid_8c_a927dd6f59caf10a2991dfb564bcbb1e1}{00074}} \textcolor{preprocessor}{\#define USB\_DEBUG\_VAR usbhid\_debug}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00075}00075 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__debug_8h}{dev/usb/usb\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00076}00076 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00077}00077 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__quirk_8h}{dev/usb/quirk/usb\_quirk.h}}>}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00078}00078 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00079}00079 \textcolor{preprocessor}{\#include "{}hid\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00081}\mbox{\hyperlink{usbhid_8c_a373997f3b64d59df22ab845be497f7f7}{00081}} \textcolor{keyword}{static} \mbox{\hyperlink{usbhid_8c_a373997f3b64d59df22ab845be497f7f7}{SYSCTL\_NODE}}(\_hw\_usb, OID\_AUTO, usbhid, CTLFLAG\_RW, 0, \textcolor{stringliteral}{"{}USB usbhid"{}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00082}\mbox{\hyperlink{usbhid_8c_a98c65d11b411fd971605f9e448d67d0b}{00082}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{usbhid_8c_a98c65d11b411fd971605f9e448d67d0b}{usbhid\_enable}} = 0;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00083}\mbox{\hyperlink{usbhid_8c_a71bc0462d77524e3aa32432230e2db70}{00083}} \mbox{\hyperlink{usbhid_8c_a71bc0462d77524e3aa32432230e2db70}{SYSCTL\_INT}}(\_hw\_usb\_usbhid, OID\_AUTO, enable, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00084}00084     \&\mbox{\hyperlink{usbhid_8c_a98c65d11b411fd971605f9e448d67d0b}{usbhid\_enable}}, 0, \textcolor{stringliteral}{"{}Enable usbhid and prefer it to other USB HID drivers"{}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00085}00085 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00086}00086 \textcolor{keyword}{static} \textcolor{keywordtype}{int} usbhid\_debug = 0;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00087}00087 \mbox{\hyperlink{usbhid_8c_a71bc0462d77524e3aa32432230e2db70}{SYSCTL\_INT}}(\_hw\_usb\_usbhid, OID\_AUTO, \mbox{\hyperlink{cfumass_8c_ac3e1795766a80ec63b157951b4b9a7d4}{debug}}, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00088}00088     \&usbhid\_debug, 0, \textcolor{stringliteral}{"{}Debug level"{}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00089}00089 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00091}00091 \textcolor{comment}{/* Second set of USB transfers for polling mode */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00092}\mbox{\hyperlink{usbhid_8c_a1ec8916ee2171ea5577d0863ed408e51}{00092}} \textcolor{preprocessor}{\#define POLL\_XFER(xfer) ((xfer) + USBHID\_N\_TRANSFER)}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00093}00093 \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00094}\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ead7bda12e507ac9afa9e23cae11b3b15a}{00094}}         \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ead7bda12e507ac9afa9e23cae11b3b15a}{USBHID\_INTR\_OUT\_DT}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00095}\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{00095}}         \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00096}\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{00096}}         \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{USBHID\_CTRL\_DT}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00097}\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9eaeb5ae114f6baaa7a35fe7fa3fb7a3452}{00097}}         \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9eaeb5ae114f6baaa7a35fe7fa3fb7a3452}{USBHID\_N\_TRANSFER}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00098}00098 \};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00099}00099 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00100}00100 \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__xfer__ctx}{usbhid\_xfer\_ctx}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00101}\mbox{\hyperlink{usbhid_8c_a88a72b688810c0231e514ee02c9aa33b}{00101}} \textcolor{keyword}{typedef} \textcolor{keywordtype}{int} \mbox{\hyperlink{usbhid_8c_a88a72b688810c0231e514ee02c9aa33b}{usbhid\_callback\_t}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusbhid__xfer__ctx}{usbhid\_xfer\_ctx}} *xfer\_ctx);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00102}00102 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00103}\mbox{\hyperlink{unionusbhid__device__request}{00103}} \textcolor{keyword}{union }\mbox{\hyperlink{unionusbhid__device__request}{usbhid\_device\_request}} \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00104}00104         \textcolor{keyword}{struct }\{                        \textcolor{comment}{/* INTR xfers */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00105}\mbox{\hyperlink{unionusbhid__device__request_a162efc03ea7a4ea289392a7546ea0d4e}{00105}}                 uint16\_t \mbox{\hyperlink{unionusbhid__device__request_a162efc03ea7a4ea289392a7546ea0d4e}{maxlen}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00106}\mbox{\hyperlink{unionusbhid__device__request_a51a037fa99de521a2cb94e0e376e51a5}{00106}}                 uint16\_t \mbox{\hyperlink{unionusbhid__device__request_a51a037fa99de521a2cb94e0e376e51a5}{actlen}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00107}\mbox{\hyperlink{unionusbhid__device__request_afc4bce9c638b880f988718a314b86bfc}{00107}}         \} \mbox{\hyperlink{unionusbhid__device__request_afc4bce9c638b880f988718a314b86bfc}{intr}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00108}\mbox{\hyperlink{unionusbhid__device__request_a67660f758b0581d77beb5035effcbf01}{00108}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{unionusbhid__device__request_a67660f758b0581d77beb5035effcbf01}{ctrl}};   \textcolor{comment}{/* CTRL xfers */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00109}00109 \};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00111}00111 \textcolor{comment}{/* Syncronous USB transfer context */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00112}\mbox{\hyperlink{structusbhid__xfer__ctx}{00112}} \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__xfer__ctx}{usbhid\_xfer\_ctx}} \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00113}\mbox{\hyperlink{structusbhid__xfer__ctx_a89f1437a167f222046bce31f7c71299b}{00113}}         \textcolor{keyword}{union }\mbox{\hyperlink{unionusbhid__device__request}{usbhid\_device\_request}} \mbox{\hyperlink{structusbhid__xfer__ctx_a89f1437a167f222046bce31f7c71299b}{req}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00114}\mbox{\hyperlink{structusbhid__xfer__ctx_a38b61332911c1cb98363b7b8e9de316a}{00114}}         uint8\_t *\mbox{\hyperlink{structusbhid__xfer__ctx_a38b61332911c1cb98363b7b8e9de316a}{buf}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00115}\mbox{\hyperlink{structusbhid__xfer__ctx_a9f030076e6c340fd4aaeae0330d3f74d}{00115}}         \textcolor{keywordtype}{int} \mbox{\hyperlink{structusbhid__xfer__ctx_a9f030076e6c340fd4aaeae0330d3f74d}{error}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00116}\mbox{\hyperlink{structusbhid__xfer__ctx_ab52d4e505fe5ca984ef72c209359e146}{00116}}         \mbox{\hyperlink{usbhid_8c_a88a72b688810c0231e514ee02c9aa33b}{usbhid\_callback\_t}} *\mbox{\hyperlink{structusbhid__xfer__ctx_ab52d4e505fe5ca984ef72c209359e146}{cb}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00117}\mbox{\hyperlink{structusbhid__xfer__ctx_aee1ae689ad7236c538c4c4edc4ca6a84}{00117}}         \textcolor{keywordtype}{void} *\mbox{\hyperlink{structusbhid__xfer__ctx_aee1ae689ad7236c538c4c4edc4ca6a84}{cb\_ctx}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00118}\mbox{\hyperlink{structusbhid__xfer__ctx_ac024e26df9e9af0c177efb4b1ddf3013}{00118}}         \textcolor{keywordtype}{int} \mbox{\hyperlink{structusbhid__xfer__ctx_ac024e26df9e9af0c177efb4b1ddf3013}{waiters}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00119}\mbox{\hyperlink{structusbhid__xfer__ctx_a6c156cea8a7f92663330e9e202913df7}{00119}}         \textcolor{keywordtype}{bool} \mbox{\hyperlink{structusbhid__xfer__ctx_a6c156cea8a7f92663330e9e202913df7}{influx}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00120}00120 \};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00121}00121 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00122}\mbox{\hyperlink{structusbhid__softc}{00122}} \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}} \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00123}\mbox{\hyperlink{structusbhid__softc_a3c9e9986b34148cc26cdd304746982d1}{00123}}         hid\_intr\_t *\mbox{\hyperlink{structusbhid__softc_a3c9e9986b34148cc26cdd304746982d1}{sc\_intr\_handler}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00124}\mbox{\hyperlink{structusbhid__softc_a045f83fc956ac7d0f92ee5bd4f2e4264}{00124}}         \textcolor{keywordtype}{void} *\mbox{\hyperlink{structusbhid__softc_a045f83fc956ac7d0f92ee5bd4f2e4264}{sc\_intr\_ctx}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00125}\mbox{\hyperlink{structusbhid__softc_a2e9ae753363b802d984760b95970cb45}{00125}}         \textcolor{keywordtype}{void} *\mbox{\hyperlink{structusbhid__softc_a2e9ae753363b802d984760b95970cb45}{sc\_intr\_buf}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00126}00126 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00127}\mbox{\hyperlink{structusbhid__softc_aa865192c482696e3340922ec7e6caa88}{00127}}         \textcolor{keyword}{struct }hid\_device\_info \mbox{\hyperlink{structusbhid__softc_aa865192c482696e3340922ec7e6caa88}{sc\_hw}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00128}00128 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00129}\mbox{\hyperlink{structusbhid__softc_a921ea94c41a1616e79fc7ac95b5afaae}{00129}}         \textcolor{keyword}{struct }mtx \mbox{\hyperlink{structusbhid__softc_a921ea94c41a1616e79fc7ac95b5afaae}{sc\_mtx}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00130}\mbox{\hyperlink{structusbhid__softc_ad3530c7f1914705542d6ab5a29e2d3c6}{00130}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} \mbox{\hyperlink{structusbhid__softc_ad3530c7f1914705542d6ab5a29e2d3c6}{sc\_config}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9eaeb5ae114f6baaa7a35fe7fa3fb7a3452}{USBHID\_N\_TRANSFER}}];}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00131}\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{00131}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a1ec8916ee2171ea5577d0863ed408e51}{POLL\_XFER}}(\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9eaeb5ae114f6baaa7a35fe7fa3fb7a3452}{USBHID\_N\_TRANSFER}})];}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00132}\mbox{\hyperlink{structusbhid__softc_aaeb021debdf21b0746a2bd95b1c86786}{00132}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__xfer__ctx}{usbhid\_xfer\_ctx}} \mbox{\hyperlink{structusbhid__softc_aaeb021debdf21b0746a2bd95b1c86786}{sc\_xfer\_ctx}}[\mbox{\hyperlink{usbhid_8c_a1ec8916ee2171ea5577d0863ed408e51}{POLL\_XFER}}(\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9eaeb5ae114f6baaa7a35fe7fa3fb7a3452}{USBHID\_N\_TRANSFER}})];}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00133}\mbox{\hyperlink{structusbhid__softc_ab34e8638afcb20de1a71e14650bdacae}{00133}}         \textcolor{keywordtype}{bool} \mbox{\hyperlink{structusbhid__softc_ab34e8638afcb20de1a71e14650bdacae}{sc\_can\_poll}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00134}00134 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00135}\mbox{\hyperlink{structusbhid__softc_ae6a30acc0ccb69f1d292d9536836e067}{00135}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device}{usb\_device}} *\mbox{\hyperlink{structusbhid__softc_ae6a30acc0ccb69f1d292d9536836e067}{sc\_udev}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00136}\mbox{\hyperlink{structusbhid__softc_a9e94790adf6b6689f9197b11c90c927b}{00136}}         uint8\_t \mbox{\hyperlink{structusbhid__softc_a9e94790adf6b6689f9197b11c90c927b}{sc\_iface\_no}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00137}\mbox{\hyperlink{structusbhid__softc_a49559585283b60e7cba1bde58b230def}{00137}}         uint8\_t \mbox{\hyperlink{structusbhid__softc_a49559585283b60e7cba1bde58b230def}{sc\_iface\_index}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00138}00138 \};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00139}00139 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00140}00140 \textcolor{comment}{/* prototypes */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00141}00141 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00142}\mbox{\hyperlink{usbhid_8c_abf5305e5e2bc4e02a1e5c8e3b710fdd1}{00142}} \textcolor{keyword}{static} device\_probe\_t \mbox{\hyperlink{usbhid_8c_abf5305e5e2bc4e02a1e5c8e3b710fdd1}{usbhid\_probe}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00143}\mbox{\hyperlink{usbhid_8c_a900f97bcd59540ff3d7932da8340337a}{00143}} \textcolor{keyword}{static} device\_attach\_t \mbox{\hyperlink{usbhid_8c_a900f97bcd59540ff3d7932da8340337a}{usbhid\_attach}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00144}\mbox{\hyperlink{usbhid_8c_a55f7d20c3209fe2f82dff1e69284df81}{00144}} \textcolor{keyword}{static} device\_detach\_t \mbox{\hyperlink{usbhid_8c_a55f7d20c3209fe2f82dff1e69284df81}{usbhid\_detach}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00146}\mbox{\hyperlink{usbhid_8c_a3bd231b016091d2b0ce94225795ad79a}{00146}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{usbhid_8c_a3bd231b016091d2b0ce94225795ad79a}{usbhid\_intr\_out\_callback}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00147}\mbox{\hyperlink{usbhid_8c_a48cd8136bac5eb66bc84c3858109d1f7}{00147}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{usbhid_8c_a48cd8136bac5eb66bc84c3858109d1f7}{usbhid\_intr\_in\_callback}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00148}\mbox{\hyperlink{usbhid_8c_a714375d21100154ce0f8cf2326bebeb5}{00148}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{usbhid_8c_a714375d21100154ce0f8cf2326bebeb5}{usbhid\_ctrl\_callback}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00149}00149 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00150}\mbox{\hyperlink{usbhid_8c_a9353d02582e3a820b59217da776de285}{00150}} \textcolor{keyword}{static} \mbox{\hyperlink{usbhid_8c_a88a72b688810c0231e514ee02c9aa33b}{usbhid\_callback\_t}} \mbox{\hyperlink{usbhid_8c_a9353d02582e3a820b59217da776de285}{usbhid\_intr\_handler\_cb}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00151}\mbox{\hyperlink{usbhid_8c_a3d923d310d2da1df22a67f2779b64289}{00151}} \textcolor{keyword}{static} \mbox{\hyperlink{usbhid_8c_a88a72b688810c0231e514ee02c9aa33b}{usbhid\_callback\_t}} \mbox{\hyperlink{usbhid_8c_a3d923d310d2da1df22a67f2779b64289}{usbhid\_sync\_wakeup\_cb}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00153}00153 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00154}\mbox{\hyperlink{usbhid_8c_ac089182e7052b5902b635f04b2384895}{00154}} \mbox{\hyperlink{usbhid_8c_a3bd231b016091d2b0ce94225795ad79a}{usbhid\_intr\_out\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00155}00155 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00156}00156         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__xfer__ctx}{usbhid\_xfer\_ctx}} *xfer\_ctx = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00157}00157         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00158}00158         \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00159}00159 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00160}00160         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00161}00161         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00162}00162         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00163}00163 tr\_setup:}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00164}00164                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a89f1437a167f222046bce31f7c71299b}{req}}.\mbox{\hyperlink{unionusbhid__device__request_afc4bce9c638b880f988718a314b86bfc}{intr}}.\mbox{\hyperlink{unionusbhid__device__request_a162efc03ea7a4ea289392a7546ea0d4e}{maxlen}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00165}00165                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} == 0) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00166}00166                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__freebsd_8h_ae4dbc653d4ae9493b40a9485fc0ecf23}{USB\_IN\_POLLING\_MODE\_FUNC}}())}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00167}00167                                 xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a9f030076e6c340fd4aaeae0330d3f74d}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00168}00168                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00169}00169                 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00170}00170                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00171}00171                 \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, 0, xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a38b61332911c1cb98363b7b8e9de316a}{buf}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00172}00172                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00173}00173                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00174}00174                 xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a89f1437a167f222046bce31f7c71299b}{req}}.\mbox{\hyperlink{unionusbhid__device__request_afc4bce9c638b880f988718a314b86bfc}{intr}}.\mbox{\hyperlink{unionusbhid__device__request_a162efc03ea7a4ea289392a7546ea0d4e}{maxlen}} = 0;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00175}00175                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__freebsd_8h_ae4dbc653d4ae9493b40a9485fc0ecf23}{USB\_IN\_POLLING\_MODE\_FUNC}}())}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00176}00176                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00177}00177                 xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a9f030076e6c340fd4aaeae0330d3f74d}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00178}00178                 \textcolor{keywordflow}{goto} tr\_exit;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00180}00180         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00181}00181                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00182}00182                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00183}00183                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00184}00184                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00185}00185                 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00186}00186                 xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a9f030076e6c340fd4aaeae0330d3f74d}{error}} = EIO;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00187}00187 tr\_exit:}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00188}00188                 (void)xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_ab52d4e505fe5ca984ef72c209359e146}{cb}}(xfer\_ctx);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00189}00189                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00190}00190         \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00191}00191 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00192}00192 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00193}00193 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00194}\mbox{\hyperlink{usbhid_8c_abda2f3c5d8a44269fed8f340f2857d8d}{00194}} \mbox{\hyperlink{usbhid_8c_a48cd8136bac5eb66bc84c3858109d1f7}{usbhid\_intr\_in\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00195}00195 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00196}00196         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__xfer__ctx}{usbhid\_xfer\_ctx}} *xfer\_ctx = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00197}00197         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00198}00198         \textcolor{keywordtype}{int} actlen;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00199}00199 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00200}00200         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00201}00201         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00202}00202                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}transferred!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00203}00203 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00204}00204                 \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&actlen, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00205}00205                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00206}00206                 \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, 0, xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a38b61332911c1cb98363b7b8e9de316a}{buf}}, actlen);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00207}00207                 xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a89f1437a167f222046bce31f7c71299b}{req}}.\mbox{\hyperlink{unionusbhid__device__request_afc4bce9c638b880f988718a314b86bfc}{intr}}.\mbox{\hyperlink{unionusbhid__device__request_a51a037fa99de521a2cb94e0e376e51a5}{actlen}} = actlen;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00208}00208                 \textcolor{keywordflow}{if} (xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_ab52d4e505fe5ca984ef72c209359e146}{cb}}(xfer\_ctx) != 0)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00209}00209                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00211}00211         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00212}00212 re\_submit:}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00213}00213                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a89f1437a167f222046bce31f7c71299b}{req}}.\mbox{\hyperlink{unionusbhid__device__request_afc4bce9c638b880f988718a314b86bfc}{intr}}.\mbox{\hyperlink{unionusbhid__device__request_a162efc03ea7a4ea289392a7546ea0d4e}{maxlen}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00214}00214                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00215}00215                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00216}00216 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00217}00217         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00218}00218                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00219}00219                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00220}00220                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00221}00221                         \textcolor{keywordflow}{goto} re\_submit;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00222}00222                 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00223}00223                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00224}00224         \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00225}00225 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00226}00226 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00227}00227 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00228}\mbox{\hyperlink{usbhid_8c_a5f52ad4eb32ab213b4d86714cc39ca4f}{00228}} \mbox{\hyperlink{usbhid_8c_a714375d21100154ce0f8cf2326bebeb5}{usbhid\_ctrl\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00229}00229 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00230}00230         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__xfer__ctx}{usbhid\_xfer\_ctx}} *xfer\_ctx = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00231}00231         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} *\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}} = \&xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a89f1437a167f222046bce31f7c71299b}{req}}.\mbox{\hyperlink{unionusbhid__device__request_a67660f758b0581d77beb5035effcbf01}{ctrl}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00232}00232         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00233}00233         \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>wLength);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00234}00234         \textcolor{keywordtype}{bool} is\_rd = (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bmRequestType \& \mbox{\hyperlink{usb_8h_af5074f22163b18c7987cd3ef324cd4e0}{UT\_READ}}) != 0;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00235}00235 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00236}00236         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00237}00237         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00238}00238                 \textcolor{keywordflow}{if} (!is\_rd \&\& \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} != 0) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00239}00239                         pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 1);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00240}00240                         \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, 0, xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a38b61332911c1cb98363b7b8e9de316a}{buf}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00241}00241                 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00243}00243                 pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00244}00244                 \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc, 0, \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \textcolor{keyword}{sizeof}(*\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00245}00245                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, \textcolor{keyword}{sizeof}(*\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00246}00246                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} != 0)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00247}00247                         \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 1, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00248}00248                 \mbox{\hyperlink{usb__transfer_8c_a10f82b008c3a5311e5210e44beaca014}{usbd\_xfer\_set\_frames}}(xfer, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} != 0 ? 2 : 1);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00249}00249                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00250}00250                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00251}00251 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00252}00252         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00253}00253                 \textcolor{keywordflow}{if} (is\_rd \&\& \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} != 0) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00254}00254                         pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00255}00255                         \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, \textcolor{keyword}{sizeof}(*\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}), xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a38b61332911c1cb98363b7b8e9de316a}{buf}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00256}00256                 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00257}00257                 xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a9f030076e6c340fd4aaeae0330d3f74d}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00258}00258                 \textcolor{keywordflow}{goto} tr\_exit;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00259}00259 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00260}00260         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00261}00261                 \textcolor{comment}{/* bomb out */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00262}00262                 DPRINTFN(1, \textcolor{stringliteral}{"{}error=\%s\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00263}00263                 xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a9f030076e6c340fd4aaeae0330d3f74d}{error}} = EIO;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00264}00264 tr\_exit:}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00265}00265                 (void)xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_ab52d4e505fe5ca984ef72c209359e146}{cb}}(xfer\_ctx);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00266}00266                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00267}00267         \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00268}00268 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00269}00269 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00270}00270 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00271}\mbox{\hyperlink{usbhid_8c_af7b36f9d5561df3467654dc419f67959}{00271}} \mbox{\hyperlink{usbhid_8c_a9353d02582e3a820b59217da776de285}{usbhid\_intr\_handler\_cb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusbhid__xfer__ctx}{usbhid\_xfer\_ctx}} *xfer\_ctx)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00272}00272 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00273}00273         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}} *sc = xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_aee1ae689ad7236c538c4c4edc4ca6a84}{cb\_ctx}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00274}00274 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00275}00275         sc-\/>\mbox{\hyperlink{structusbhid__softc_a3c9e9986b34148cc26cdd304746982d1}{sc\_intr\_handler}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a045f83fc956ac7d0f92ee5bd4f2e4264}{sc\_intr\_ctx}}, xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a38b61332911c1cb98363b7b8e9de316a}{buf}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00276}00276             xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a89f1437a167f222046bce31f7c71299b}{req}}.\mbox{\hyperlink{unionusbhid__device__request_afc4bce9c638b880f988718a314b86bfc}{intr}}.\mbox{\hyperlink{unionusbhid__device__request_a51a037fa99de521a2cb94e0e376e51a5}{actlen}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00277}00277 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00278}00278         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00279}00279 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00280}00280 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00281}00281 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00282}\mbox{\hyperlink{usbhid_8c_a84dbdf2985c8afe18fccee987e73e2a1}{00282}} \mbox{\hyperlink{usbhid_8c_a3d923d310d2da1df22a67f2779b64289}{usbhid\_sync\_wakeup\_cb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusbhid__xfer__ctx}{usbhid\_xfer\_ctx}} *xfer\_ctx)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00283}00283 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00284}00284 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00285}00285         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{usb__freebsd_8h_ae4dbc653d4ae9493b40a9485fc0ecf23}{USB\_IN\_POLLING\_MODE\_FUNC}}())}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00286}00286                 wakeup(xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_aee1ae689ad7236c538c4c4edc4ca6a84}{cb\_ctx}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00287}00287 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00288}00288         \textcolor{keywordflow}{return} (ECANCELED);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00289}00289 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00290}00290 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00291}\mbox{\hyperlink{usbhid_8c_aab749bd3dec9ee2e252e6bf4d5464ccb}{00291}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} \mbox{\hyperlink{usbhid_8c_aab749bd3dec9ee2e252e6bf4d5464ccb}{usbhid\_config}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9eaeb5ae114f6baaa7a35fe7fa3fb7a3452}{USBHID\_N\_TRANSFER}}] = \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00292}00292 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00293}00293         [\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ead7bda12e507ac9afa9e23cae11b3b15a}{USBHID\_INTR\_OUT\_DT}}] = \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00294}00294                 .\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} = \mbox{\hyperlink{usb_8h_a01e28e87ad16f6dfffefc6ccab08baed}{UE\_INTERRUPT}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00295}00295                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00296}00296                 .direction = \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00297}00297                 .flags = \{.pipe\_bof = 1,.proxy\_buffer = 1\},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00298}00298                 .callback = \&\mbox{\hyperlink{usbhid_8c_a3bd231b016091d2b0ce94225795ad79a}{usbhid\_intr\_out\_callback}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00299}00299         \},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00300}00300         [\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}] = \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00301}00301                 .type = \mbox{\hyperlink{usb_8h_a01e28e87ad16f6dfffefc6ccab08baed}{UE\_INTERRUPT}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00302}00302                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00303}00303                 .direction = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00304}00304                 .flags = \{.pipe\_bof = 1,.short\_xfer\_ok = 1,.proxy\_buffer = 1\},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00305}00305                 .callback = \&\mbox{\hyperlink{usbhid_8c_a48cd8136bac5eb66bc84c3858109d1f7}{usbhid\_intr\_in\_callback}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00306}00306         \},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00307}00307         [\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{USBHID\_CTRL\_DT}}] = \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00308}00308                 .type = \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00309}00309                 .endpoint = 0x00,       \textcolor{comment}{/* Control pipe */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00310}00310                 .direction = \mbox{\hyperlink{usb_8h_a0b305068483ac39f5d34f848bcb95c11}{UE\_DIR\_ANY}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00311}00311                 .flags = \{.proxy\_buffer = 1\},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00312}00312                 .callback = \&\mbox{\hyperlink{usbhid_8c_a714375d21100154ce0f8cf2326bebeb5}{usbhid\_ctrl\_callback}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00313}00313                 .timeout = 1000,        \textcolor{comment}{/* 1 second */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00314}00314         \},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00315}00315 \};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00316}00316 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00317}00317 \textcolor{keyword}{static} \textcolor{keyword}{inline} \mbox{\hyperlink{usb__freebsd_8h_a66bb6b1869e5e89aff3b693720b39cfb}{usb\_frlength\_t}}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00318}\mbox{\hyperlink{usbhid_8c_accb6837693d5fdbc4ca179eeb590a1be}{00318}} \mbox{\hyperlink{usbhid_8c_accb6837693d5fdbc4ca179eeb590a1be}{usbhid\_xfer\_max\_len}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00319}00319 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00320}00320         \textcolor{keywordflow}{return} (xfer == NULL ? 0 : \mbox{\hyperlink{usb__transfer_8c_ae34a7cc2f01c6dfb68bca6fd0b72647e}{usbd\_xfer\_max\_len}}(xfer));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00321}00321 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00322}00322 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00323}00323 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00324}\mbox{\hyperlink{usbhid_8c_a830b837074626f4d0f47637093633d08}{00324}} \mbox{\hyperlink{usbhid_8c_a830b837074626f4d0f47637093633d08}{usbhid\_xfer\_check\_len}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc, \textcolor{keywordtype}{int} xfer\_idx, hid\_size\_t \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00325}00325 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00326}00326         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__freebsd_8h_ae4dbc653d4ae9493b40a9485fc0ecf23}{USB\_IN\_POLLING\_MODE\_FUNC}}())}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00327}00327                 xfer\_idx = \mbox{\hyperlink{usbhid_8c_a1ec8916ee2171ea5577d0863ed408e51}{POLL\_XFER}}(xfer\_idx);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00328}00328         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[xfer\_idx] == NULL)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00329}00329                 \textcolor{keywordflow}{return} (ENODEV);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00330}00330         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} > \mbox{\hyperlink{usb__transfer_8c_ae34a7cc2f01c6dfb68bca6fd0b72647e}{usbd\_xfer\_max\_len}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[xfer\_idx]))}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00331}00331                 \textcolor{keywordflow}{return} (ENOBUFS);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00332}00332         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00333}00333 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00334}00334 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00335}00335 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00336}\mbox{\hyperlink{usbhid_8c_a3d5572ecd6fb3c996605dce2ed3a394e}{00336}} \mbox{\hyperlink{usbhid_8c_a3d5572ecd6fb3c996605dce2ed3a394e}{usbhid\_intr\_setup}}(device\_t dev, hid\_intr\_t intr, \textcolor{keywordtype}{void} *context,}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00337}00337     \textcolor{keyword}{struct} hid\_rdesc\_info *rdesc)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00338}00338 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00339}00339         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00340}00340         uint16\_t \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00341}00341         \textcolor{keywordtype}{bool} nowrite;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00342}00342         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00343}00343 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00344}00344         nowrite = hid\_test\_quirk(\&sc-\/>\mbox{\hyperlink{structusbhid__softc_aa865192c482696e3340922ec7e6caa88}{sc\_hw}}, HQ\_NOWRITE);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00345}00345 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00346}00346         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00347}00347 \textcolor{comment}{         * Setup the USB transfers one by one, so they are memory independent}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00348}00348 \textcolor{comment}{         * which allows for handling panics triggered by the HID drivers}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00349}00349 \textcolor{comment}{         * itself, typically by hkbd via CTRL+ALT+ESC sequences. Or if the HID}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00350}00350 \textcolor{comment}{         * keyboard driver was processing a key at the moment of panic.}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00351}00351 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00352}00352         \textcolor{keywordflow}{if} (intr == NULL) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00353}00353                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structusbhid__softc_ab34e8638afcb20de1a71e14650bdacae}{sc\_can\_poll}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00354}00354                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00355}00355                 \textcolor{keywordflow}{for} (\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} = 0; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} != \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9eaeb5ae114f6baaa7a35fe7fa3fb7a3452}{USBHID\_N\_TRANSFER}}; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}++) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00356}00356                         \textcolor{keywordflow}{if} (nowrite \&\& \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} == \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ead7bda12e507ac9afa9e23cae11b3b15a}{USBHID\_INTR\_OUT\_DT}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00357}00357                                 \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00358}00358                         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__transfer_8c_a7494c04fae5c5e7ef1af436308670a21}{usbd\_transfer\_setup}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_ae6a30acc0ccb69f1d292d9536836e067}{sc\_udev}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00359}00359                             \&sc-\/>\mbox{\hyperlink{structusbhid__softc_a49559585283b60e7cba1bde58b230def}{sc\_iface\_index}}, sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}} + \mbox{\hyperlink{usbhid_8c_a1ec8916ee2171ea5577d0863ed408e51}{POLL\_XFER}}(\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00360}00360                             sc-\/>\mbox{\hyperlink{structusbhid__softc_ad3530c7f1914705542d6ab5a29e2d3c6}{sc\_config}} + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}, 1,}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00361}00361                             (\textcolor{keywordtype}{void} *)(sc-\/>\mbox{\hyperlink{structusbhid__softc_aaeb021debdf21b0746a2bd95b1c86786}{sc\_xfer\_ctx}} + \mbox{\hyperlink{usbhid_8c_a1ec8916ee2171ea5577d0863ed408e51}{POLL\_XFER}}(\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}})),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00362}00362                             \&sc-\/>\mbox{\hyperlink{structusbhid__softc_a921ea94c41a1616e79fc7ac95b5afaae}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00363}00363                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00364}00364                                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}xfer \%d setup error=\%s\(\backslash\)n"{}}, \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00365}00365                                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00366}00366                 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00367}00367                 mtx\_lock(\&sc-\/>\mbox{\hyperlink{structusbhid__softc_a921ea94c41a1616e79fc7ac95b5afaae}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00368}00368                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}] != NULL \&\&}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00369}00369                     sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}]-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a94e1972b73c853fafca449c099739ffb}{started}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00370}00370                         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00371}00371                             sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a1ec8916ee2171ea5577d0863ed408e51}{POLL\_XFER}}(\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}})]);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00372}00372                 mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structusbhid__softc_a921ea94c41a1616e79fc7ac95b5afaae}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00373}00373                 sc-\/>\mbox{\hyperlink{structusbhid__softc_ab34e8638afcb20de1a71e14650bdacae}{sc\_can\_poll}} = \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00374}00374                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00375}00375         \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00376}00376 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00377}00377         sc-\/>\mbox{\hyperlink{structusbhid__softc_a3c9e9986b34148cc26cdd304746982d1}{sc\_intr\_handler}} = intr;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00378}00378         sc-\/>\mbox{\hyperlink{structusbhid__softc_a045f83fc956ac7d0f92ee5bd4f2e4264}{sc\_intr\_ctx}} = context;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00379}00379         bcopy(\mbox{\hyperlink{usbhid_8c_aab749bd3dec9ee2e252e6bf4d5464ccb}{usbhid\_config}}, sc-\/>\mbox{\hyperlink{structusbhid__softc_ad3530c7f1914705542d6ab5a29e2d3c6}{sc\_config}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usbhid_8c_aab749bd3dec9ee2e252e6bf4d5464ccb}{usbhid\_config}}));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00380}00380         bzero(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00381}00381 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00382}00382         \textcolor{comment}{/* Set buffer sizes to match HID report sizes */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00383}00383         sc-\/>\mbox{\hyperlink{structusbhid__softc_ad3530c7f1914705542d6ab5a29e2d3c6}{sc\_config}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ead7bda12e507ac9afa9e23cae11b3b15a}{USBHID\_INTR\_OUT\_DT}}].\mbox{\hyperlink{structusb__config_a730af89f830066662eac76401fc037ff}{bufsize}} = rdesc-\/>osize;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00384}00384         sc-\/>\mbox{\hyperlink{structusbhid__softc_ad3530c7f1914705542d6ab5a29e2d3c6}{sc\_config}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}].\mbox{\hyperlink{structusb__config_a730af89f830066662eac76401fc037ff}{bufsize}} = rdesc-\/>isize;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00385}00385         sc-\/>\mbox{\hyperlink{structusbhid__softc_ad3530c7f1914705542d6ab5a29e2d3c6}{sc\_config}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{USBHID\_CTRL\_DT}}].\mbox{\hyperlink{structusb__config_a730af89f830066662eac76401fc037ff}{bufsize}} =}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00386}00386             MAX(rdesc-\/>isize, MAX(rdesc-\/>osize, rdesc-\/>fsize));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00387}00387 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00388}00388         \textcolor{keywordflow}{for} (\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} = 0; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} != \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9eaeb5ae114f6baaa7a35fe7fa3fb7a3452}{USBHID\_N\_TRANSFER}}; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}++) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00389}00389                 \textcolor{keywordflow}{if} (nowrite \&\& \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} == \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ead7bda12e507ac9afa9e23cae11b3b15a}{USBHID\_INTR\_OUT\_DT}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00390}00390                         \textcolor{keywordflow}{continue};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00391}00391                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__transfer_8c_a7494c04fae5c5e7ef1af436308670a21}{usbd\_transfer\_setup}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_ae6a30acc0ccb69f1d292d9536836e067}{sc\_udev}}, \&sc-\/>\mbox{\hyperlink{structusbhid__softc_a49559585283b60e7cba1bde58b230def}{sc\_iface\_index}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00392}00392                     sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}} + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}, sc-\/>\mbox{\hyperlink{structusbhid__softc_ad3530c7f1914705542d6ab5a29e2d3c6}{sc\_config}} + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}, 1,}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00393}00393                     (\textcolor{keywordtype}{void} *)(sc-\/>\mbox{\hyperlink{structusbhid__softc_aaeb021debdf21b0746a2bd95b1c86786}{sc\_xfer\_ctx}} + \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}), \&sc-\/>\mbox{\hyperlink{structusbhid__softc_a921ea94c41a1616e79fc7ac95b5afaae}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00394}00394                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00395}00395                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}xfer \%d setup error=\%s\(\backslash\)n"{}}, \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00396}00396                             \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00397}00397         \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00398}00398 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00399}00399         rdesc-\/>rdsize = \mbox{\hyperlink{usbhid_8c_accb6837693d5fdbc4ca179eeb590a1be}{usbhid\_xfer\_max\_len}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}]);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00400}00400         rdesc-\/>grsize = \mbox{\hyperlink{usbhid_8c_accb6837693d5fdbc4ca179eeb590a1be}{usbhid\_xfer\_max\_len}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{USBHID\_CTRL\_DT}}]);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00401}00401         rdesc-\/>srsize = rdesc-\/>grsize;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00402}00402         rdesc-\/>wrsize = nowrite ? rdesc-\/>srsize :}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00403}00403             \mbox{\hyperlink{usbhid_8c_accb6837693d5fdbc4ca179eeb590a1be}{usbhid\_xfer\_max\_len}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ead7bda12e507ac9afa9e23cae11b3b15a}{USBHID\_INTR\_OUT\_DT}}]);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00404}00404 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00405}00405         sc-\/>\mbox{\hyperlink{structusbhid__softc_a2e9ae753363b802d984760b95970cb45}{sc\_intr\_buf}} = malloc(rdesc-\/>rdsize, M\_USBDEV, M\_ZERO | M\_WAITOK);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00406}00406 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00407}00407 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00408}00408 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00409}\mbox{\hyperlink{usbhid_8c_acd7082e0d3165353e550aea14fae527a}{00409}} \mbox{\hyperlink{usbhid_8c_acd7082e0d3165353e550aea14fae527a}{usbhid\_intr\_unsetup}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00410}00410 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00411}00411         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00412}00412 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00413}00413         \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9eaeb5ae114f6baaa7a35fe7fa3fb7a3452}{USBHID\_N\_TRANSFER}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00414}00414         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structusbhid__softc_ab34e8638afcb20de1a71e14650bdacae}{sc\_can\_poll}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00415}00415                 \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00416}00416                     sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}, \mbox{\hyperlink{usbhid_8c_a1ec8916ee2171ea5577d0863ed408e51}{POLL\_XFER}}(\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9eaeb5ae114f6baaa7a35fe7fa3fb7a3452}{USBHID\_N\_TRANSFER}}));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00417}00417         sc-\/>\mbox{\hyperlink{structusbhid__softc_ab34e8638afcb20de1a71e14650bdacae}{sc\_can\_poll}} = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00418}00418         free(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2e9ae753363b802d984760b95970cb45}{sc\_intr\_buf}}, M\_USBDEV);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00419}00419 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00420}00420 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00421}00421 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00422}\mbox{\hyperlink{usbhid_8c_ac5e69d2b85d8fbb73ce88f2c2c6b452b}{00422}} \mbox{\hyperlink{usbhid_8c_ac5e69d2b85d8fbb73ce88f2c2c6b452b}{usbhid\_intr\_start}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00423}00423 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00424}00424         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00425}00425 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00426}00426         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}] == NULL)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00427}00427                 \textcolor{keywordflow}{return} (ENODEV);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00428}00428 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00429}00429         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structusbhid__softc_a921ea94c41a1616e79fc7ac95b5afaae}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00430}00430         sc-\/>\mbox{\hyperlink{structusbhid__softc_aaeb021debdf21b0746a2bd95b1c86786}{sc\_xfer\_ctx}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}] = (\textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__xfer__ctx}{usbhid\_xfer\_ctx}}) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00431}00431                 .\mbox{\hyperlink{structusbhid__xfer__ctx_a89f1437a167f222046bce31f7c71299b}{req}}.\mbox{\hyperlink{unionusbhid__device__request_afc4bce9c638b880f988718a314b86bfc}{intr}}.\mbox{\hyperlink{unionusbhid__device__request_a162efc03ea7a4ea289392a7546ea0d4e}{maxlen}} =}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00432}00432                     \mbox{\hyperlink{usb__transfer_8c_ae34a7cc2f01c6dfb68bca6fd0b72647e}{usbd\_xfer\_max\_len}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}]),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00433}00433                 .cb = \mbox{\hyperlink{usbhid_8c_a9353d02582e3a820b59217da776de285}{usbhid\_intr\_handler\_cb}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00434}00434                 .cb\_ctx = sc,}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00435}00435                 .buf = sc-\/>\mbox{\hyperlink{structusbhid__softc_a2e9ae753363b802d984760b95970cb45}{sc\_intr\_buf}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00436}00436         \};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00437}00437         sc-\/>\mbox{\hyperlink{structusbhid__softc_aaeb021debdf21b0746a2bd95b1c86786}{sc\_xfer\_ctx}}[\mbox{\hyperlink{usbhid_8c_a1ec8916ee2171ea5577d0863ed408e51}{POLL\_XFER}}(\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}})] = (\textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__xfer__ctx}{usbhid\_xfer\_ctx}}) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00438}00438                 .\mbox{\hyperlink{structusbhid__xfer__ctx_a89f1437a167f222046bce31f7c71299b}{req}}.\mbox{\hyperlink{unionusbhid__device__request_afc4bce9c638b880f988718a314b86bfc}{intr}}.\mbox{\hyperlink{unionusbhid__device__request_a162efc03ea7a4ea289392a7546ea0d4e}{maxlen}} =}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00439}00439                     \mbox{\hyperlink{usb__transfer_8c_ae34a7cc2f01c6dfb68bca6fd0b72647e}{usbd\_xfer\_max\_len}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}]),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00440}00440                 .cb = \mbox{\hyperlink{usbhid_8c_a9353d02582e3a820b59217da776de285}{usbhid\_intr\_handler\_cb}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00441}00441                 .cb\_ctx = sc,}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00442}00442                 .buf = sc-\/>\mbox{\hyperlink{structusbhid__softc_a2e9ae753363b802d984760b95970cb45}{sc\_intr\_buf}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00443}00443         \};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00444}00444         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}]);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00445}00445         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structusbhid__softc_ab34e8638afcb20de1a71e14650bdacae}{sc\_can\_poll}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00446}00446                 \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a1ec8916ee2171ea5577d0863ed408e51}{POLL\_XFER}}(\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}})]);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00447}00447         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structusbhid__softc_a921ea94c41a1616e79fc7ac95b5afaae}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00448}00448 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00449}00449         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00450}00450 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00451}00451 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00452}00452 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00453}\mbox{\hyperlink{usbhid_8c_af91a00eee7b258f3d4c1034d9b712a3c}{00453}} \mbox{\hyperlink{usbhid_8c_af91a00eee7b258f3d4c1034d9b712a3c}{usbhid\_intr\_stop}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00454}00454 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00455}00455         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00456}00456 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00457}00457         \mbox{\hyperlink{usb__transfer_8c_aa525d15cc84d40dafaaecf86537e2c7f}{usbd\_transfer\_drain}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}]);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00458}00458         \mbox{\hyperlink{usb__transfer_8c_aa525d15cc84d40dafaaecf86537e2c7f}{usbd\_transfer\_drain}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ead7bda12e507ac9afa9e23cae11b3b15a}{USBHID\_INTR\_OUT\_DT}}]);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00459}00459         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structusbhid__softc_ab34e8638afcb20de1a71e14650bdacae}{sc\_can\_poll}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00460}00460                 \mbox{\hyperlink{usb__transfer_8c_aa525d15cc84d40dafaaecf86537e2c7f}{usbd\_transfer\_drain}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[\mbox{\hyperlink{usbhid_8c_a1ec8916ee2171ea5577d0863ed408e51}{POLL\_XFER}}(\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}})]);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00461}00461 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00462}00462         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00463}00463 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00464}00464 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00465}00465 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00466}\mbox{\hyperlink{usbhid_8c_a7d8f93bad64493065ce512486ee2a179}{00466}} \mbox{\hyperlink{usbhid_8c_a7d8f93bad64493065ce512486ee2a179}{usbhid\_intr\_poll}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00467}00467 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00468}00468         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00469}00469 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00470}00470         MPASS(sc-\/>\mbox{\hyperlink{structusbhid__softc_ab34e8638afcb20de1a71e14650bdacae}{sc\_can\_poll}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00471}00471         \mbox{\hyperlink{usb__transfer_8c_ab2036eadf83fca25cf0d8cdec16d7227}{usbd\_transfer\_poll}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}} + \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}, 1);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00472}00472         \mbox{\hyperlink{usb__transfer_8c_ab2036eadf83fca25cf0d8cdec16d7227}{usbd\_transfer\_poll}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}} + \mbox{\hyperlink{usbhid_8c_a1ec8916ee2171ea5577d0863ed408e51}{POLL\_XFER}}(\mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}), 1);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00473}00473 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00474}00474 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00475}00475 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00476}00476 \textcolor{comment}{ * HID interface}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00477}00477 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00478}00478 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00479}\mbox{\hyperlink{usbhid_8c_a6ab499c9091e13f25d6e7f92b1150be9}{00479}} \mbox{\hyperlink{usbhid_8c_a6ab499c9091e13f25d6e7f92b1150be9}{usbhid\_sync\_xfer}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc, \textcolor{keywordtype}{int} xfer\_idx,}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00480}00480     \textcolor{keyword}{union} \mbox{\hyperlink{unionusbhid__device__request}{usbhid\_device\_request}} *\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \textcolor{keywordtype}{void} *buf)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00481}00481 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00482}00482         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}, timeout;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00483}00483         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__xfer__ctx}{usbhid\_xfer\_ctx}} *xfer\_ctx;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00484}00484 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00485}00485         xfer\_ctx = sc-\/>\mbox{\hyperlink{structusbhid__softc_aaeb021debdf21b0746a2bd95b1c86786}{sc\_xfer\_ctx}} + xfer\_idx;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00486}00486 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00487}00487         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__freebsd_8h_ae4dbc653d4ae9493b40a9485fc0ecf23}{USB\_IN\_POLLING\_MODE\_FUNC}}()) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00488}00488                 xfer\_ctx = \mbox{\hyperlink{usbhid_8c_a1ec8916ee2171ea5577d0863ed408e51}{POLL\_XFER}}(xfer\_ctx);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00489}00489                 xfer\_idx = \mbox{\hyperlink{usbhid_8c_a1ec8916ee2171ea5577d0863ed408e51}{POLL\_XFER}}(xfer\_idx);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00490}00490         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00491}00491                 mtx\_lock(\&sc-\/>\mbox{\hyperlink{structusbhid__softc_a921ea94c41a1616e79fc7ac95b5afaae}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00492}00492                 ++xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_ac024e26df9e9af0c177efb4b1ddf3013}{waiters}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00493}00493                 \textcolor{keywordflow}{while} (xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a6c156cea8a7f92663330e9e202913df7}{influx}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00494}00494                         mtx\_sleep(\&xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_ac024e26df9e9af0c177efb4b1ddf3013}{waiters}}, \&sc-\/>\mbox{\hyperlink{structusbhid__softc_a921ea94c41a1616e79fc7ac95b5afaae}{sc\_mtx}}, 0,}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00495}00495                             \textcolor{stringliteral}{"{}usbhid wt"{}}, 0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00496}00496                 -\/-\/xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_ac024e26df9e9af0c177efb4b1ddf3013}{waiters}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00497}00497                 xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a6c156cea8a7f92663330e9e202913df7}{influx}} = \textcolor{keyword}{true};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00498}00498         \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00499}00499 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00500}00500         xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a38b61332911c1cb98363b7b8e9de316a}{buf}} = \mbox{\hyperlink{structusbhid__xfer__ctx_a38b61332911c1cb98363b7b8e9de316a}{buf}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00501}00501         xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a89f1437a167f222046bce31f7c71299b}{req}} = *\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00502}00502         xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a9f030076e6c340fd4aaeae0330d3f74d}{error}} = ETIMEDOUT;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00503}00503         xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_ab52d4e505fe5ca984ef72c209359e146}{cb}} = \&\mbox{\hyperlink{usbhid_8c_a3d923d310d2da1df22a67f2779b64289}{usbhid\_sync\_wakeup\_cb}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00504}00504         xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_aee1ae689ad7236c538c4c4edc4ca6a84}{cb\_ctx}} = xfer\_ctx;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00505}00505         timeout = \mbox{\hyperlink{usbdi_8h_a07bf0b2ba580cae69a6c567c40d64b1c}{USB\_DEFAULT\_TIMEOUT}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00506}00506         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[xfer\_idx]);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00507}00507 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00508}00508         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__freebsd_8h_ae4dbc653d4ae9493b40a9485fc0ecf23}{USB\_IN\_POLLING\_MODE\_FUNC}}())}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00509}00509                 \textcolor{keywordflow}{while} (timeout > 0 \&\& xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a9f030076e6c340fd4aaeae0330d3f74d}{error}} == ETIMEDOUT) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00510}00510                         \mbox{\hyperlink{usb__transfer_8c_ab2036eadf83fca25cf0d8cdec16d7227}{usbd\_transfer\_poll}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}} + xfer\_idx, 1);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00511}00511                         DELAY(1000);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00512}00512                         timeout-\/-\/;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00513}00513                 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00514}00514          \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00515}00515                 msleep\_sbt(xfer\_ctx, \&sc-\/>\mbox{\hyperlink{structusbhid__softc_a921ea94c41a1616e79fc7ac95b5afaae}{sc\_mtx}}, 0, \textcolor{stringliteral}{"{}usbhid io"{}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00516}00516                     SBT\_1MS * timeout, 0, C\_HARDCLOCK);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00517}00517 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00518}00518         \textcolor{comment}{/* Perform usbhid\_write() asyncronously to improve pipelining */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00519}00519         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__freebsd_8h_ae4dbc653d4ae9493b40a9485fc0ecf23}{USB\_IN\_POLLING\_MODE\_FUNC}}() || xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a9f030076e6c340fd4aaeae0330d3f74d}{error}} != 0 ||}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00520}00520             sc-\/>\mbox{\hyperlink{structusbhid__softc_ad3530c7f1914705542d6ab5a29e2d3c6}{sc\_config}}[xfer\_idx].\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} != \mbox{\hyperlink{usb_8h_a01e28e87ad16f6dfffefc6ccab08baed}{UE\_INTERRUPT}} ||}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00521}00521             sc-\/>\mbox{\hyperlink{structusbhid__softc_ad3530c7f1914705542d6ab5a29e2d3c6}{sc\_config}}[xfer\_idx].\mbox{\hyperlink{structusb__config_a7df71cda1db402b095c2eab34e28feab}{direction}} != \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00522}00522                 \mbox{\hyperlink{usb__transfer_8c_abe245d973df0cfd6fb96b884d33ebce3}{usbd\_transfer\_stop}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_a2aa35969707e8b45379b1a8648460944}{sc\_xfer}}[xfer\_idx]);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00523}00523         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a9f030076e6c340fd4aaeae0330d3f74d}{error}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00524}00524         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == 0)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00525}00525                 *\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}} = xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a89f1437a167f222046bce31f7c71299b}{req}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00526}00526 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00527}00527         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{usb__freebsd_8h_ae4dbc653d4ae9493b40a9485fc0ecf23}{USB\_IN\_POLLING\_MODE\_FUNC}}()) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00528}00528                 xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_a6c156cea8a7f92663330e9e202913df7}{influx}} = \textcolor{keyword}{false};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00529}00529                 \textcolor{keywordflow}{if} (xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_ac024e26df9e9af0c177efb4b1ddf3013}{waiters}} != 0)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00530}00530                         wakeup\_one(\&xfer\_ctx-\/>\mbox{\hyperlink{structusbhid__xfer__ctx_ac024e26df9e9af0c177efb4b1ddf3013}{waiters}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00531}00531                 mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structusbhid__softc_a921ea94c41a1616e79fc7ac95b5afaae}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00532}00532         \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00533}00533 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00534}00534         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00535}00535                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}USB IO error:\%d\(\backslash\)n"{}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00536}00536 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00537}00537         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00538}00538 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00539}00539 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00540}00540 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00541}\mbox{\hyperlink{usbhid_8c_ac3a984fb7f23662357a5fd983d48d99d}{00541}} \mbox{\hyperlink{usbhid_8c_ac3a984fb7f23662357a5fd983d48d99d}{usbhid\_get\_rdesc}}(device\_t dev, \textcolor{keywordtype}{void} *\mbox{\hyperlink{structusbhid__xfer__ctx_a38b61332911c1cb98363b7b8e9de316a}{buf}}, hid\_size\_t \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00542}00542 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00543}00543         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00544}00544         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00545}00545 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00546}00546         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__request_8c_a58d170d91203f48ea26476542af74068}{usbd\_req\_get\_report\_descriptor}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_ae6a30acc0ccb69f1d292d9536836e067}{sc\_udev}}, NULL,}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00547}00547             buf, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, sc-\/>\mbox{\hyperlink{structusbhid__softc_a49559585283b60e7cba1bde58b230def}{sc\_iface\_index}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00548}00548 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00549}00549         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00550}00550                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}no report descriptor: \%s\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00551}00551 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00552}00552         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == 0 ? 0 : ENXIO);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00553}00553 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00554}00554 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00555}00555 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00556}\mbox{\hyperlink{usbhid_8c_acb1999502b083cf12bf083efd3a61ae8}{00556}} \mbox{\hyperlink{usbhid_8c_acb1999502b083cf12bf083efd3a61ae8}{usbhid\_get\_report}}(device\_t dev, \textcolor{keywordtype}{void} *buf, hid\_size\_t maxlen,}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00557}00557     hid\_size\_t *actlen, uint8\_t type, uint8\_t \textcolor{keywordtype}{id})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00558}00558 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00559}00559         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00560}00560         \textcolor{keyword}{union }\mbox{\hyperlink{unionusbhid__device__request}{usbhid\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00561}00561         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00562}00562 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00563}00563         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usbhid_8c_a830b837074626f4d0f47637093633d08}{usbhid\_xfer\_check\_len}}(sc, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{USBHID\_CTRL\_DT}}, \mbox{\hyperlink{unionusbhid__device__request_a162efc03ea7a4ea289392a7546ea0d4e}{maxlen}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00564}00564         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00565}00565                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00566}00566 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00567}00567         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.bmRequestType = \mbox{\hyperlink{usb_8h_a4f2e0216ffe1d8145cd1385e42c9a707}{UT\_READ\_CLASS\_INTERFACE}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00568}00568         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.bRequest = \mbox{\hyperlink{usbhid_8h_a83f99fae79e395569281ec5a169b9629}{UR\_GET\_REPORT}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00569}00569         \mbox{\hyperlink{usb__endian_8h_a202f07612d9f9d4b3a1a89bd21b20012}{USETW2}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wValue, type, \textcolor{keywordtype}{id});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00570}00570         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wIndex[0] = sc-\/>\mbox{\hyperlink{structusbhid__softc_a9e94790adf6b6689f9197b11c90c927b}{sc\_iface\_no}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00571}00571         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wIndex[1] = 0;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00572}00572         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wLength, \mbox{\hyperlink{unionusbhid__device__request_a162efc03ea7a4ea289392a7546ea0d4e}{maxlen}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00573}00573 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00574}00574         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usbhid_8c_a6ab499c9091e13f25d6e7f92b1150be9}{usbhid\_sync\_xfer}}(sc, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{USBHID\_CTRL\_DT}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, buf);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00575}00575         \textcolor{keywordflow}{if} (!\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} \&\& \mbox{\hyperlink{unionusbhid__device__request_a51a037fa99de521a2cb94e0e376e51a5}{actlen}} != NULL)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00576}00576                 *\mbox{\hyperlink{unionusbhid__device__request_a51a037fa99de521a2cb94e0e376e51a5}{actlen}} = \mbox{\hyperlink{unionusbhid__device__request_a162efc03ea7a4ea289392a7546ea0d4e}{maxlen}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00577}00577 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00578}00578         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00579}00579 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00580}00580 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00581}00581 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00582}\mbox{\hyperlink{usbhid_8c_ae5b395375876c407a922369ee382eddd}{00582}} \mbox{\hyperlink{usbhid_8c_ae5b395375876c407a922369ee382eddd}{usbhid\_set\_report}}(device\_t dev, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *buf, hid\_size\_t \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}}, uint8\_t type,}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00583}00583     uint8\_t \textcolor{keywordtype}{id})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00584}00584 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00585}00585         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00586}00586         \textcolor{keyword}{union }\mbox{\hyperlink{unionusbhid__device__request}{usbhid\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00587}00587         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00588}00588 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00589}00589         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usbhid_8c_a830b837074626f4d0f47637093633d08}{usbhid\_xfer\_check\_len}}(sc, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{USBHID\_CTRL\_DT}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00590}00590         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00591}00591                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00592}00592 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00593}00593         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.bmRequestType = \mbox{\hyperlink{usb_8h_ac338c3af82b085859b50582e10fa7cb7}{UT\_WRITE\_CLASS\_INTERFACE}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00594}00594         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.bRequest = \mbox{\hyperlink{usbhid_8h_a9fc94613b9ef6bb7fcc37deda784c760}{UR\_SET\_REPORT}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00595}00595         \mbox{\hyperlink{usb__endian_8h_a202f07612d9f9d4b3a1a89bd21b20012}{USETW2}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wValue, type, \textcolor{keywordtype}{id});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00596}00596         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wIndex[0] = sc-\/>\mbox{\hyperlink{structusbhid__softc_a9e94790adf6b6689f9197b11c90c927b}{sc\_iface\_no}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00597}00597         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wIndex[1] = 0;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00598}00598         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wLength, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00599}00599 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00600}00600         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usbhid_8c_a6ab499c9091e13f25d6e7f92b1150be9}{usbhid\_sync\_xfer}}(sc, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{USBHID\_CTRL\_DT}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00601}00601             \_\_DECONST(\textcolor{keywordtype}{void} *, buf)));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00602}00602 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00603}00603 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00604}00604 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00605}\mbox{\hyperlink{usbhid_8c_a14c70925219daadd88f008204907a48d}{00605}} \mbox{\hyperlink{usbhid_8c_a14c70925219daadd88f008204907a48d}{usbhid\_read}}(device\_t dev, \textcolor{keywordtype}{void} *buf, hid\_size\_t \mbox{\hyperlink{unionusbhid__device__request_a162efc03ea7a4ea289392a7546ea0d4e}{maxlen}}, hid\_size\_t *\mbox{\hyperlink{unionusbhid__device__request_a51a037fa99de521a2cb94e0e376e51a5}{actlen}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00606}00606 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00607}00607         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00608}00608         \textcolor{keyword}{union }\mbox{\hyperlink{unionusbhid__device__request}{usbhid\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00609}00609         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00610}00610 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00611}00611         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usbhid_8c_a830b837074626f4d0f47637093633d08}{usbhid\_xfer\_check\_len}}(sc, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}, \mbox{\hyperlink{unionusbhid__device__request_a162efc03ea7a4ea289392a7546ea0d4e}{maxlen}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00612}00612         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00613}00613                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00614}00614 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00615}00615         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.intr.maxlen = \mbox{\hyperlink{unionusbhid__device__request_a162efc03ea7a4ea289392a7546ea0d4e}{maxlen}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00616}00616         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usbhid_8c_a6ab499c9091e13f25d6e7f92b1150be9}{usbhid\_sync\_xfer}}(sc, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea091ff0c2e7db82252a6450f3b49a95d7}{USBHID\_INTR\_IN\_DT}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, buf);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00617}00617         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == 0 \&\& \mbox{\hyperlink{unionusbhid__device__request_a51a037fa99de521a2cb94e0e376e51a5}{actlen}} != NULL)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00618}00618                 *\mbox{\hyperlink{unionusbhid__device__request_a51a037fa99de521a2cb94e0e376e51a5}{actlen}} = \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.intr.actlen;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00619}00619 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00620}00620         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00621}00621 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00622}00622 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00623}00623 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00624}\mbox{\hyperlink{usbhid_8c_a9554130e65c6ee21e27667522357aae3}{00624}} \mbox{\hyperlink{usbhid_8c_a9554130e65c6ee21e27667522357aae3}{usbhid\_write}}(device\_t dev, \textcolor{keyword}{const} \textcolor{keywordtype}{void} *buf, hid\_size\_t \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00625}00625 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00626}00626         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00627}00627         \textcolor{keyword}{union }\mbox{\hyperlink{unionusbhid__device__request}{usbhid\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00628}00628         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00629}00629 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00630}00630         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usbhid_8c_a830b837074626f4d0f47637093633d08}{usbhid\_xfer\_check\_len}}(sc, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ead7bda12e507ac9afa9e23cae11b3b15a}{USBHID\_INTR\_OUT\_DT}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00631}00631         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00632}00632                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00633}00633 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00634}00634         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.intr.maxlen = \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00635}00635         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usbhid_8c_a6ab499c9091e13f25d6e7f92b1150be9}{usbhid\_sync\_xfer}}(sc, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ead7bda12e507ac9afa9e23cae11b3b15a}{USBHID\_INTR\_OUT\_DT}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00636}00636             \_\_DECONST(\textcolor{keywordtype}{void} *, buf)));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00637}00637 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00638}00638 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00639}00639 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00640}\mbox{\hyperlink{usbhid_8c_abc7086b7f071b21180fc058983213bdc}{00640}} \mbox{\hyperlink{usbhid_8c_abc7086b7f071b21180fc058983213bdc}{usbhid\_set\_idle}}(device\_t dev, uint16\_t duration, uint8\_t \textcolor{keywordtype}{id})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00641}00641 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00642}00642         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00643}00643         \textcolor{keyword}{union }\mbox{\hyperlink{unionusbhid__device__request}{usbhid\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00644}00644         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00645}00645 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00646}00646         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usbhid_8c_a830b837074626f4d0f47637093633d08}{usbhid\_xfer\_check\_len}}(sc, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{USBHID\_CTRL\_DT}}, 0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00647}00647         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00648}00648                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00649}00649 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00650}00650         \textcolor{comment}{/* Duration is measured in 4 milliseconds per unit. */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00651}00651         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.bmRequestType = \mbox{\hyperlink{usb_8h_ac338c3af82b085859b50582e10fa7cb7}{UT\_WRITE\_CLASS\_INTERFACE}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00652}00652         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.bRequest = \mbox{\hyperlink{usbhid_8h_adfaea6848ff8bd9a94cc6a059e94b54a}{UR\_SET\_IDLE}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00653}00653         \mbox{\hyperlink{usb__endian_8h_a202f07612d9f9d4b3a1a89bd21b20012}{USETW2}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wValue, (duration + 3) / 4, \textcolor{keywordtype}{id});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00654}00654         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wIndex[0] = sc-\/>\mbox{\hyperlink{structusbhid__softc_a9e94790adf6b6689f9197b11c90c927b}{sc\_iface\_no}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00655}00655         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wIndex[1] = 0;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00656}00656         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wLength, 0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00657}00657 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00658}00658         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usbhid_8c_a6ab499c9091e13f25d6e7f92b1150be9}{usbhid\_sync\_xfer}}(sc, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{USBHID\_CTRL\_DT}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, NULL));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00659}00659 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00660}00660 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00661}00661 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00662}\mbox{\hyperlink{usbhid_8c_a70bdb90b15384fc0adc39e857a0500a9}{00662}} \mbox{\hyperlink{usbhid_8c_a70bdb90b15384fc0adc39e857a0500a9}{usbhid\_set\_protocol}}(device\_t dev, uint16\_t protocol)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00663}00663 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00664}00664         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00665}00665         \textcolor{keyword}{union }\mbox{\hyperlink{unionusbhid__device__request}{usbhid\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00666}00666         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00667}00667 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00668}00668         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usbhid_8c_a830b837074626f4d0f47637093633d08}{usbhid\_xfer\_check\_len}}(sc, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{USBHID\_CTRL\_DT}}, 0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00669}00669         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00670}00670                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00671}00671 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00672}00672         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.bmRequestType = \mbox{\hyperlink{usb_8h_ac338c3af82b085859b50582e10fa7cb7}{UT\_WRITE\_CLASS\_INTERFACE}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00673}00673         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.bRequest = \mbox{\hyperlink{usbhid_8h_afea159697b5a77d5adf395f95055f6f7}{UR\_SET\_PROTOCOL}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00674}00674         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wValue, protocol);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00675}00675         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wIndex[0] = sc-\/>\mbox{\hyperlink{structusbhid__softc_a9e94790adf6b6689f9197b11c90c927b}{sc\_iface\_no}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00676}00676         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wIndex[1] = 0;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00677}00677         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wLength, 0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00678}00678 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00679}00679         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usbhid_8c_a6ab499c9091e13f25d6e7f92b1150be9}{usbhid\_sync\_xfer}}(sc, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{USBHID\_CTRL\_DT}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, NULL));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00680}00680 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00681}00681 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00682}00682 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00683}\mbox{\hyperlink{usbhid_8c_ab5c59db84e54fe799617d26cff13f8c7}{00683}} \mbox{\hyperlink{usbhid_8c_ab5c59db84e54fe799617d26cff13f8c7}{usbhid\_ioctl}}(device\_t dev, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} cmd, uintptr\_t data)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00684}00684 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00685}00685         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}* sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00686}00686         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ctl__request}{usb\_ctl\_request}} *ucr;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00687}00687         \textcolor{keyword}{union }\mbox{\hyperlink{unionusbhid__device__request}{usbhid\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00688}00688         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00689}00689 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00690}00690         \textcolor{keywordflow}{switch} (cmd) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00691}00691         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb__ioctl_8h_a0b806afb67c0105bf7d232e2e53ba8d4}{USB\_REQUEST}}:}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00692}00692                 ucr = (\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__ctl__request}{usb\_ctl\_request}} *)data;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00693}00693                 \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl = ucr-\/>\mbox{\hyperlink{structusb__ctl__request_a5051e39c1f35c2b9b13df649dd7f43fd}{ucr\_request}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00694}00694                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usbhid_8c_a830b837074626f4d0f47637093633d08}{usbhid\_xfer\_check\_len}}(}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00695}00695                     sc, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{USBHID\_CTRL\_DT}}, \mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wLength));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00696}00696                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00697}00697                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00698}00698                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__util_8h_a42e1e1df5311999a79a6eefba78cc5cd}{usb\_check\_request}}(sc-\/>\mbox{\hyperlink{structusbhid__softc_ae6a30acc0ccb69f1d292d9536836e067}{sc\_udev}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00699}00699                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00700}00700                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00701}00701                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usbhid_8c_a6ab499c9091e13f25d6e7f92b1150be9}{usbhid\_sync\_xfer}}(}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00702}00702                     sc, \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ea382474c066d475cedcf426c9861e50e2}{USBHID\_CTRL\_DT}}, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, ucr-\/>\mbox{\hyperlink{structusb__ctl__request_a3d78f31a3c3c646ff0626bca2795dd95}{ucr\_data}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00703}00703                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == 0)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00704}00704                         ucr-\/>\mbox{\hyperlink{structusb__ctl__request_ad02e296eabf522387ba65abaf4fd38e3}{ucr\_actlen}} = \mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.ctrl.wLength);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00705}00705                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00706}00706         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00707}00707                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = EINVAL;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00708}00708         \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00709}00709 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00710}00710         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00711}00711 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00712}00712 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00713}00713 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00714}\mbox{\hyperlink{usbhid_8c_a7276d371699f7bd040f124ccc69beb61}{00714}} \mbox{\hyperlink{usbhid_8c_a7276d371699f7bd040f124ccc69beb61}{usbhid\_init\_device\_info}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa, \textcolor{keyword}{struct} hid\_device\_info *hw)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00715}00715 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00716}00716 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00717}00717         hw-\/>idBus = BUS\_USB;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00718}00718         hw-\/>idVendor = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_ae7eb209900d63daa0453bfad02b214d2}{idVendor}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00719}00719         hw-\/>idProduct = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a4bca08a16ef6b481d70d9eaf6a48f559}{idProduct}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00720}00720         hw-\/>idVersion = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_afb2ebde174df050730dc83fcb0927582}{bcdDevice}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00721}00721 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00722}00722         \textcolor{comment}{/* Set various quirks based on usb\_attach\_arg */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00723}00723         hid\_add\_dynamic\_quirk(hw, \mbox{\hyperlink{usbdi_8h_ad61be4846786fb86de5691968d1e9b66}{USB\_GET\_DRIVER\_INFO}}(uaa));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00724}00724 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00725}00725 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00726}00726 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00727}\mbox{\hyperlink{usbhid_8c_a2418dec4beb6a10b5540fefb6bbc6d63}{00727}} \mbox{\hyperlink{usbhid_8c_a2418dec4beb6a10b5540fefb6bbc6d63}{usbhid\_fill\_device\_info}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa, \textcolor{keyword}{struct} hid\_device\_info *hw)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00728}00728 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00729}00729         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device}{usb\_device}} *udev = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00730}00730         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__interface}{usb\_interface}} *iface = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_aaf4432c55ec34c0e4eb0cb3ddfb08ffd}{iface}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00731}00731         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__hid__descriptor}{usb\_hid\_descriptor}} *hid;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00732}00732         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__endpoint}{usb\_endpoint}} *ep;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00733}00733 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00734}00734         snprintf(hw-\/>name, \textcolor{keyword}{sizeof}(hw-\/>name), \textcolor{stringliteral}{"{}\%s \%s"{}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00735}00735             \mbox{\hyperlink{usb__device_8c_ae772361c7c976e3bfc4388a07517e233}{usb\_get\_manufacturer}}(udev), \mbox{\hyperlink{usb__device_8c_a7cf233913defcbb3e5bb29f7b6565e6a}{usb\_get\_product}}(udev));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00736}00736         strlcpy(hw-\/>serial, \mbox{\hyperlink{usb__device_8c_a5a41e5bc08f275438c7eb66d9883cd93}{usb\_get\_serial}}(udev), \textcolor{keyword}{sizeof}(hw-\/>serial));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00737}00737 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00738}00738         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_ab0d02dc59a6a042d2de8c12708afc8b3}{bInterfaceClass}} == \mbox{\hyperlink{usb_8h_a77eca6d49a1f0f93fb31aad0ef2f33b4}{UICLASS\_HID}} \&\&}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00739}00739             iface != NULL \&\& iface-\/>\mbox{\hyperlink{structusb__interface_aa5cea795ac14467ffdbe70b7f59beaba}{idesc}} != NULL) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00740}00740                 hid = \mbox{\hyperlink{usb__hid_8c_a810b59f743ba0c6f13370406c17f9aaa}{hid\_get\_descriptor\_from\_usb}}(}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00741}00741                     \mbox{\hyperlink{usb__device_8c_a5833d02ea7d69fb84106d7b97391431a}{usbd\_get\_config\_descriptor}}(udev), iface-\/>\mbox{\hyperlink{structusb__interface_aa5cea795ac14467ffdbe70b7f59beaba}{idesc}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00742}00742                 \textcolor{keywordflow}{if} (hid != NULL)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00743}00743                         hw-\/>rdescsize =}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00744}00744                             \mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(hid-\/>\mbox{\hyperlink{structusb__hid__descriptor_af78457da1ac0ea3d421882a0a9b935ac}{descrs}}[0].\mbox{\hyperlink{structusb__hid__descriptor_a73f17cb82c9e27dce67d075f2a40d24a}{wDescriptorLength}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00745}00745         \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00746}00746 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00747}00747         \textcolor{comment}{/* See if there is a interrupt out endpoint. */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00748}00748         ep = \mbox{\hyperlink{usb__device_8c_ad28b06f4326ed530ead266110d7527f8}{usbd\_get\_endpoint}}(udev, uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00749}00749             \mbox{\hyperlink{usbhid_8c_aab749bd3dec9ee2e252e6bf4d5464ccb}{usbhid\_config}} + \mbox{\hyperlink{usbhid_8c_a05589fbab0657f08285ebdfe93f5ec9ead7bda12e507ac9afa9e23cae11b3b15a}{USBHID\_INTR\_OUT\_DT}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00750}00750         \textcolor{keywordflow}{if} (ep == NULL || ep-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}} == NULL)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00751}00751                 hid\_add\_dynamic\_quirk(hw, HQ\_NOWRITE);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00752}00752 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00753}00753 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00754}\mbox{\hyperlink{usbhid_8c_a071f350fa7542c467572468c86408a44}{00754}} \textcolor{keyword}{static} \textcolor{keyword}{const} \mbox{\hyperlink{usbdi_8h_acf836fd8d6349b66a31f45420728da8d}{STRUCT\_USB\_HOST\_ID}} \mbox{\hyperlink{usbhid_8c_a071f350fa7542c467572468c86408a44}{usbhid\_devs}}[] = \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00755}00755         \textcolor{comment}{/* the Xbox 360 gamepad doesn't use the HID class */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00756}00756         \{\mbox{\hyperlink{usbdi_8h_a74c0bae2d55b3014e0583ec8ea4d5dc0}{USB\_IFACE\_CLASS}}(\mbox{\hyperlink{usb_8h_a62544a681ab6641be1497118649e4c25}{UICLASS\_VENDOR}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00757}00757          \mbox{\hyperlink{usbdi_8h_a15ff0bc986f953c98128bd03e394b571}{USB\_IFACE\_SUBCLASS}}(\mbox{\hyperlink{usb_8h_a321e8bab90e02e83e53d01bfc95edd53}{UISUBCLASS\_XBOX360\_CONTROLLER}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00758}00758          \mbox{\hyperlink{usbdi_8h_a99fe00139ae050549bc725ebd3c0d5cc}{USB\_IFACE\_PROTOCOL}}(\mbox{\hyperlink{usb_8h_a636f41a2f074a854a3f42696e08a9dc0}{UIPROTO\_XBOX360\_GAMEPAD}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00759}00759          \mbox{\hyperlink{usbdi_8h_afd3bc04918a50ee7b7aad1178fd01880}{USB\_DRIVER\_INFO}}(HQ\_IS\_XBOX360GP)\},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00760}00760         \textcolor{comment}{/* HID keyboard with boot protocol support */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00761}00761         \{\mbox{\hyperlink{usbdi_8h_a74c0bae2d55b3014e0583ec8ea4d5dc0}{USB\_IFACE\_CLASS}}(\mbox{\hyperlink{usb_8h_a77eca6d49a1f0f93fb31aad0ef2f33b4}{UICLASS\_HID}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00762}00762          \mbox{\hyperlink{usbdi_8h_a15ff0bc986f953c98128bd03e394b571}{USB\_IFACE\_SUBCLASS}}(\mbox{\hyperlink{usb_8h_a52fa495c7147e166f647c179db74b0bd}{UISUBCLASS\_BOOT}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00763}00763          \mbox{\hyperlink{usbdi_8h_a99fe00139ae050549bc725ebd3c0d5cc}{USB\_IFACE\_PROTOCOL}}(\mbox{\hyperlink{usb_8h_afb41e8c64624580d7d4e14c7122d5183}{UIPROTO\_BOOT\_KEYBOARD}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00764}00764          \mbox{\hyperlink{usbdi_8h_afd3bc04918a50ee7b7aad1178fd01880}{USB\_DRIVER\_INFO}}(HQ\_HAS\_KBD\_BOOTPROTO)\},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00765}00765         \textcolor{comment}{/* HID mouse with boot protocol support */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00766}00766         \{\mbox{\hyperlink{usbdi_8h_a74c0bae2d55b3014e0583ec8ea4d5dc0}{USB\_IFACE\_CLASS}}(\mbox{\hyperlink{usb_8h_a77eca6d49a1f0f93fb31aad0ef2f33b4}{UICLASS\_HID}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00767}00767          \mbox{\hyperlink{usbdi_8h_a15ff0bc986f953c98128bd03e394b571}{USB\_IFACE\_SUBCLASS}}(\mbox{\hyperlink{usb_8h_a52fa495c7147e166f647c179db74b0bd}{UISUBCLASS\_BOOT}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00768}00768          \mbox{\hyperlink{usbdi_8h_a99fe00139ae050549bc725ebd3c0d5cc}{USB\_IFACE\_PROTOCOL}}(\mbox{\hyperlink{usb_8h_accb9a682a6a90dd82a1d0f46b1420578}{UIPROTO\_MOUSE}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00769}00769          \mbox{\hyperlink{usbdi_8h_afd3bc04918a50ee7b7aad1178fd01880}{USB\_DRIVER\_INFO}}(HQ\_HAS\_MS\_BOOTPROTO)\},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00770}00770         \textcolor{comment}{/* generic HID class */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00771}00771         \{\mbox{\hyperlink{usbdi_8h_a74c0bae2d55b3014e0583ec8ea4d5dc0}{USB\_IFACE\_CLASS}}(\mbox{\hyperlink{usb_8h_a77eca6d49a1f0f93fb31aad0ef2f33b4}{UICLASS\_HID}}), \mbox{\hyperlink{usbdi_8h_afd3bc04918a50ee7b7aad1178fd01880}{USB\_DRIVER\_INFO}}(HQ\_NONE)\},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00772}00772 \};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00773}00773 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00774}00774 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00775}\mbox{\hyperlink{usbhid_8c_ac8c6a281317babff8ba1e1c2fba0db89}{00775}} \mbox{\hyperlink{usbhid_8c_abf5305e5e2bc4e02a1e5c8e3b710fdd1}{usbhid\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00776}00776 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00777}00777         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00778}00778         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00779}00779         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00780}00780 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00781}00781         DPRINTFN(11, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00782}00782 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00783}00783         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usbhid_8c_a98c65d11b411fd971605f9e448d67d0b}{usbhid\_enable}} == 0)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00784}00784                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00785}00785 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00786}00786         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a246691e99681281d3113d63e81b7e4f0}{usb\_mode}} != \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806ba1c7091216cfa9c9f4a252b0825ed32cb}{USB\_MODE\_HOST}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00787}00787                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00788}00788 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00789}00789         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__lookup_8c_aa691ad42d532498716f358cb1c994fb2}{usbd\_lookup\_id\_by\_uaa}}(\mbox{\hyperlink{usbhid_8c_a071f350fa7542c467572468c86408a44}{usbhid\_devs}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usbhid_8c_a071f350fa7542c467572468c86408a44}{usbhid\_devs}}), uaa);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00790}00790         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00791}00791                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00792}00792 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00793}00793         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__quirk_8h_aa149e2175189b76ffd8fd0a948bc63d4}{usb\_test\_quirk}}(uaa, \mbox{\hyperlink{usb__quirk_8h_a1fb9092bcdeada2d206bdc74afbbe122a3945e62d4b6d90c8f727188ceb59a334}{UQ\_HID\_IGNORE}}))}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00794}00794                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00795}00795 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00796}00796         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00797}00797 \textcolor{comment}{         * Setup temporary hid\_device\_info so that we can figure out some}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00798}00798 \textcolor{comment}{         * basic quirks for this device.}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00799}00799 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00800}00800         \mbox{\hyperlink{usbhid_8c_a7276d371699f7bd040f124ccc69beb61}{usbhid\_init\_device\_info}}(uaa, \&sc-\/>\mbox{\hyperlink{structusbhid__softc_aa865192c482696e3340922ec7e6caa88}{sc\_hw}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00801}00801 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00802}00802         \textcolor{keywordflow}{if} (hid\_test\_quirk(\&sc-\/>\mbox{\hyperlink{structusbhid__softc_aa865192c482696e3340922ec7e6caa88}{sc\_hw}}, HQ\_HID\_IGNORE))}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00803}00803                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00804}00804 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00805}00805         \textcolor{keywordflow}{return} (BUS\_PROBE\_GENERIC + 1);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00806}00806 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00807}00807 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00808}00808 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00809}\mbox{\hyperlink{usbhid_8c_a0c3880da7dd7e4166830add15fef9651}{00809}} \mbox{\hyperlink{usbhid_8c_a900f97bcd59540ff3d7932da8340337a}{usbhid\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00810}00810 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00811}00811         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00812}00812         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00813}00813         device\_t child;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00814}00814         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00815}00815 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00816}00816         DPRINTFN(10, \textcolor{stringliteral}{"{}sc=\%p\(\backslash\)n"{}}, sc);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00817}00817 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00818}00818         \mbox{\hyperlink{usb__util_8c_a2f65a197990caa1a69a16691ce4dc66a}{device\_set\_usb\_desc}}(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00819}00819 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00820}00820         sc-\/>\mbox{\hyperlink{structusbhid__softc_ae6a30acc0ccb69f1d292d9536836e067}{sc\_udev}} = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00821}00821         sc-\/>\mbox{\hyperlink{structusbhid__softc_a9e94790adf6b6689f9197b11c90c927b}{sc\_iface\_no}} = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a268433f99f7bfcc278a619418e3c44fa}{bIfaceNum}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00822}00822         sc-\/>\mbox{\hyperlink{structusbhid__softc_a49559585283b60e7cba1bde58b230def}{sc\_iface\_index}} = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00823}00823 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00824}00824         \mbox{\hyperlink{usbhid_8c_a2418dec4beb6a10b5540fefb6bbc6d63}{usbhid\_fill\_device\_info}}(uaa, \&sc-\/>\mbox{\hyperlink{structusbhid__softc_aa865192c482696e3340922ec7e6caa88}{sc\_hw}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00825}00825 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00826}00826         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__request_8c_accd609da95f3845ea881ee7bbc3ef075}{usbd\_req\_set\_idle}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}}, NULL,}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00827}00827             uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00828}00828         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00829}00829                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}set idle failed, error=\%s (ignored)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00830}00830                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00831}00831 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00832}00832         mtx\_init(\&sc-\/>\mbox{\hyperlink{structusbhid__softc_a921ea94c41a1616e79fc7ac95b5afaae}{sc\_mtx}}, \textcolor{stringliteral}{"{}usbhid lock"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00833}00833 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00834}00834         child = device\_add\_child(dev, \textcolor{stringliteral}{"{}hidbus"{}}, -\/1);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00835}00835         \textcolor{keywordflow}{if} (child == NULL) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00836}00836                 device\_printf(dev, \textcolor{stringliteral}{"{}Could not add hidbus device\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00837}00837                 \mbox{\hyperlink{usbhid_8c_a55f7d20c3209fe2f82dff1e69284df81}{usbhid\_detach}}(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00838}00838                 \textcolor{keywordflow}{return} (ENOMEM);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00839}00839         \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00840}00840 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00841}00841         device\_set\_ivars(child, \&sc-\/>\mbox{\hyperlink{structusbhid__softc_aa865192c482696e3340922ec7e6caa88}{sc\_hw}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00842}00842         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = bus\_generic\_attach(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00843}00843         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00844}00844                 device\_printf(dev, \textcolor{stringliteral}{"{}failed to attach child: \%d\(\backslash\)n"{}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00845}00845                 \mbox{\hyperlink{usbhid_8c_a55f7d20c3209fe2f82dff1e69284df81}{usbhid\_detach}}(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00846}00846                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00847}00847         \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00848}00848 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00849}00849         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00850}00850 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00851}00851 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00852}00852 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00853}\mbox{\hyperlink{usbhid_8c_aa019b8f4b0862047dc5eb7a3a2ea3789}{00853}} \mbox{\hyperlink{usbhid_8c_a55f7d20c3209fe2f82dff1e69284df81}{usbhid\_detach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00854}00854 \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00855}00855         \textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00856}00856 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00857}00857         device\_delete\_children(dev);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00858}00858         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structusbhid__softc_a921ea94c41a1616e79fc7ac95b5afaae}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00859}00859 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00860}00860         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00861}00861 \}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00862}00862 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00863}\mbox{\hyperlink{usbhid_8c_aadee585cefcbe67dab4530ebc7366973}{00863}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{usbhid_8c_aadee585cefcbe67dab4530ebc7366973}{usbhid\_devclass}};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00864}00864 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00865}\mbox{\hyperlink{usbhid_8c_a97394cb437bdc49eb9512dda33bb9f31}{00865}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{usbhid_8c_a97394cb437bdc49eb9512dda33bb9f31}{usbhid\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00866}00866         DEVMETHOD(device\_probe,         \mbox{\hyperlink{usbhid_8c_abf5305e5e2bc4e02a1e5c8e3b710fdd1}{usbhid\_probe}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00867}00867         DEVMETHOD(device\_attach,        \mbox{\hyperlink{usbhid_8c_a900f97bcd59540ff3d7932da8340337a}{usbhid\_attach}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00868}00868         DEVMETHOD(device\_detach,        \mbox{\hyperlink{usbhid_8c_a55f7d20c3209fe2f82dff1e69284df81}{usbhid\_detach}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00869}00869 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00870}00870         DEVMETHOD(hid\_intr\_setup,       \mbox{\hyperlink{usbhid_8c_a3d5572ecd6fb3c996605dce2ed3a394e}{usbhid\_intr\_setup}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00871}00871         DEVMETHOD(hid\_intr\_unsetup,     \mbox{\hyperlink{usbhid_8c_acd7082e0d3165353e550aea14fae527a}{usbhid\_intr\_unsetup}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00872}00872         DEVMETHOD(hid\_intr\_start,       \mbox{\hyperlink{usbhid_8c_ac5e69d2b85d8fbb73ce88f2c2c6b452b}{usbhid\_intr\_start}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00873}00873         DEVMETHOD(hid\_intr\_stop,        \mbox{\hyperlink{usbhid_8c_af91a00eee7b258f3d4c1034d9b712a3c}{usbhid\_intr\_stop}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00874}00874         DEVMETHOD(hid\_intr\_poll,        \mbox{\hyperlink{usbhid_8c_a7d8f93bad64493065ce512486ee2a179}{usbhid\_intr\_poll}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00875}00875 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00876}00876         \textcolor{comment}{/* HID interface */}}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00877}00877         DEVMETHOD(hid\_get\_rdesc,        \mbox{\hyperlink{usbhid_8c_ac3a984fb7f23662357a5fd983d48d99d}{usbhid\_get\_rdesc}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00878}00878         DEVMETHOD(hid\_read,             \mbox{\hyperlink{usbhid_8c_a14c70925219daadd88f008204907a48d}{usbhid\_read}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00879}00879         DEVMETHOD(hid\_write,            \mbox{\hyperlink{usbhid_8c_a9554130e65c6ee21e27667522357aae3}{usbhid\_write}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00880}00880         DEVMETHOD(hid\_get\_report,       \mbox{\hyperlink{usbhid_8c_acb1999502b083cf12bf083efd3a61ae8}{usbhid\_get\_report}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00881}00881         DEVMETHOD(hid\_set\_report,       \mbox{\hyperlink{usbhid_8c_ae5b395375876c407a922369ee382eddd}{usbhid\_set\_report}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00882}00882         DEVMETHOD(hid\_set\_idle,         \mbox{\hyperlink{usbhid_8c_abc7086b7f071b21180fc058983213bdc}{usbhid\_set\_idle}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00883}00883         DEVMETHOD(hid\_set\_protocol,     \mbox{\hyperlink{usbhid_8c_a70bdb90b15384fc0adc39e857a0500a9}{usbhid\_set\_protocol}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00884}00884         DEVMETHOD(hid\_ioctl,            \mbox{\hyperlink{usbhid_8c_ab5c59db84e54fe799617d26cff13f8c7}{usbhid\_ioctl}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00885}00885 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00886}00886         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00887}00887 \};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00888}00888 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00889}\mbox{\hyperlink{usbhid_8c_a14dbd499fde4652030690c9146b8b15c}{00889}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{usbhid_8c_a14dbd499fde4652030690c9146b8b15c}{usbhid\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00890}00890         .name = \textcolor{stringliteral}{"{}usbhid"{}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00891}00891         .methods = \mbox{\hyperlink{usbhid_8c_a97394cb437bdc49eb9512dda33bb9f31}{usbhid\_methods}},}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00892}00892         .size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusbhid__softc}{usbhid\_softc}}),}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00893}00893 \};}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00894}00894 }
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00895}\mbox{\hyperlink{usbhid_8c_a3f9831cf232aa2ef7e1cb5f81ceb075d}{00895}} \mbox{\hyperlink{usbhid_8c_a3f9831cf232aa2ef7e1cb5f81ceb075d}{DRIVER\_MODULE}}(usbhid, uhub, \mbox{\hyperlink{usbhid_8c_a14dbd499fde4652030690c9146b8b15c}{usbhid\_driver}}, \mbox{\hyperlink{usbhid_8c_aadee585cefcbe67dab4530ebc7366973}{usbhid\_devclass}}, NULL, 0);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00896}\mbox{\hyperlink{usbhid_8c_a52255f3a4f26247e6710ff296da93539}{00896}} \mbox{\hyperlink{usbhid_8c_a52255f3a4f26247e6710ff296da93539}{MODULE\_DEPEND}}(usbhid, \mbox{\hyperlink{usb__if_8m_adfa3f6da9c4881e494b180c4ebb06470}{usb}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00897}\mbox{\hyperlink{usbhid_8c_aff100e2efcc242227a21313ba741dc00}{00897}} \mbox{\hyperlink{usbhid_8c_a52255f3a4f26247e6710ff296da93539}{MODULE\_DEPEND}}(usbhid, hid, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00898}\mbox{\hyperlink{usbhid_8c_ac2c6c89a91364101881b95f70a323200}{00898}} \mbox{\hyperlink{usbhid_8c_a52255f3a4f26247e6710ff296da93539}{MODULE\_DEPEND}}(usbhid, hidbus, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00899}\mbox{\hyperlink{usbhid_8c_a18c7f349699be9c93e50873fcc9cc357}{00899}} \mbox{\hyperlink{usbhid_8c_a18c7f349699be9c93e50873fcc9cc357}{MODULE\_VERSION}}(usbhid, 1);}
\DoxyCodeLine{\Hypertarget{usbhid_8c_source_l00900}\mbox{\hyperlink{usbhid_8c_a52673798bb4bfd3cbf3ec720d3990299}{00900}} \mbox{\hyperlink{usbhid_8c_a52673798bb4bfd3cbf3ec720d3990299}{USB\_PNP\_HOST\_INFO}}(\mbox{\hyperlink{usbhid_8c_a071f350fa7542c467572468c86408a44}{usbhid\_devs}});}

\end{DoxyCode}
