\hypertarget{g__mouse_8c_source}{}\doxysection{g\+\_\+mouse.\+c}
\label{g__mouse_8c_source}\index{dev/usb/gadget/g\_mouse.c@{dev/usb/gadget/g\_mouse.c}}
\mbox{\hyperlink{g__mouse_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2010 Hans Petter Selasky. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00005}00005 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00006}00006 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00007}00007 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00008}00008 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00009}00009 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00010}00010 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00011}00011 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00012}00012 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00013}00013 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00014}00014 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00015}00015 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00016}00016 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00017}00017 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00018}00018 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00019}00019 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00020}00020 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00021}00021 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00022}00022 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00023}00023 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00024}00024 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00025}00025 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00026}00026 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00027}00027 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00028}00028 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00029}00029 \textcolor{comment}{ * HID spec: http://www.usb.org/developers/devclass\_docs/HID1\_11.pdf}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00030}00030 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00032}00032 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00033}\mbox{\hyperlink{g__mouse_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00033}} \mbox{\hyperlink{g__mouse_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00035}00035 \textcolor{preprocessor}{\#include <sys/stdint.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00036}00036 \textcolor{preprocessor}{\#include <sys/stddef.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00037}00037 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00038}00038 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/linker\_set.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/sx.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/callout.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00052}00052 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi__util_8h}{dev/usb/usbdi\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbhid_8h}{dev/usb/usbhid.h}}>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00057}00057 \textcolor{preprocessor}{\#include "{}usb\_if.h"{}}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00058}00058 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00059}\mbox{\hyperlink{g__mouse_8c_a927dd6f59caf10a2991dfb564bcbb1e1}{00059}} \textcolor{preprocessor}{\#define USB\_DEBUG\_VAR g\_mouse\_debug}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__debug_8h}{dev/usb/usb\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{g__mouse_8h}{dev/usb/gadget/g\_mouse.h}}>}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00064}\mbox{\hyperlink{g__mouse_8c_ac2045380ee85c2730c309f28c28c49b3}{00064}} \textcolor{keyword}{static} \mbox{\hyperlink{g__mouse_8c_ac2045380ee85c2730c309f28c28c49b3}{SYSCTL\_NODE}}(\_hw\_usb, OID\_AUTO, g\_mouse, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00065}00065     \textcolor{stringliteral}{"{}USB mouse gadget"{}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00066}00066 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00067}00067 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00068}00068 \textcolor{keyword}{static} \textcolor{keywordtype}{int} g\_mouse\_debug = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00070}00070 \mbox{\hyperlink{g__mouse_8c_a4f2dfca4c8efefde5937c5935a65b45b}{SYSCTL\_INT}}(\_hw\_usb\_g\_mouse, OID\_AUTO, \mbox{\hyperlink{cfumass_8c_ac3e1795766a80ec63b157951b4b9a7d4}{debug}}, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00071}00071     \&g\_mouse\_debug, 0, \textcolor{stringliteral}{"{}Debug level"{}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00072}00072 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00074}\mbox{\hyperlink{g__mouse_8c_a469f7f1e9ab38707dba27c003450a094}{00074}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__mouse_8c_a469f7f1e9ab38707dba27c003450a094}{g\_mouse\_mode}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00076}\mbox{\hyperlink{g__mouse_8c_a4f2dfca4c8efefde5937c5935a65b45b}{00076}} \mbox{\hyperlink{g__mouse_8c_a4f2dfca4c8efefde5937c5935a65b45b}{SYSCTL\_INT}}(\_hw\_usb\_g\_mouse, OID\_AUTO, mode, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00077}00077     \&\mbox{\hyperlink{g__mouse_8c_a469f7f1e9ab38707dba27c003450a094}{g\_mouse\_mode}}, 0, \textcolor{stringliteral}{"{}Mode selection"{}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00078}00078 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00079}\mbox{\hyperlink{g__mouse_8c_a42fb9626931d77b6bc5f0b0bf2536159}{00079}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__mouse_8c_a42fb9626931d77b6bc5f0b0bf2536159}{g\_mouse\_button\_press\_interval}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00081}\mbox{\hyperlink{g__mouse_8c_af567603072595aef6d555ff4b83a907c}{00081}} \mbox{\hyperlink{g__mouse_8c_a4f2dfca4c8efefde5937c5935a65b45b}{SYSCTL\_INT}}(\_hw\_usb\_g\_mouse, OID\_AUTO, button\_press\_interval, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00082}00082     \&\mbox{\hyperlink{g__mouse_8c_a42fb9626931d77b6bc5f0b0bf2536159}{g\_mouse\_button\_press\_interval}}, 0, \textcolor{stringliteral}{"{}Mouse button update interval in milliseconds"{}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00083}00083 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00084}\mbox{\hyperlink{g__mouse_8c_a0da0acc1948d1caa86ceb7bf19adeb8f}{00084}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__mouse_8c_a0da0acc1948d1caa86ceb7bf19adeb8f}{g\_mouse\_cursor\_update\_interval}} = 1023;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00085}00085 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00086}\mbox{\hyperlink{g__mouse_8c_ac661e9d2cc7984978b41a17d2ec16fd6}{00086}} \mbox{\hyperlink{g__mouse_8c_a4f2dfca4c8efefde5937c5935a65b45b}{SYSCTL\_INT}}(\_hw\_usb\_g\_mouse, OID\_AUTO, cursor\_update\_interval, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00087}00087     \&\mbox{\hyperlink{g__mouse_8c_a0da0acc1948d1caa86ceb7bf19adeb8f}{g\_mouse\_cursor\_update\_interval}}, 0, \textcolor{stringliteral}{"{}Mouse cursor update interval in milliseconds"{}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00088}00088 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00089}\mbox{\hyperlink{g__mouse_8c_a8829ca226bcb020d44870e1e18e81555}{00089}} \textcolor{keyword}{static} \textcolor{keywordtype}{int} \mbox{\hyperlink{g__mouse_8c_a8829ca226bcb020d44870e1e18e81555}{g\_mouse\_cursor\_radius}} = 128;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00091}\mbox{\hyperlink{g__mouse_8c_a630c44c0b7020da1cf9ad2b4a98d3928}{00091}} \mbox{\hyperlink{g__mouse_8c_a4f2dfca4c8efefde5937c5935a65b45b}{SYSCTL\_INT}}(\_hw\_usb\_g\_mouse, OID\_AUTO, cursor\_radius, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00092}00092     \&\mbox{\hyperlink{g__mouse_8c_a8829ca226bcb020d44870e1e18e81555}{g\_mouse\_cursor\_radius}}, 0, \textcolor{stringliteral}{"{}Mouse cursor radius in pixels"{}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00094}\mbox{\hyperlink{structg__mouse__data}{00094}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__mouse__data}{g\_mouse\_data}} \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00095}\mbox{\hyperlink{structg__mouse__data_a33e2fa52495083f06d2822a0b62ced95}{00095}}         uint8\_t \mbox{\hyperlink{structg__mouse__data_a33e2fa52495083f06d2822a0b62ced95}{buttons}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00096}\mbox{\hyperlink{g__mouse_8c_a42f2a681316f6b6dad5da38ae1084a3e}{00096}} \textcolor{preprocessor}{\#define BUT\_0 0x01}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00097}\mbox{\hyperlink{g__mouse_8c_a4b8646a7f09e059dfd6cad001dca786a}{00097}} \textcolor{preprocessor}{\#define BUT\_1 0x02}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00098}\mbox{\hyperlink{g__mouse_8c_a3c6faee714c3d6c4ffb443732f2f7f79}{00098}} \textcolor{preprocessor}{\#define BUT\_2 0x04}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00099}\mbox{\hyperlink{structg__mouse__data_a8da0e9c92e448fca77cd57c06ae87b69}{00099}}         int8\_t \mbox{\hyperlink{structg__mouse__data_a8da0e9c92e448fca77cd57c06ae87b69}{dx}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00100}\mbox{\hyperlink{structg__mouse__data_ac49d6822739ba5e6a0bf6fe8541ec48e}{00100}}         int8\_t \mbox{\hyperlink{structg__mouse__data_ac49d6822739ba5e6a0bf6fe8541ec48e}{dy}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00101}\mbox{\hyperlink{structg__mouse__data_a0958b80d2befb4244fcfb31b422f254c}{00101}}         int8\_t \mbox{\hyperlink{structg__mouse__data_a0958b80d2befb4244fcfb31b422f254c}{dz}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00102}00102 \};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00103}00103 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00104}00104 \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00105}\mbox{\hyperlink{g__mouse_8c_a726ca809ffd3d67ab4b8476646f26635a427597dab9abfd43be3435200f24b2b9}{00105}}         \mbox{\hyperlink{g__mouse_8c_a726ca809ffd3d67ab4b8476646f26635a427597dab9abfd43be3435200f24b2b9}{G\_MOUSE\_INTR\_DT}},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00106}\mbox{\hyperlink{g__mouse_8c_a726ca809ffd3d67ab4b8476646f26635a185f978bd8163facaaf7d84c77e0d4e5}{00106}}         \mbox{\hyperlink{g__mouse_8c_a726ca809ffd3d67ab4b8476646f26635a185f978bd8163facaaf7d84c77e0d4e5}{G\_MOUSE\_N\_TRANSFER}},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00107}00107 \};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00108}00108 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00109}\mbox{\hyperlink{structg__mouse__softc}{00109}} \textcolor{keyword}{struct }\mbox{\hyperlink{structg__mouse__softc}{g\_mouse\_softc}} \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00110}\mbox{\hyperlink{structg__mouse__softc_ae09e7b0da46710633fc88a76318e6f99}{00110}}         \textcolor{keyword}{struct }mtx \mbox{\hyperlink{structg__mouse__softc_ae09e7b0da46710633fc88a76318e6f99}{sc\_mtx}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00111}\mbox{\hyperlink{structg__mouse__softc_a920c69255d4f5059acd5838de8de0a79}{00111}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__callout}{usb\_callout}} \mbox{\hyperlink{structg__mouse__softc_a920c69255d4f5059acd5838de8de0a79}{sc\_button\_press\_callout}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00112}\mbox{\hyperlink{structg__mouse__softc_a369b5f55b1cfbb3df14988e92e698eb4}{00112}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__callout}{usb\_callout}} \mbox{\hyperlink{structg__mouse__softc_a369b5f55b1cfbb3df14988e92e698eb4}{sc\_cursor\_update\_callout}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00113}\mbox{\hyperlink{structg__mouse__softc_ae719770e5ecf90704b897bde26b55b70}{00113}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__mouse__data}{g\_mouse\_data}} \mbox{\hyperlink{structg__mouse__softc_ae719770e5ecf90704b897bde26b55b70}{sc\_data}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00114}\mbox{\hyperlink{structg__mouse__softc_adeb78fe3c0302be406c8bc0e25149165}{00114}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *\mbox{\hyperlink{structg__mouse__softc_adeb78fe3c0302be406c8bc0e25149165}{sc\_xfer}}[\mbox{\hyperlink{g__mouse_8c_a726ca809ffd3d67ab4b8476646f26635a185f978bd8163facaaf7d84c77e0d4e5}{G\_MOUSE\_N\_TRANSFER}}];}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00115}00115 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00116}\mbox{\hyperlink{structg__mouse__softc_af84c1097a0837156cce840d59a553665}{00116}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structg__mouse__softc_af84c1097a0837156cce840d59a553665}{sc\_mode}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00117}\mbox{\hyperlink{structg__mouse__softc_ac4898473b475f304a39c9a970f8ff31f}{00117}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structg__mouse__softc_ac4898473b475f304a39c9a970f8ff31f}{sc\_radius}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00118}\mbox{\hyperlink{structg__mouse__softc_a26b6a0e6c76d465330131987619b10d3}{00118}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structg__mouse__softc_a26b6a0e6c76d465330131987619b10d3}{sc\_last\_x\_state}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00119}\mbox{\hyperlink{structg__mouse__softc_a87cbf81151963485c31d251a9ee043a2}{00119}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structg__mouse__softc_a87cbf81151963485c31d251a9ee043a2}{sc\_last\_y\_state}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00120}\mbox{\hyperlink{structg__mouse__softc_a2e03fb3d3b41dec84a9b7fe01008c28e}{00120}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structg__mouse__softc_a2e03fb3d3b41dec84a9b7fe01008c28e}{sc\_curr\_x\_state}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00121}\mbox{\hyperlink{structg__mouse__softc_ac845c1b310e444f38de4d8b32cc29e7f}{00121}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structg__mouse__softc_ac845c1b310e444f38de4d8b32cc29e7f}{sc\_curr\_y\_state}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00122}\mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{00122}}         \textcolor{keywordtype}{int}     \mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{sc\_tick}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00124}\mbox{\hyperlink{structg__mouse__softc_ae65ded82860a924ea91544ddadef0671}{00124}}         uint8\_t \mbox{\hyperlink{structg__mouse__softc_ae65ded82860a924ea91544ddadef0671}{sc\_do\_cursor\_update}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00125}\mbox{\hyperlink{structg__mouse__softc_a5f7debeb2a9bd10b7304320fcc8ca746}{00125}}         uint8\_t \mbox{\hyperlink{structg__mouse__softc_a5f7debeb2a9bd10b7304320fcc8ca746}{sc\_do\_button\_update}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00126}00126 \};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00127}00127 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00128}\mbox{\hyperlink{g__mouse_8c_a3043fb4c5716d4bac51f294e61fb55a3}{00128}} \textcolor{keyword}{static} device\_probe\_t \mbox{\hyperlink{g__mouse_8c_a3043fb4c5716d4bac51f294e61fb55a3}{g\_mouse\_probe}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00129}\mbox{\hyperlink{g__mouse_8c_abf4e25b6ee645ffb65f259395f662bf2}{00129}} \textcolor{keyword}{static} device\_attach\_t \mbox{\hyperlink{g__mouse_8c_abf4e25b6ee645ffb65f259395f662bf2}{g\_mouse\_attach}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00130}\mbox{\hyperlink{g__mouse_8c_afa61e2310b3aea70c31f09d2728cbc41}{00130}} \textcolor{keyword}{static} device\_detach\_t \mbox{\hyperlink{g__mouse_8c_afa61e2310b3aea70c31f09d2728cbc41}{g\_mouse\_detach}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00131}\mbox{\hyperlink{g__mouse_8c_aef18d43518b58928370d7c695757406d}{00131}} \textcolor{keyword}{static} usb\_handle\_request\_t \mbox{\hyperlink{g__mouse_8c_aef18d43518b58928370d7c695757406d}{g\_mouse\_handle\_request}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00132}\mbox{\hyperlink{g__mouse_8c_aa62875f155e920a2f5a4ee0130591ee1}{00132}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{g__mouse_8c_aa62875f155e920a2f5a4ee0130591ee1}{g\_mouse\_intr\_callback}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00133}00133 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00134}\mbox{\hyperlink{g__mouse_8c_a9ed9b9722ed5d710760c1492e46c4c41}{00134}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{g__mouse_8c_a9ed9b9722ed5d710760c1492e46c4c41}{g\_mouse\_devclass}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00135}00135 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00136}\mbox{\hyperlink{g__mouse_8c_a971052ec9492288cd00489a680c86b25}{00136}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{g__mouse_8c_a971052ec9492288cd00489a680c86b25}{g\_mouse\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00137}00137         \textcolor{comment}{/* USB interface */}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00138}00138         DEVMETHOD(\mbox{\hyperlink{usb__handle__request_8c_acd7ff252b93f3bd9e87d0f8b3eb3ffa5}{usb\_handle\_request}}, \mbox{\hyperlink{g__mouse_8c_aef18d43518b58928370d7c695757406d}{g\_mouse\_handle\_request}}),}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00139}00139 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00140}00140         \textcolor{comment}{/* Device interface */}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00141}00141         DEVMETHOD(device\_probe, \mbox{\hyperlink{g__mouse_8c_a3043fb4c5716d4bac51f294e61fb55a3}{g\_mouse\_probe}}),}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00142}00142         DEVMETHOD(device\_attach, \mbox{\hyperlink{g__mouse_8c_abf4e25b6ee645ffb65f259395f662bf2}{g\_mouse\_attach}}),}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00143}00143         DEVMETHOD(device\_detach, \mbox{\hyperlink{g__mouse_8c_afa61e2310b3aea70c31f09d2728cbc41}{g\_mouse\_detach}}),}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00144}00144 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00145}00145         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00146}00146 \};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00147}00147 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00148}\mbox{\hyperlink{g__mouse_8c_a6ad62ec14f0ea8ffc3c156137d7a7f6b}{00148}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{g__mouse_8c_a6ad62ec14f0ea8ffc3c156137d7a7f6b}{g\_mouse\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00149}00149         .name = \textcolor{stringliteral}{"{}g\_mouse"{}},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00150}00150         .methods = \mbox{\hyperlink{g__mouse_8c_a971052ec9492288cd00489a680c86b25}{g\_mouse\_methods}},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00151}00151         .size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structg__mouse__softc}{g\_mouse\_softc}}),}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00152}00152 \};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00153}00153 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00154}\mbox{\hyperlink{g__mouse_8c_a8616658c53d2469b06bb0de020796049}{00154}} \mbox{\hyperlink{g__mouse_8c_a8616658c53d2469b06bb0de020796049}{DRIVER\_MODULE}}(g\_mouse, uhub, \mbox{\hyperlink{g__mouse_8c_a6ad62ec14f0ea8ffc3c156137d7a7f6b}{g\_mouse\_driver}}, \mbox{\hyperlink{g__mouse_8c_a9ed9b9722ed5d710760c1492e46c4c41}{g\_mouse\_devclass}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00155}\mbox{\hyperlink{g__mouse_8c_a501a3f10a39617e2a0a99da0ac33e6c0}{00155}} \mbox{\hyperlink{g__mouse_8c_a501a3f10a39617e2a0a99da0ac33e6c0}{MODULE\_DEPEND}}(g\_mouse, \mbox{\hyperlink{usb__if_8m_adfa3f6da9c4881e494b180c4ebb06470}{usb}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00156}00156 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00157}\mbox{\hyperlink{g__mouse_8c_ab950c5202dc85e3a5794048551d9bcf7}{00157}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} \mbox{\hyperlink{g__mouse_8c_ab950c5202dc85e3a5794048551d9bcf7}{g\_mouse\_config}}[\mbox{\hyperlink{g__mouse_8c_a726ca809ffd3d67ab4b8476646f26635a185f978bd8163facaaf7d84c77e0d4e5}{G\_MOUSE\_N\_TRANSFER}}] = \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00158}00158         [\mbox{\hyperlink{g__mouse_8c_a726ca809ffd3d67ab4b8476646f26635a427597dab9abfd43be3435200f24b2b9}{G\_MOUSE\_INTR\_DT}}] = \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00159}00159                 .\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} = \mbox{\hyperlink{usb_8h_a01e28e87ad16f6dfffefc6ccab08baed}{UE\_INTERRUPT}},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00160}00160                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00161}00161                 .direction = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00162}00162                 .flags = \{.ext\_buffer = 1,.pipe\_bof = 1,\},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00163}00163                 .bufsize = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structg__mouse__data}{g\_mouse\_data}}),}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00164}00164                 .callback = \&\mbox{\hyperlink{g__mouse_8c_aa62875f155e920a2f5a4ee0130591ee1}{g\_mouse\_intr\_callback}},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00165}00165                 .frames = 1,}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00166}00166                 .usb\_mode = \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806bada6c05f1ad342e782a92990170fca2cc}{USB\_MODE\_DEVICE}},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00167}00167         \},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00168}00168 \};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00169}00169 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00170}00170 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__mouse_8c_a2d056b90f2e3e5f7f965c8e94a6e9d8e}{g\_mouse\_button\_press\_timeout}}(\textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00171}00171 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{g__mouse_8c_a874551513849ca9e4de8d0f2b4d2ca50}{g\_mouse\_cursor\_update\_timeout}}(\textcolor{keywordtype}{void} *arg);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00172}00172 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00173}00173 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00174}\mbox{\hyperlink{g__mouse_8c_abee1128a112d4cdd7725195c2821945f}{00174}} \mbox{\hyperlink{g__mouse_8c_abee1128a112d4cdd7725195c2821945f}{g\_mouse\_button\_press\_timeout\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__mouse__softc}{g\_mouse\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00175}00175 \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00176}00176         \textcolor{keywordtype}{int} i = \mbox{\hyperlink{g__mouse_8c_a42fb9626931d77b6bc5f0b0bf2536159}{g\_mouse\_button\_press\_interval}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00177}00177 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00178}00178         \textcolor{keywordflow}{if} (i <= 0) \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00179}00179                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae719770e5ecf90704b897bde26b55b70}{sc\_data}}.\mbox{\hyperlink{structg__mouse__data_a33e2fa52495083f06d2822a0b62ced95}{buttons}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00180}00180                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_a5f7debeb2a9bd10b7304320fcc8ca746}{sc\_do\_button\_update}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00181}00181         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00182}00182                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_a5f7debeb2a9bd10b7304320fcc8ca746}{sc\_do\_button\_update}} = 1;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00183}00183         \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00184}00184 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00185}00185         \textcolor{keywordflow}{if} ((i <= 0) || (i > 1023))}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00186}00186                 i = 1023;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00188}00188         i = \mbox{\hyperlink{usbdi_8h_a9715d25e0db2e92bd86423a9283893b7}{USB\_MS\_TO\_TICKS}}(i);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00189}00189 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00190}00190         \mbox{\hyperlink{usbdi_8h_a5ba556ca3595eb8006822a123ac9d54f}{usb\_callout\_reset}}(\&sc-\/>\mbox{\hyperlink{structg__mouse__softc_a920c69255d4f5059acd5838de8de0a79}{sc\_button\_press\_callout}}, i, }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00191}00191             \&\mbox{\hyperlink{g__mouse_8c_a2d056b90f2e3e5f7f965c8e94a6e9d8e}{g\_mouse\_button\_press\_timeout}}, sc);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00192}00192 \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00194}00194 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00195}\mbox{\hyperlink{g__mouse_8c_a88535aac47432bd1ffefaecd5eb90990}{00195}} \mbox{\hyperlink{g__mouse_8c_a88535aac47432bd1ffefaecd5eb90990}{g\_mouse\_cursor\_update\_timeout\_reset}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__mouse__softc}{g\_mouse\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00196}00196 \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00197}00197         \textcolor{keywordtype}{int} i = \mbox{\hyperlink{g__mouse_8c_a0da0acc1948d1caa86ceb7bf19adeb8f}{g\_mouse\_cursor\_update\_interval}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00198}00198 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00199}00199         \textcolor{keywordflow}{if} (i <= 0) \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00200}00200                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae719770e5ecf90704b897bde26b55b70}{sc\_data}}.\mbox{\hyperlink{structg__mouse__data_a8da0e9c92e448fca77cd57c06ae87b69}{dx}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00201}00201                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae719770e5ecf90704b897bde26b55b70}{sc\_data}}.\mbox{\hyperlink{structg__mouse__data_ac49d6822739ba5e6a0bf6fe8541ec48e}{dy}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00202}00202                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae65ded82860a924ea91544ddadef0671}{sc\_do\_cursor\_update}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00203}00203                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{sc\_tick}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00204}00204         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00205}00205                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae65ded82860a924ea91544ddadef0671}{sc\_do\_cursor\_update}} = 1;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00206}00206         \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00207}00207 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00208}00208         \textcolor{keywordflow}{if} ((i <= 0) || (i > 1023))}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00209}00209                 i = 1023;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00210}00210 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00211}00211         i = \mbox{\hyperlink{usbdi_8h_a9715d25e0db2e92bd86423a9283893b7}{USB\_MS\_TO\_TICKS}}(i);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00212}00212 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00213}00213         \mbox{\hyperlink{usbdi_8h_a5ba556ca3595eb8006822a123ac9d54f}{usb\_callout\_reset}}(\&sc-\/>\mbox{\hyperlink{structg__mouse__softc_a369b5f55b1cfbb3df14988e92e698eb4}{sc\_cursor\_update\_callout}}, i, }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00214}00214             \&\mbox{\hyperlink{g__mouse_8c_a874551513849ca9e4de8d0f2b4d2ca50}{g\_mouse\_cursor\_update\_timeout}}, sc);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00215}00215 \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00216}00216 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00217}00217 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00218}\mbox{\hyperlink{g__mouse_8c_aaeaddfd617fd23621393f317b408b5b2}{00218}} \mbox{\hyperlink{g__mouse_8c_aaeaddfd617fd23621393f317b408b5b2}{g\_mouse\_update\_mode\_radius}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structg__mouse__softc}{g\_mouse\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00219}00219 \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00220}00220         sc-\/>\mbox{\hyperlink{structg__mouse__softc_af84c1097a0837156cce840d59a553665}{sc\_mode}} = \mbox{\hyperlink{g__mouse_8c_a469f7f1e9ab38707dba27c003450a094}{g\_mouse\_mode}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00221}00221         sc-\/>\mbox{\hyperlink{structg__mouse__softc_ac4898473b475f304a39c9a970f8ff31f}{sc\_radius}} = \mbox{\hyperlink{g__mouse_8c_a8829ca226bcb020d44870e1e18e81555}{g\_mouse\_cursor\_radius}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00222}00222 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00223}00223         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__mouse__softc_ac4898473b475f304a39c9a970f8ff31f}{sc\_radius}} < 0)}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00224}00224                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_ac4898473b475f304a39c9a970f8ff31f}{sc\_radius}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00225}00225         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__mouse__softc_ac4898473b475f304a39c9a970f8ff31f}{sc\_radius}} > 1023)}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00226}00226                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_ac4898473b475f304a39c9a970f8ff31f}{sc\_radius}} = 1023;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00227}00227 \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00228}00228 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00229}00229 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00230}\mbox{\hyperlink{g__mouse_8c_a2d056b90f2e3e5f7f965c8e94a6e9d8e}{00230}} \mbox{\hyperlink{g__mouse_8c_a2d056b90f2e3e5f7f965c8e94a6e9d8e}{g\_mouse\_button\_press\_timeout}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00231}00231 \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00232}00232         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__mouse__softc}{g\_mouse\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00233}00233 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00234}00234         \mbox{\hyperlink{g__mouse_8c_aaeaddfd617fd23621393f317b408b5b2}{g\_mouse\_update\_mode\_radius}}(sc);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00235}00235 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00236}00236         DPRINTFN(11, \textcolor{stringliteral}{"{}Timeout \%p (button press)\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structg__mouse__softc_adeb78fe3c0302be406c8bc0e25149165}{sc\_xfer}}[\mbox{\hyperlink{g__mouse_8c_a726ca809ffd3d67ab4b8476646f26635a427597dab9abfd43be3435200f24b2b9}{G\_MOUSE\_INTR\_DT}}]);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00237}00237 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00238}00238         \mbox{\hyperlink{g__mouse_8c_abee1128a112d4cdd7725195c2821945f}{g\_mouse\_button\_press\_timeout\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00239}00239 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00240}00240         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structg__mouse__softc_adeb78fe3c0302be406c8bc0e25149165}{sc\_xfer}}[\mbox{\hyperlink{g__mouse_8c_a726ca809ffd3d67ab4b8476646f26635a427597dab9abfd43be3435200f24b2b9}{G\_MOUSE\_INTR\_DT}}]);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00241}00241 \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00242}00242 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00243}00243 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00244}\mbox{\hyperlink{g__mouse_8c_a874551513849ca9e4de8d0f2b4d2ca50}{00244}} \mbox{\hyperlink{g__mouse_8c_a874551513849ca9e4de8d0f2b4d2ca50}{g\_mouse\_cursor\_update\_timeout}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00245}00245 \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00246}00246         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__mouse__softc}{g\_mouse\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00247}00247 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00248}00248         \mbox{\hyperlink{g__mouse_8c_aaeaddfd617fd23621393f317b408b5b2}{g\_mouse\_update\_mode\_radius}}(sc);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00249}00249 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00250}00250         DPRINTFN(11, \textcolor{stringliteral}{"{}Timeout \%p (cursor update)\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structg__mouse__softc_adeb78fe3c0302be406c8bc0e25149165}{sc\_xfer}}[\mbox{\hyperlink{g__mouse_8c_a726ca809ffd3d67ab4b8476646f26635a427597dab9abfd43be3435200f24b2b9}{G\_MOUSE\_INTR\_DT}}]);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00251}00251 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00252}00252         \mbox{\hyperlink{g__mouse_8c_a88535aac47432bd1ffefaecd5eb90990}{g\_mouse\_cursor\_update\_timeout\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00253}00253 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00254}00254         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structg__mouse__softc_adeb78fe3c0302be406c8bc0e25149165}{sc\_xfer}}[\mbox{\hyperlink{g__mouse_8c_a726ca809ffd3d67ab4b8476646f26635a427597dab9abfd43be3435200f24b2b9}{G\_MOUSE\_INTR\_DT}}]);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00255}00255 \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00256}00256 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00257}00257 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00258}\mbox{\hyperlink{g__mouse_8c_a3baeb44bf57e19370e7dc320add7dc37}{00258}} \mbox{\hyperlink{g__mouse_8c_a3043fb4c5716d4bac51f294e61fb55a3}{g\_mouse\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00259}00259 \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00260}00260         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00261}00261 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00262}00262         DPRINTFN(11, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00263}00263 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00264}00264         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a246691e99681281d3113d63e81b7e4f0}{usb\_mode}} != \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806bada6c05f1ad342e782a92990170fca2cc}{USB\_MODE\_DEVICE}})}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00265}00265                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00266}00266 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00267}00267         \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{g__mouse_8c_source_l00268}00268             (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_aa8ed5421fc671dcbd1fefb09180b604c}{bInterfaceSubClass}} == \mbox{\hyperlink{usb_8h_a52fa495c7147e166f647c179db74b0bd}{UISUBCLASS\_BOOT}}) \&\&}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00269}00269             (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_ae7cd4aacf13732f19919bf228d2b2ef4}{bInterfaceProtocol}} == \mbox{\hyperlink{usb_8h_accb9a682a6a90dd82a1d0f46b1420578}{UIPROTO\_MOUSE}}))}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00270}00270                 \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00271}00271 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00272}00272         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00273}00273 \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00274}00274 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00275}00275 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00276}\mbox{\hyperlink{g__mouse_8c_a299788cba737077a1186456260e84b39}{00276}} \mbox{\hyperlink{g__mouse_8c_abf4e25b6ee645ffb65f259395f662bf2}{g\_mouse\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00277}00277 \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00278}00278         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__mouse__softc}{g\_mouse\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00279}00279         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00280}00280         \textcolor{keywordtype}{int} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00281}00281 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00282}00282         DPRINTFN(11, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00283}00283 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00284}00284         \mbox{\hyperlink{usb__util_8c_a2f65a197990caa1a69a16691ce4dc66a}{device\_set\_usb\_desc}}(dev);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00285}00285 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00286}00286         mtx\_init(\&sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae09e7b0da46710633fc88a76318e6f99}{sc\_mtx}}, \textcolor{stringliteral}{"{}g\_mouse"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00287}00287 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00288}00288         \mbox{\hyperlink{usbdi_8h_a1f241362056f1ed3d4c4b5cfb63ce8e5}{usb\_callout\_init\_mtx}}(\&sc-\/>\mbox{\hyperlink{structg__mouse__softc_a920c69255d4f5059acd5838de8de0a79}{sc\_button\_press\_callout}}, \&sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae09e7b0da46710633fc88a76318e6f99}{sc\_mtx}}, 0);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00289}00289         \mbox{\hyperlink{usbdi_8h_a1f241362056f1ed3d4c4b5cfb63ce8e5}{usb\_callout\_init\_mtx}}(\&sc-\/>\mbox{\hyperlink{structg__mouse__softc_a369b5f55b1cfbb3df14988e92e698eb4}{sc\_cursor\_update\_callout}}, \&sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae09e7b0da46710633fc88a76318e6f99}{sc\_mtx}}, 0);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00290}00290 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00291}00291         sc-\/>\mbox{\hyperlink{structg__mouse__softc_af84c1097a0837156cce840d59a553665}{sc\_mode}} = \mbox{\hyperlink{g__mouse_8h_a268df4041d005a07f556c5c34fe13134}{G\_MOUSE\_MODE\_SILENT}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00292}00292 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00293}00293         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__transfer_8c_a7494c04fae5c5e7ef1af436308670a21}{usbd\_transfer\_setup}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00294}00294             \&uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}}, sc-\/>\mbox{\hyperlink{structg__mouse__softc_adeb78fe3c0302be406c8bc0e25149165}{sc\_xfer}}, \mbox{\hyperlink{g__mouse_8c_ab950c5202dc85e3a5794048551d9bcf7}{g\_mouse\_config}},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00295}00295             \mbox{\hyperlink{g__mouse_8c_a726ca809ffd3d67ab4b8476646f26635a185f978bd8163facaaf7d84c77e0d4e5}{G\_MOUSE\_N\_TRANSFER}}, sc, \&sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae09e7b0da46710633fc88a76318e6f99}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00296}00296 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00297}00297         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00298}00298                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}error=\%s\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00299}00299                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00300}00300         \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00301}00301 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00302}00302         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae09e7b0da46710633fc88a76318e6f99}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00303}00303         \mbox{\hyperlink{g__mouse_8c_abee1128a112d4cdd7725195c2821945f}{g\_mouse\_button\_press\_timeout\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00304}00304         \mbox{\hyperlink{g__mouse_8c_a88535aac47432bd1ffefaecd5eb90990}{g\_mouse\_cursor\_update\_timeout\_reset}}(sc);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00305}00305         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae09e7b0da46710633fc88a76318e6f99}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00306}00306 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00307}00307         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00308}00308 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00309}00309 detach:}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00310}00310         \mbox{\hyperlink{g__mouse_8c_afa61e2310b3aea70c31f09d2728cbc41}{g\_mouse\_detach}}(dev);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00311}00311 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00312}00312         \textcolor{keywordflow}{return} (ENXIO);                 \textcolor{comment}{/* error */}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00313}00313 \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00314}00314 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00315}00315 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00316}\mbox{\hyperlink{g__mouse_8c_a7917c6355fb9321a3375c74a19ea3aa4}{00316}} \mbox{\hyperlink{g__mouse_8c_afa61e2310b3aea70c31f09d2728cbc41}{g\_mouse\_detach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00317}00317 \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00318}00318         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__mouse__softc}{g\_mouse\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00319}00319 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00320}00320         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00321}00321 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00322}00322         mtx\_lock(\&sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae09e7b0da46710633fc88a76318e6f99}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00323}00323         \mbox{\hyperlink{usbdi_8h_ad74dd2f25febf2ba5083574711e4101a}{usb\_callout\_stop}}(\&sc-\/>\mbox{\hyperlink{structg__mouse__softc_a920c69255d4f5059acd5838de8de0a79}{sc\_button\_press\_callout}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00324}00324         \mbox{\hyperlink{usbdi_8h_ad74dd2f25febf2ba5083574711e4101a}{usb\_callout\_stop}}(\&sc-\/>\mbox{\hyperlink{structg__mouse__softc_a369b5f55b1cfbb3df14988e92e698eb4}{sc\_cursor\_update\_callout}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00325}00325         mtx\_unlock(\&sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae09e7b0da46710633fc88a76318e6f99}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00326}00326 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00327}00327         \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structg__mouse__softc_adeb78fe3c0302be406c8bc0e25149165}{sc\_xfer}}, \mbox{\hyperlink{g__mouse_8c_a726ca809ffd3d67ab4b8476646f26635a185f978bd8163facaaf7d84c77e0d4e5}{G\_MOUSE\_N\_TRANSFER}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00328}00328 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00329}00329         \mbox{\hyperlink{usbdi_8h_a828c4d79b0d9b11c8dcb77899a2bffda}{usb\_callout\_drain}}(\&sc-\/>\mbox{\hyperlink{structg__mouse__softc_a920c69255d4f5059acd5838de8de0a79}{sc\_button\_press\_callout}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00330}00330         \mbox{\hyperlink{usbdi_8h_a828c4d79b0d9b11c8dcb77899a2bffda}{usb\_callout\_drain}}(\&sc-\/>\mbox{\hyperlink{structg__mouse__softc_a369b5f55b1cfbb3df14988e92e698eb4}{sc\_cursor\_update\_callout}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00331}00331 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00332}00332         mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae09e7b0da46710633fc88a76318e6f99}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00333}00333 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00334}00334         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00335}00335 \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00336}00336 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00337}00337 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00338}\mbox{\hyperlink{g__mouse_8c_a267a957852a07f0b4ece93748eb006ed}{00338}} \mbox{\hyperlink{g__mouse_8c_aa62875f155e920a2f5a4ee0130591ee1}{g\_mouse\_intr\_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{g__mouse_8c_source_l00339}00339 \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00340}00340         \textcolor{keyword}{struct }\mbox{\hyperlink{structg__mouse__softc}{g\_mouse\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00341}00341         \textcolor{keywordtype}{int} actlen;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00342}00342         \textcolor{keywordtype}{int} aframes;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00343}00343         \textcolor{keywordtype}{int} dx;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00344}00344         \textcolor{keywordtype}{int} dy;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00345}00345         \textcolor{keywordtype}{int} radius;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00347}00347         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&actlen, NULL, \&aframes, NULL);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00348}00348 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00349}00349         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}st=\%d aframes=\%d actlen=\%d bytes\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00350}00350             \mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer), aframes, actlen);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00351}00351 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00352}00352         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00353}00353         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00354}00354                 \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae65ded82860a924ea91544ddadef0671}{sc\_do\_cursor\_update}} || sc-\/>\mbox{\hyperlink{structg__mouse__softc_a5f7debeb2a9bd10b7304320fcc8ca746}{sc\_do\_button\_update}}))}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00355}00355                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00356}00356 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00357}00357         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00358}00358 tr\_setup:}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00359}00359 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00360}00360           \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae65ded82860a924ea91544ddadef0671}{sc\_do\_cursor\_update}}) \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00361}00361                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae65ded82860a924ea91544ddadef0671}{sc\_do\_cursor\_update}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00362}00362                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{sc\_tick}} += 80;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00363}00363                 \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{sc\_tick}} < 0) || (sc-\/>\mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{sc\_tick}} > 7999))}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00364}00364                         sc-\/>\mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{sc\_tick}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00365}00365           \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00366}00366 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00367}00367           \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__mouse__softc_a5f7debeb2a9bd10b7304320fcc8ca746}{sc\_do\_button\_update}}) \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00368}00368                         sc-\/>\mbox{\hyperlink{structg__mouse__softc_a5f7debeb2a9bd10b7304320fcc8ca746}{sc\_do\_button\_update}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00369}00369                         sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae719770e5ecf90704b897bde26b55b70}{sc\_data}}.\mbox{\hyperlink{structg__mouse__data_a33e2fa52495083f06d2822a0b62ced95}{buttons}} \string^= \mbox{\hyperlink{g__mouse_8c_a42f2a681316f6b6dad5da38ae1084a3e}{BUT\_0}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00370}00370           \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00371}00371 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00372}00372           radius = sc-\/>\mbox{\hyperlink{structg__mouse__softc_ac4898473b475f304a39c9a970f8ff31f}{sc\_radius}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00373}00373 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00374}00374                 \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structg__mouse__softc_af84c1097a0837156cce840d59a553665}{sc\_mode}}) \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00375}00375                 \textcolor{keywordflow}{case} \mbox{\hyperlink{g__mouse_8h_a268df4041d005a07f556c5c34fe13134}{G\_MOUSE\_MODE\_SILENT}}:}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00376}00376                         sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae719770e5ecf90704b897bde26b55b70}{sc\_data}}.\mbox{\hyperlink{structg__mouse__data_a33e2fa52495083f06d2822a0b62ced95}{buttons}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00377}00377                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00378}00378                 \textcolor{keywordflow}{case} \mbox{\hyperlink{g__mouse_8h_add89200dcd20e6dfd1708d8896c4232b}{G\_MOUSE\_MODE\_SPIRAL}}:}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00379}00379                         radius = (radius * (8000-\/sc-\/>\mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{sc\_tick}})) / 8000;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00380}00380                 \textcolor{keywordflow}{case} \mbox{\hyperlink{g__mouse_8h_aab3dcb4f8973dda18bc92b366269b54c}{G\_MOUSE\_MODE\_CIRCLE}}:}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00381}00381                         \textcolor{comment}{/* TODO */}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00382}00382                         sc-\/>\mbox{\hyperlink{structg__mouse__softc_ac845c1b310e444f38de4d8b32cc29e7f}{sc\_curr\_y\_state}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00383}00383                         sc-\/>\mbox{\hyperlink{structg__mouse__softc_a2e03fb3d3b41dec84a9b7fe01008c28e}{sc\_curr\_x\_state}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00384}00384                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00385}00385                 \textcolor{keywordflow}{case} \mbox{\hyperlink{g__mouse_8h_abf547d2ce6c9df7732d0fecd6119ba6b}{G\_MOUSE\_MODE\_BOX}}:}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00386}00386                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{sc\_tick}} < 2000) \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00387}00387                                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_a2e03fb3d3b41dec84a9b7fe01008c28e}{sc\_curr\_x\_state}} = (sc-\/>\mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{sc\_tick}} * radius) / 2000;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00388}00388                                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_ac845c1b310e444f38de4d8b32cc29e7f}{sc\_curr\_y\_state}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00389}00389                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{sc\_tick}} < 4000) \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00390}00390                                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_a2e03fb3d3b41dec84a9b7fe01008c28e}{sc\_curr\_x\_state}} = radius;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00391}00391                                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_ac845c1b310e444f38de4d8b32cc29e7f}{sc\_curr\_y\_state}} = -\/(((sc-\/>\mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{sc\_tick}} -\/ 2000) * radius) / 2000);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00392}00392                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{sc\_tick}} < 6000) \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00393}00393                                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_a2e03fb3d3b41dec84a9b7fe01008c28e}{sc\_curr\_x\_state}} = radius -\/ (((sc-\/>\mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{sc\_tick}} -\/ 4000) * radius) / 2000);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00394}00394                                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_ac845c1b310e444f38de4d8b32cc29e7f}{sc\_curr\_y\_state}} = -\/radius;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00395}00395                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00396}00396                                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_a2e03fb3d3b41dec84a9b7fe01008c28e}{sc\_curr\_x\_state}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00397}00397                                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_ac845c1b310e444f38de4d8b32cc29e7f}{sc\_curr\_y\_state}} = -\/radius + (((sc-\/>\mbox{\hyperlink{structg__mouse__softc_a167ada9dfd2f9dbafb41db9a0b920140}{sc\_tick}} -\/ 6000) * radius) / 2000);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00398}00398                         \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00399}00399                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00400}00400                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00401}00401                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00402}00402                 \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00403}00403 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00404}00404                 dx = sc-\/>\mbox{\hyperlink{structg__mouse__softc_a2e03fb3d3b41dec84a9b7fe01008c28e}{sc\_curr\_x\_state}} -\/ sc-\/>\mbox{\hyperlink{structg__mouse__softc_a26b6a0e6c76d465330131987619b10d3}{sc\_last\_x\_state}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00405}00405                 dy = sc-\/>\mbox{\hyperlink{structg__mouse__softc_ac845c1b310e444f38de4d8b32cc29e7f}{sc\_curr\_y\_state}} -\/ sc-\/>\mbox{\hyperlink{structg__mouse__softc_a87cbf81151963485c31d251a9ee043a2}{sc\_last\_y\_state}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00406}00406 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00407}00407                 \textcolor{keywordflow}{if} (dx < -\/63)}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00408}00408                   dx = -\/63;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00409}00409                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (dx > 63)}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00410}00410                   dx = 63;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00411}00411 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00412}00412                 \textcolor{keywordflow}{if} (dy < -\/63)}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00413}00413                   dy = -\/63;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00414}00414                 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (dy > 63)}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00415}00415                   dy = 63;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00416}00416 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00417}00417                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_a26b6a0e6c76d465330131987619b10d3}{sc\_last\_x\_state}} += dx;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00418}00418                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_a87cbf81151963485c31d251a9ee043a2}{sc\_last\_y\_state}} += dy;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00419}00419 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00420}00420                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae719770e5ecf90704b897bde26b55b70}{sc\_data}}.\mbox{\hyperlink{structg__mouse__data_a8da0e9c92e448fca77cd57c06ae87b69}{dx}} = dx;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00421}00421                 sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae719770e5ecf90704b897bde26b55b70}{sc\_data}}.\mbox{\hyperlink{structg__mouse__data_ac49d6822739ba5e6a0bf6fe8541ec48e}{dy}} = dy;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00422}00422 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00423}00423                 \mbox{\hyperlink{usb__transfer_8c_a30d239cbfe3c02ec7da6e6dfe5055762}{usbd\_xfer\_set\_frame\_data}}(xfer, 0, \&sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae719770e5ecf90704b897bde26b55b70}{sc\_data}}, \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structg__mouse__softc_ae719770e5ecf90704b897bde26b55b70}{sc\_data}}));}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00424}00424                 \mbox{\hyperlink{usb__transfer_8c_a10f82b008c3a5311e5210e44beaca014}{usbd\_xfer\_set\_frames}}(xfer, 1);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00425}00425                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00426}00426                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00427}00427 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00428}00428         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00429}00429                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}error=\%s\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00430}00430 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00431}00431                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00432}00432                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00433}00433                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00434}00434                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00435}00435                 \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00436}00436                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00437}00437         \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00438}00438 \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00439}00439 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00440}00440 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00441}\mbox{\hyperlink{g__mouse_8c_a5bb9224801249fa6cda16971ccfef1ad}{00441}} \mbox{\hyperlink{g__mouse_8c_aef18d43518b58928370d7c695757406d}{g\_mouse\_handle\_request}}(device\_t dev,}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00442}00442     \textcolor{keyword}{const} \textcolor{keywordtype}{void} *preq, \textcolor{keywordtype}{void} **\mbox{\hyperlink{usb__if_8m_a074c17a419327b41805af2dd7cb152e7}{pptr}}, uint16\_t *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}},}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00443}00443     uint16\_t \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}}, uint8\_t *\mbox{\hyperlink{usb__if_8m_a8a16a0091a5793ece040278427496b23}{pstate}})}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00444}00444 \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00445}00445         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} *\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}} = preq;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00446}00446         uint8\_t is\_complete = *\mbox{\hyperlink{usb__if_8m_a8a16a0091a5793ece040278427496b23}{pstate}};}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00447}00447 }
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00448}00448         \textcolor{keywordflow}{if} (!is\_complete) \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00449}00449                 \textcolor{keywordflow}{if} ((\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bmRequestType == \mbox{\hyperlink{usb_8h_ac338c3af82b085859b50582e10fa7cb7}{UT\_WRITE\_CLASS\_INTERFACE}}) \&\&}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00450}00450                     (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest == \mbox{\hyperlink{usbhid_8h_afea159697b5a77d5adf395f95055f6f7}{UR\_SET\_PROTOCOL}}) \&\&}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00451}00451                     (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>wValue[0] == 0x00) \&\&}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00452}00452                     (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>wValue[1] == 0x00)) \{}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00453}00453                         *\mbox{\hyperlink{usb__if_8m_aaba3806a5156b2c2a6d6f95f0d95ed03}{plen}} = 0;}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00454}00454                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00455}00455                 \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00456}00456         \}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00457}00457         \textcolor{keywordflow}{return} (ENXIO);                 \textcolor{comment}{/* use builtin handler */}}
\DoxyCodeLine{\Hypertarget{g__mouse_8c_source_l00458}00458 \}}

\end{DoxyCode}
