\hypertarget{uss820dci_8c_source}{}\doxysection{uss820dci.\+c}
\label{uss820dci_8c_source}\index{dev/usb/controller/uss820dci.c@{dev/usb/controller/uss820dci.c}}
\mbox{\hyperlink{uss820dci_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00001}00001 \textcolor{comment}{/* \$FreeBSD\$ */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00002}00002 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00003}00003 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00004}00004 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2008 Hans Petter Selasky <hselasky@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00006}00006 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00007}00007 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00008}00008 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00009}00009 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00010}00010 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00011}00011 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00012}00012 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00013}00013 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00014}00014 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00015}00015 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00016}00016 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00017}00017 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00018}00018 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00019}00019 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00020}00020 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00021}00021 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00022}00022 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00023}00023 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00024}00024 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00025}00025 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00026}00026 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00027}00027 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00028}00028 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00029}00029 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00030}00030 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00031}00031 \textcolor{comment}{ * This file contains the driver for the USS820 series USB Device}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00032}00032 \textcolor{comment}{ * Controller}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00033}00033 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00034}00034 \textcolor{comment}{ * NOTE: The datasheet does not document everything.}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00035}00035 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00036}00036 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00037}00037 \textcolor{preprocessor}{\#ifdef USB\_GLOBAL\_INCLUDE\_FILE}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00038}00038 \textcolor{preprocessor}{\#include USB\_GLOBAL\_INCLUDE\_FILE}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00039}00039 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/stdint.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/stddef.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/sx.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <sys/callout.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00058}00058 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00061}00061 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00062}\mbox{\hyperlink{uss820dci_8c_a927dd6f59caf10a2991dfb564bcbb1e1}{00062}} \textcolor{preprocessor}{\#define USB\_DEBUG\_VAR uss820dcidebug}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00064}00064 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__core_8h}{dev/usb/usb\_core.h}}>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00065}00065 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__debug_8h}{dev/usb/usb\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__busdma_8h}{dev/usb/usb\_busdma.h}}>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00067}00067 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__process_8h}{dev/usb/usb\_process.h}}>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__transfer_8h}{dev/usb/usb\_transfer.h}}>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00069}00069 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__device_8h}{dev/usb/usb\_device.h}}>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00070}00070 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__hub_8h}{dev/usb/usb\_hub.h}}>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00071}00071 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__util_8h}{dev/usb/usb\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00072}00072 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00073}00073 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__controller_8h}{dev/usb/usb\_controller.h}}>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00074}00074 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__bus_8h}{dev/usb/usb\_bus.h}}>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00075}00075 \textcolor{preprocessor}{\#endif                  }\textcolor{comment}{/* USB\_GLOBAL\_INCLUDE\_FILE */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00076}00076 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00077}00077 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{uss820dci_8h}{dev/usb/controller/uss820dci.h}}>}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00078}00078 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00079}\mbox{\hyperlink{uss820dci_8c_acfc82510504a3887660a91aada755cb2}{00079}} \textcolor{preprocessor}{\#define USS820\_DCI\_BUS2SC(bus) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00080}00080 \textcolor{preprocessor}{    \_\_containerof(bus, struct uss820dci\_softc, sc\_bus)}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00082}\mbox{\hyperlink{uss820dci_8c_af671d36f028c8381b5b71fc5d399de50}{00082}} \textcolor{preprocessor}{\#define USS820\_DCI\_PC2SC(pc) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00083}00083 \textcolor{preprocessor}{   USS820\_DCI\_BUS2SC(USB\_DMATAG\_TO\_XROOT((pc)-\/>tag\_parent)-\/>bus)}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00084}00084 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00085}\mbox{\hyperlink{uss820dci_8c_ade7f77f7468f591e64897730f9c8a844}{00085}} \textcolor{preprocessor}{\#define USS820\_DCI\_THREAD\_IRQ \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00086}00086 \textcolor{preprocessor}{    (USS820\_SSR\_SUSPEND | USS820\_SSR\_RESUME | USS820\_SSR\_RESET)}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00087}00087 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00088}00088 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00089}00089 \textcolor{keyword}{static} \textcolor{keywordtype}{int} uss820dcidebug = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00090}00090 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00091}00091 \textcolor{keyword}{static} \mbox{\hyperlink{dwc__otg_8c_a58e125bcf985ce2333baef42f97b33b3}{SYSCTL\_NODE}}(\_hw\_usb, OID\_AUTO, uss820dci, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00092}00092     \textcolor{stringliteral}{"{}USB uss820dci"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00093}00093 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_uss820dci, OID\_AUTO, \mbox{\hyperlink{cfumass_8c_ac3e1795766a80ec63b157951b4b9a7d4}{debug}}, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00094}00094     \&uss820dcidebug, 0, \textcolor{stringliteral}{"{}uss820dci debug level"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00095}00095 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00096}00096 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00097}\mbox{\hyperlink{uss820dci_8c_a09302e8cc92979dfdea39f633ba8da79}{00097}} \textcolor{preprocessor}{\#define USS820\_DCI\_INTR\_ENDPT 1}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00098}00098 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00099}00099 \textcolor{comment}{/* prototypes */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00100}00100 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00101}\mbox{\hyperlink{uss820dci_8c_a3fb35df1ab4f9aac9fac32c83b7f7495}{00101}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__bus__methods}{usb\_bus\_methods}} \mbox{\hyperlink{uss820dci_8c_a3fb35df1ab4f9aac9fac32c83b7f7495}{uss820dci\_bus\_methods}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00102}\mbox{\hyperlink{uss820dci_8c_a3e974242be8c2c5be0a83c7801c77412}{00102}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{uss820dci_8c_a3e974242be8c2c5be0a83c7801c77412}{uss820dci\_device\_bulk\_methods}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00103}\mbox{\hyperlink{uss820dci_8c_a2db8b78c176b87be68f8fb89d01b4a7c}{00103}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{uss820dci_8c_a2db8b78c176b87be68f8fb89d01b4a7c}{uss820dci\_device\_ctrl\_methods}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00104}\mbox{\hyperlink{uss820dci_8c_a85070bd6b9239094b8f8f6e6ef90c205}{00104}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{uss820dci_8c_a85070bd6b9239094b8f8f6e6ef90c205}{uss820dci\_device\_intr\_methods}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00105}\mbox{\hyperlink{uss820dci_8c_a46d92450c9eac878cd9c202be25dbcb9}{00105}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{uss820dci_8c_a46d92450c9eac878cd9c202be25dbcb9}{uss820dci\_device\_isoc\_fs\_methods}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00106}00106 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00107}\mbox{\hyperlink{uss820dci_8c_ad463c127b46606e3359b64f9e988601f}{00107}} \textcolor{keyword}{static} \mbox{\hyperlink{uss820dci_8h_a751696e6df5bf507a927aa1b20323dc3}{uss820dci\_cmd\_t}} \mbox{\hyperlink{uss820dci_8c_ad463c127b46606e3359b64f9e988601f}{uss820dci\_setup\_rx}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00108}\mbox{\hyperlink{uss820dci_8c_a9b943775beb18c16eb336d08925ade60}{00108}} \textcolor{keyword}{static} \mbox{\hyperlink{uss820dci_8h_a751696e6df5bf507a927aa1b20323dc3}{uss820dci\_cmd\_t}} \mbox{\hyperlink{uss820dci_8c_a9b943775beb18c16eb336d08925ade60}{uss820dci\_data\_rx}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00109}\mbox{\hyperlink{uss820dci_8c_afa91532b7607cda0e01bfa70d653069d}{00109}} \textcolor{keyword}{static} \mbox{\hyperlink{uss820dci_8h_a751696e6df5bf507a927aa1b20323dc3}{uss820dci\_cmd\_t}} \mbox{\hyperlink{uss820dci_8c_afa91532b7607cda0e01bfa70d653069d}{uss820dci\_data\_tx}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00110}\mbox{\hyperlink{uss820dci_8c_a9c299fbe4ec6640c58cc390b8a53eaa0}{00110}} \textcolor{keyword}{static} \mbox{\hyperlink{uss820dci_8h_a751696e6df5bf507a927aa1b20323dc3}{uss820dci\_cmd\_t}} \mbox{\hyperlink{uss820dci_8c_a9c299fbe4ec6640c58cc390b8a53eaa0}{uss820dci\_data\_tx\_sync}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00111}00111 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{uss820dci_8c_a58c989352bde3ee6a94c65b754b2748a}{uss820dci\_device\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00112}00112 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{uss820dci_8c_a39044d009b14f90f9ecb222a550d6069}{uss820dci\_do\_poll}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__bus}{usb\_bus}} *);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00113}00113 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{uss820dci_8c_aa3e592e9fca0359a060dacad85f100ba}{uss820dci\_standard\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00114}00114 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{uss820dci_8c_a797e59671cbff9cd10d0bb2b969d97d7}{uss820dci\_intr\_set}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *, uint8\_t);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00115}00115 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *, uint8\_t,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00116}00116                     uint8\_t, uint8\_t);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00117}00117 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{uss820dci_8c_af0f739feed148316a4d60b9fedaf4446}{uss820dci\_root\_intr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00119}00119 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00120}00120 \textcolor{comment}{ * Here is a list of what the USS820D chip can support. The main}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00121}00121 \textcolor{comment}{ * limitation is that the sum of the buffer sizes must be less than}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00122}00122 \textcolor{comment}{ * 1120 bytes.}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00123}00123 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00124}00124 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__hw__ep__profile}{usb\_hw\_ep\_profile}}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00125}\mbox{\hyperlink{uss820dci_8c_afd22b612881476d675df397df9aaeea0}{00125}}         \mbox{\hyperlink{uss820dci_8c_afd22b612881476d675df397df9aaeea0}{uss820dci\_ep\_profile}}[] = \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00126}00126         [0] = \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00127}00127                 .\mbox{\hyperlink{structusb__hw__ep__profile_a0a8423b9793236e6e9bbb907559e29cd}{max\_in\_frame\_size}} = 32,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00128}00128                 .max\_out\_frame\_size = 32,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00129}00129                 .is\_simplex = 0,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00130}00130                 .support\_control = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00131}00131         \},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00132}00132         [1] = \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00133}00133                 .max\_in\_frame\_size = 64,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00134}00134                 .max\_out\_frame\_size = 64,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00135}00135                 .is\_simplex = 0,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00136}00136                 .support\_multi\_buffer = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00137}00137                 .support\_bulk = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00138}00138                 .support\_interrupt = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00139}00139                 .support\_in = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00140}00140                 .support\_out = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00141}00141         \},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00142}00142         [2] = \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00143}00143                 .max\_in\_frame\_size = 8,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00144}00144                 .max\_out\_frame\_size = 8,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00145}00145                 .is\_simplex = 0,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00146}00146                 .support\_multi\_buffer = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00147}00147                 .support\_bulk = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00148}00148                 .support\_interrupt = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00149}00149                 .support\_in = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00150}00150                 .support\_out = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00151}00151         \},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00152}00152         [3] = \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00153}00153                 .max\_in\_frame\_size = 256,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00154}00154                 .max\_out\_frame\_size = 256,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00155}00155                 .is\_simplex = 0,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00156}00156                 .support\_multi\_buffer = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00157}00157                 .support\_isochronous = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00158}00158                 .support\_in = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00159}00159                 .support\_out = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00160}00160         \},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00161}00161 \};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00162}00162 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00163}00163 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00164}\mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{00164}} \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc, uint8\_t \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00165}00165     uint8\_t keep\_mask, uint8\_t set\_mask)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00166}00166 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00167}00167         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00169}00169         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a8ff5fa6d4960d9256b3932e852be168b}{USS820\_PEND}}, 1);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00170}00170         temp = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00171}00171         temp \&= (keep\_mask);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00172}00172         temp |= (set\_mask);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00173}00173         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{if__rum_8c_a9428adc9af4653a2050e2536b55dec8d}{reg}}, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00174}00174         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a8ff5fa6d4960d9256b3932e852be168b}{USS820\_PEND}}, 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00175}00175 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00176}00176 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00177}00177 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00178}\mbox{\hyperlink{uss820dci_8c_a9f50bc4724098fbbeea76e12b1be95ae}{00178}} \mbox{\hyperlink{uss820dci_8c_a9f50bc4724098fbbeea76e12b1be95ae}{uss820dci\_get\_hw\_ep\_profile}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00179}00179     \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__hw__ep__profile}{usb\_hw\_ep\_profile}} **ppf, uint8\_t ep\_addr)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00180}00180 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00181}00181         \textcolor{keywordflow}{if} (ep\_addr == 0) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00182}00182                 *ppf = \mbox{\hyperlink{uss820dci_8c_afd22b612881476d675df397df9aaeea0}{uss820dci\_ep\_profile}} + 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00183}00183         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ep\_addr < 5) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00184}00184                 *ppf = \mbox{\hyperlink{uss820dci_8c_afd22b612881476d675df397df9aaeea0}{uss820dci\_ep\_profile}} + 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00185}00185         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ep\_addr < 7) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00186}00186                 *ppf = \mbox{\hyperlink{uss820dci_8c_afd22b612881476d675df397df9aaeea0}{uss820dci\_ep\_profile}} + 2;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00187}00187         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ep\_addr == 7) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00188}00188                 *ppf = \mbox{\hyperlink{uss820dci_8c_afd22b612881476d675df397df9aaeea0}{uss820dci\_ep\_profile}} + 3;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00189}00189         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00190}00190                 *ppf = NULL;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00191}00191         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00192}00192 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00194}00194 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00195}\mbox{\hyperlink{uss820dci_8c_a0840b00f0fc68e20766cd90af355fa40}{00195}} \mbox{\hyperlink{uss820dci_8c_a0840b00f0fc68e20766cd90af355fa40}{uss820dci\_pull\_up}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00196}00196 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00197}00197         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00198}00198 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00199}00199         \textcolor{comment}{/* pullup D+, if possible */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00200}00200 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00201}00201         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a9be9d3c90a14a682e327627cc71c015f}{d\_pulled\_up}} \&\&}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00202}00202             sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a627795cb3a352b3023c9360686d9eb6b}{port\_powered}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00203}00203                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a9be9d3c90a14a682e327627cc71c015f}{d\_pulled\_up}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00204}00204 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00205}00205                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00206}00206 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00207}00207                 temp = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_ab8ac313ab08ef664cae153d150fd3cad}{USS820\_MCSR}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00208}00208                 temp |= \mbox{\hyperlink{uss820dci_8h_afc944770c3ec96e4b1462502f5229ef7}{USS820\_MCSR\_DPEN}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00209}00209                 \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_ab8ac313ab08ef664cae153d150fd3cad}{USS820\_MCSR}}, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00210}00210         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00211}00211 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00212}00212 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00213}00213 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00214}\mbox{\hyperlink{uss820dci_8c_a75c73e9a93f46f8163f4293e0fd228b5}{00214}} \mbox{\hyperlink{uss820dci_8c_a75c73e9a93f46f8163f4293e0fd228b5}{uss820dci\_pull\_down}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00215}00215 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00216}00216         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00217}00217 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00218}00218         \textcolor{comment}{/* pulldown D+, if possible */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00219}00219 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00220}00220         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a9be9d3c90a14a682e327627cc71c015f}{d\_pulled\_up}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00221}00221                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a9be9d3c90a14a682e327627cc71c015f}{d\_pulled\_up}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00222}00222 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00223}00223                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00224}00224 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00225}00225                 temp = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_ab8ac313ab08ef664cae153d150fd3cad}{USS820\_MCSR}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00226}00226                 temp \&= \string~USS820\_MCSR\_DPEN;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00227}00227                 \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_ab8ac313ab08ef664cae153d150fd3cad}{USS820\_MCSR}}, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00228}00228         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00229}00229 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00230}00230 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00231}00231 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00232}\mbox{\hyperlink{uss820dci_8c_ad083fd806c901fac1fba7a3119c9f234}{00232}} \mbox{\hyperlink{uss820dci_8c_ad083fd806c901fac1fba7a3119c9f234}{uss820dci\_wakeup\_peer}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00233}00233 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00234}00234         \textcolor{keywordflow}{if} (!(sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_abac956aef830fc8d8c3d0aebb83be4a9}{status\_suspend}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00235}00235                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00236}00236         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00237}00237         DPRINTFN(0, \textcolor{stringliteral}{"{}not supported\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00238}00238 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00239}00239 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00240}00240 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00241}\mbox{\hyperlink{uss820dci_8c_a0b365b2543b7b4c205195acbc39a5f46}{00241}} \mbox{\hyperlink{uss820dci_8c_a0b365b2543b7b4c205195acbc39a5f46}{uss820dci\_set\_address}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc, uint8\_t addr)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00242}00242 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00243}00243         DPRINTFN(5, \textcolor{stringliteral}{"{}addr=\%d\(\backslash\)n"{}}, addr);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00244}00244 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00245}00245         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a618f8d4945cea64a79b812fa0f94c84b}{USS820\_FADDR}}, addr);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00246}00246 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00247}00247 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00248}00248 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00249}\mbox{\hyperlink{uss820dci_8c_a20de6eada3753f0ad7e7baed2b524f0d}{00249}} \mbox{\hyperlink{uss820dci_8c_ad463c127b46606e3359b64f9e988601f}{uss820dci\_setup\_rx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__td}{uss820dci\_td}} *td)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00250}00250 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00251}00251         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00252}00252         uint16\_t count;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00253}00253         uint8\_t rx\_stat;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00254}00254         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00255}00255 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00256}00256         \textcolor{comment}{/* select the correct endpoint */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00257}00257         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0b06ea26c439873f4f2d95f3e046399f}{USS820\_EPINDEX}}, td-\/>\mbox{\hyperlink{structuss820dci__td_aeb35fca5ed072225fe0d1146ccba58ca}{ep\_index}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00258}00258 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00259}00259         \textcolor{comment}{/* read out FIFO status */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00260}00260         rx\_stat = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a65fe8a6e994a38f50f62121c92a29f9d}{USS820\_RXSTAT}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00261}00261 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00262}00262         DPRINTFN(5, \textcolor{stringliteral}{"{}rx\_stat=0x\%02x rem=\%u\(\backslash\)n"{}}, rx\_stat, td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00263}00263 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00264}00264         \textcolor{keywordflow}{if} (!(rx\_stat \& \mbox{\hyperlink{uss820dci_8h_a3a582c9ad8904b014b29bd3de68bf965}{USS820\_RXSTAT\_RXSETUP}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00265}00265                 \textcolor{keywordflow}{goto} not\_complete;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00266}00266         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00267}00267         \textcolor{comment}{/* clear did stall */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00268}00268         td-\/>\mbox{\hyperlink{structuss820dci__td_a82dfce76492a969f4746cb66579ef424}{did\_stall}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00269}00269 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00270}00270         \textcolor{comment}{/* clear stall and all I/O */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00271}00271         \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_afcbdca78b9a54f715315abe91a6fc1b7}{USS820\_EPCON}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00272}00272             0xFF \string^ (\mbox{\hyperlink{uss820dci_8h_aa0787b6781413253c862c9157f2ebe7a}{USS820\_EPCON\_TXSTL}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00273}00273             \mbox{\hyperlink{uss820dci_8h_abce4c79037326a74b35b01ecb3560f68}{USS820\_EPCON\_RXSTL}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00274}00274             \mbox{\hyperlink{uss820dci_8h_afb875b8490295e8f2b64d2a3daeb5932}{USS820\_EPCON\_RXIE}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00275}00275             \mbox{\hyperlink{uss820dci_8h_a8826728dbe05268e3ad5d04468766809}{USS820\_EPCON\_TXOE}}), 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00276}00276 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00277}00277         \textcolor{comment}{/* clear end overwrite flag */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00278}00278         \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a65fe8a6e994a38f50f62121c92a29f9d}{USS820\_RXSTAT}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00279}00279             0xFF \string^ \mbox{\hyperlink{uss820dci_8h_ac9a9b15b9723daf3a6b0d56cba3fb072}{USS820\_RXSTAT\_EDOVW}}, 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00280}00280 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00281}00281         \textcolor{comment}{/* get the packet byte count */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00282}00282         count = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a25c4ca6940896c6c75d358c9f68213e7}{USS820\_RXCNTL}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00283}00283         count |= (\mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a290583877b3e9ba9d219881a98c4bba1}{USS820\_RXCNTH}}) << 8);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00284}00284         count \&= 0x3FF;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00285}00285 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00286}00286         \textcolor{comment}{/* verify data length */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00287}00287         \textcolor{keywordflow}{if} (count != td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00288}00288                 DPRINTFN(0, \textcolor{stringliteral}{"{}Invalid SETUP packet "{}}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00289}00289                     \textcolor{stringliteral}{"{}length, \%d bytes\(\backslash\)n"{}}, count);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00290}00290                 \textcolor{keywordflow}{goto} setup\_not\_complete;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00291}00291         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00292}00292         \textcolor{keywordflow}{if} (count != \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00293}00293                 DPRINTFN(0, \textcolor{stringliteral}{"{}Unsupported SETUP packet "{}}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00294}00294                     \textcolor{stringliteral}{"{}length, \%d bytes\(\backslash\)n"{}}, count);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00295}00295                 \textcolor{keywordflow}{goto} setup\_not\_complete;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00296}00296         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00297}00297         \textcolor{comment}{/* receive data */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00298}00298         bus\_space\_read\_multi\_1(sc-\/>\mbox{\hyperlink{structuss820dci__softc_a10224f13b0c450aaa9078c02c74a067f}{sc\_io\_tag}}, sc-\/>\mbox{\hyperlink{structuss820dci__softc_a73cae3e8a1fd7db2f9db50b3d70b1b39}{sc\_io\_hdl}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00299}00299             \mbox{\hyperlink{uss820dci_8h_ae93067de4fb174ad93524acca267e3d5}{USS820\_RXDAT}} * \mbox{\hyperlink{uss820dci_8h_a0890d24efc51f41b962c0a692a0e3198}{USS820\_REG\_STRIDE}}, (\textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}));}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00300}00300 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00301}00301         \textcolor{comment}{/* read out FIFO status */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00302}00302         rx\_stat = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a65fe8a6e994a38f50f62121c92a29f9d}{USS820\_RXSTAT}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00303}00303 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00304}00304         \textcolor{keywordflow}{if} (rx\_stat \& (\mbox{\hyperlink{uss820dci_8h_ac9a9b15b9723daf3a6b0d56cba3fb072}{USS820\_RXSTAT\_EDOVW}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00305}00305             \mbox{\hyperlink{uss820dci_8h_aab6041d5fcdccedbe6861329bae4844c}{USS820\_RXSTAT\_STOVW}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00306}00306                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}new SETUP packet received\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00307}00307                 \textcolor{keywordflow}{return} (1);             \textcolor{comment}{/* not complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00308}00308         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00309}00309         \textcolor{comment}{/* clear receive setup bit */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00310}00310         \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a65fe8a6e994a38f50f62121c92a29f9d}{USS820\_RXSTAT}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00311}00311             0xFF \string^ (\mbox{\hyperlink{uss820dci_8h_a3a582c9ad8904b014b29bd3de68bf965}{USS820\_RXSTAT\_RXSETUP}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00312}00312             \mbox{\hyperlink{uss820dci_8h_ac9a9b15b9723daf3a6b0d56cba3fb072}{USS820\_RXSTAT\_EDOVW}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00313}00313             \mbox{\hyperlink{uss820dci_8h_aab6041d5fcdccedbe6861329bae4844c}{USS820\_RXSTAT\_STOVW}}), 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00314}00314 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00315}00315         \textcolor{comment}{/* set RXFFRC bit */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00316}00316         temp = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a6f9047c452e8a1f2eaa492cc45028451}{USS820\_RXCON}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00317}00317         temp |= \mbox{\hyperlink{uss820dci_8h_a92d4f922607cafe3256384f6ee712739}{USS820\_RXCON\_RXFFRC}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00318}00318         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a6f9047c452e8a1f2eaa492cc45028451}{USS820\_RXCON}}, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00319}00319 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00320}00320         \textcolor{comment}{/* copy data into real buffer */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00321}00321         \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(td-\/>\mbox{\hyperlink{structuss820dci__td_a6cc25a9d249613049b1186a0df8812a4}{pc}}, 0, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}));}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00322}00322 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00323}00323         td-\/>\mbox{\hyperlink{structuss820dci__td_a4e1d3a45030cb27fac9599e438d2cd63}{offset}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00324}00324         td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00325}00325 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00326}00326         \textcolor{comment}{/* sneak peek the set address */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00327}00327         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType == \mbox{\hyperlink{usb_8h_a33c2db425d10f85e7b405035bc015d32}{UT\_WRITE\_DEVICE}}) \&\&}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00328}00328             (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest == \mbox{\hyperlink{usb_8h_a2e5fb48757cb795a44b99af832d6cd7d}{UR\_SET\_ADDRESS}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00329}00329                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a3ad76ae5bf551533a09f2013f7126e37}{sc\_dv\_addr}} = \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue[0] \& 0x7F;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00330}00330         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00331}00331                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a3ad76ae5bf551533a09f2013f7126e37}{sc\_dv\_addr}} = 0xFF;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00332}00332         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00333}00333 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00334}00334         \textcolor{comment}{/* reset TX FIFO */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00335}00335         temp = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_aea00116cf82edca0ca3f50ada53f677b}{USS820\_TXCON}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00336}00336         temp |= \mbox{\hyperlink{uss820dci_8h_af951f2b485d7e3ef565d1a1bfda90bcd}{USS820\_TXCON\_TXCLR}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00337}00337         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_aea00116cf82edca0ca3f50ada53f677b}{USS820\_TXCON}}, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00338}00338         temp \&= \string~USS820\_TXCON\_TXCLR;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00339}00339         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_aea00116cf82edca0ca3f50ada53f677b}{USS820\_TXCON}}, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00340}00340 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00341}00341         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00342}00342 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00343}00343 setup\_not\_complete:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00344}00344 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00345}00345         \textcolor{comment}{/* set RXFFRC bit */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00346}00346         temp = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a6f9047c452e8a1f2eaa492cc45028451}{USS820\_RXCON}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00347}00347         temp |= \mbox{\hyperlink{uss820dci_8h_a92d4f922607cafe3256384f6ee712739}{USS820\_RXCON\_RXFFRC}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00348}00348         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a6f9047c452e8a1f2eaa492cc45028451}{USS820\_RXCON}}, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00349}00349 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00350}00350         \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00351}00351 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00352}00352 not\_complete:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00353}00353         \textcolor{comment}{/* abort any ongoing transfer */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00354}00354         \textcolor{keywordflow}{if} (!td-\/>\mbox{\hyperlink{structuss820dci__td_a82dfce76492a969f4746cb66579ef424}{did\_stall}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00355}00355                 DPRINTFN(5, \textcolor{stringliteral}{"{}stalling\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00356}00356                 \textcolor{comment}{/* set stall */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00357}00357                 \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_afcbdca78b9a54f715315abe91a6fc1b7}{USS820\_EPCON}}, 0xFF,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00358}00358                     (\mbox{\hyperlink{uss820dci_8h_aa0787b6781413253c862c9157f2ebe7a}{USS820\_EPCON\_TXSTL}} | \mbox{\hyperlink{uss820dci_8h_abce4c79037326a74b35b01ecb3560f68}{USS820\_EPCON\_RXSTL}}));}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00359}00359 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00360}00360                 td-\/>\mbox{\hyperlink{structuss820dci__td_a82dfce76492a969f4746cb66579ef424}{did\_stall}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00361}00361         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00362}00362 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00363}00363         \textcolor{comment}{/* clear end overwrite flag, if any */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00364}00364         \textcolor{keywordflow}{if} (rx\_stat \& \mbox{\hyperlink{uss820dci_8h_a3a582c9ad8904b014b29bd3de68bf965}{USS820\_RXSTAT\_RXSETUP}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00365}00365                 \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a65fe8a6e994a38f50f62121c92a29f9d}{USS820\_RXSTAT}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00366}00366                     0xFF \string^ (\mbox{\hyperlink{uss820dci_8h_ac9a9b15b9723daf3a6b0d56cba3fb072}{USS820\_RXSTAT\_EDOVW}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00367}00367                     \mbox{\hyperlink{uss820dci_8h_aab6041d5fcdccedbe6861329bae4844c}{USS820\_RXSTAT\_STOVW}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00368}00368                     \mbox{\hyperlink{uss820dci_8h_a3a582c9ad8904b014b29bd3de68bf965}{USS820\_RXSTAT\_RXSETUP}}), 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00369}00369         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00370}00370         \textcolor{keywordflow}{return} (1);                     \textcolor{comment}{/* not complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00371}00371 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00372}00372 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00373}00373 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00374}\mbox{\hyperlink{uss820dci_8c_a774c5fde9039350561a37c99b8bbfd94}{00374}} \mbox{\hyperlink{uss820dci_8c_a9b943775beb18c16eb336d08925ade60}{uss820dci\_data\_rx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__td}{uss820dci\_td}} *td)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00375}00375 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00376}00376         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__search}{usb\_page\_search}} buf\_res;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00377}00377         uint16\_t count;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00378}00378         uint8\_t rx\_flag;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00379}00379         uint8\_t rx\_stat;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00380}00380         uint8\_t rx\_cntl;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00381}00381         uint8\_t to;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00382}00382         uint8\_t got\_short;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00383}00383 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00384}00384         to = 2;                         \textcolor{comment}{/* don't loop forever! */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00385}00385         got\_short = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00386}00386 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00387}00387         \textcolor{comment}{/* select the correct endpoint */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00388}00388         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0b06ea26c439873f4f2d95f3e046399f}{USS820\_EPINDEX}}, td-\/>\mbox{\hyperlink{structuss820dci__td_aeb35fca5ed072225fe0d1146ccba58ca}{ep\_index}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00389}00389 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00390}00390         \textcolor{comment}{/* check if any of the FIFO banks have data */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00391}00391 repeat:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00392}00392         \textcolor{comment}{/* read out FIFO flag */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00393}00393         rx\_flag = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a8d7d21326b802c14bcd0d3bda45a8496}{USS820\_RXFLG}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00394}00394         \textcolor{comment}{/* read out FIFO status */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00395}00395         rx\_stat = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a65fe8a6e994a38f50f62121c92a29f9d}{USS820\_RXSTAT}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00396}00396 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00397}00397         DPRINTFN(5, \textcolor{stringliteral}{"{}rx\_stat=0x\%02x rx\_flag=0x\%02x rem=\%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00398}00398             rx\_stat, rx\_flag, td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00399}00399 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00400}00400         \textcolor{keywordflow}{if} (rx\_stat \& (\mbox{\hyperlink{uss820dci_8h_a3a582c9ad8904b014b29bd3de68bf965}{USS820\_RXSTAT\_RXSETUP}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00401}00401             \mbox{\hyperlink{uss820dci_8h_a01f35b8f604f84fb9cfab50d843e8505}{USS820\_RXSTAT\_RXSOVW}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00402}00402             \mbox{\hyperlink{uss820dci_8h_ac9a9b15b9723daf3a6b0d56cba3fb072}{USS820\_RXSTAT\_EDOVW}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00403}00403                 \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}} == 0 \&\& td-\/>\mbox{\hyperlink{structuss820dci__td_aeb35fca5ed072225fe0d1146ccba58ca}{ep\_index}} == 0) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00404}00404                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00405}00405 \textcolor{comment}{                         * We are actually complete and have}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00406}00406 \textcolor{comment}{                         * received the next SETUP}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00407}00407 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00408}00408                         DPRINTFN(5, \textcolor{stringliteral}{"{}faking complete\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00409}00409                         \textcolor{keywordflow}{return} (0);     \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00410}00410                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00411}00411                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00412}00412 \textcolor{comment}{                 * USB Host Aborted the transfer.}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00413}00413 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00414}00414                 td-\/>\mbox{\hyperlink{structuss820dci__td_ad13f9096c22a9f00efd24c6ac003ed58}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00415}00415                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00416}00416         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00417}00417         \textcolor{comment}{/* check for errors */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00418}00418         \textcolor{keywordflow}{if} (rx\_flag \& (\mbox{\hyperlink{uss820dci_8h_a94011bbc05245667a2625b3456a93d1a}{USS820\_RXFLG\_RXOVF}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00419}00419             \mbox{\hyperlink{uss820dci_8h_a96589df7d1e4f407624dd6b82afb0d33}{USS820\_RXFLG\_RXURF}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00420}00420                 DPRINTFN(5, \textcolor{stringliteral}{"{}overflow or underflow\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00421}00421                 \textcolor{comment}{/* should not happen */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00422}00422                 td-\/>\mbox{\hyperlink{structuss820dci__td_ad13f9096c22a9f00efd24c6ac003ed58}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00423}00423                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00424}00424         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00425}00425         \textcolor{comment}{/* check status */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00426}00426         \textcolor{keywordflow}{if} (!(rx\_flag \& (\mbox{\hyperlink{uss820dci_8h_aadce29f18e4c1ad4dd7a200244e810a7}{USS820\_RXFLG\_RXFIF0}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00427}00427             \mbox{\hyperlink{uss820dci_8h_a95ee8ca7f1caa501969c1188673be82c}{USS820\_RXFLG\_RXFIF1}}))) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00428}00428                 \textcolor{comment}{/* read out EPCON register */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00429}00429                 \textcolor{comment}{/* enable RX input */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00430}00430                 \textcolor{keywordflow}{if} (!td-\/>\mbox{\hyperlink{structuss820dci__td_a3691a108734facd73534a4710d9897cd}{did\_enable}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00431}00431                         \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(\mbox{\hyperlink{uss820dci_8c_af671d36f028c8381b5b71fc5d399de50}{USS820\_DCI\_PC2SC}}(td-\/>\mbox{\hyperlink{structuss820dci__td_a6cc25a9d249613049b1186a0df8812a4}{pc}}),}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00432}00432                             \mbox{\hyperlink{uss820dci_8h_afcbdca78b9a54f715315abe91a6fc1b7}{USS820\_EPCON}}, 0xFF, \mbox{\hyperlink{uss820dci_8h_afb875b8490295e8f2b64d2a3daeb5932}{USS820\_EPCON\_RXIE}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00433}00433                         td-\/>\mbox{\hyperlink{structuss820dci__td_a3691a108734facd73534a4710d9897cd}{did\_enable}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00434}00434                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00435}00435                 \textcolor{keywordflow}{return} (1);             \textcolor{comment}{/* not complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00436}00436         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00437}00437         \textcolor{comment}{/* get the packet byte count */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00438}00438         count = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a25c4ca6940896c6c75d358c9f68213e7}{USS820\_RXCNTL}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00439}00439         count |= (\mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a290583877b3e9ba9d219881a98c4bba1}{USS820\_RXCNTH}}) << 8);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00440}00440         count \&= 0x3FF;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00441}00441 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00442}00442         DPRINTFN(5, \textcolor{stringliteral}{"{}count=0x\%04x\(\backslash\)n"{}}, count);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00443}00443 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00444}00444         \textcolor{comment}{/* verify the packet byte count */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00445}00445         \textcolor{keywordflow}{if} (count != td-\/>\mbox{\hyperlink{structuss820dci__td_afa7c588af7e2bd19854303bedd0b847b}{max\_packet\_size}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00446}00446                 \textcolor{keywordflow}{if} (count < td-\/>max\_packet\_size) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00447}00447                         \textcolor{comment}{/* we have a short packet */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00448}00448                         td-\/>\mbox{\hyperlink{structuss820dci__td_aa0731f3d6c6eb8ddaf004ce60cfaf68f}{short\_pkt}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00449}00449                         got\_short = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00450}00450                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00451}00451                         \textcolor{comment}{/* invalid USB packet */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00452}00452                         td-\/>\mbox{\hyperlink{structuss820dci__td_ad13f9096c22a9f00efd24c6ac003ed58}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00453}00453                         \textcolor{keywordflow}{return} (0);     \textcolor{comment}{/* we are complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00454}00454                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00455}00455         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00456}00456         \textcolor{comment}{/* verify the packet byte count */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00457}00457         \textcolor{keywordflow}{if} (count > td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00458}00458                 \textcolor{comment}{/* invalid USB packet */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00459}00459                 td-\/>\mbox{\hyperlink{structuss820dci__td_ad13f9096c22a9f00efd24c6ac003ed58}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00460}00460                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* we are complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00461}00461         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00462}00462         \textcolor{keywordflow}{while} (count > 0) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00463}00463                 \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(td-\/>\mbox{\hyperlink{structuss820dci__td_a6cc25a9d249613049b1186a0df8812a4}{pc}}, td-\/>\mbox{\hyperlink{structuss820dci__td_a4e1d3a45030cb27fac9599e438d2cd63}{offset}}, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00464}00464 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00465}00465                 \textcolor{comment}{/* get correct length */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00466}00466                 \textcolor{keywordflow}{if} (buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}} > count) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00467}00467                         buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}} = count;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00468}00468                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00469}00469                 \textcolor{comment}{/* receive data */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00470}00470                 bus\_space\_read\_multi\_1(sc-\/>\mbox{\hyperlink{structuss820dci__softc_a10224f13b0c450aaa9078c02c74a067f}{sc\_io\_tag}}, sc-\/>\mbox{\hyperlink{structuss820dci__softc_a73cae3e8a1fd7db2f9db50b3d70b1b39}{sc\_io\_hdl}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00471}00471                     \mbox{\hyperlink{uss820dci_8h_ae93067de4fb174ad93524acca267e3d5}{USS820\_RXDAT}} * \mbox{\hyperlink{uss820dci_8h_a0890d24efc51f41b962c0a692a0e3198}{USS820\_REG\_STRIDE}}, buf\_res.\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}}, buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00472}00472 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00473}00473                 \textcolor{comment}{/* update counters */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00474}00474                 count -\/= buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00475}00475                 td-\/>\mbox{\hyperlink{structuss820dci__td_a4e1d3a45030cb27fac9599e438d2cd63}{offset}} += buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00476}00476                 td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}} -\/= buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00477}00477         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00478}00478 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00479}00479         \textcolor{comment}{/* set RXFFRC bit */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00480}00480         rx\_cntl = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a6f9047c452e8a1f2eaa492cc45028451}{USS820\_RXCON}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00481}00481         rx\_cntl |= \mbox{\hyperlink{uss820dci_8h_a92d4f922607cafe3256384f6ee712739}{USS820\_RXCON\_RXFFRC}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00482}00482         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a6f9047c452e8a1f2eaa492cc45028451}{USS820\_RXCON}}, rx\_cntl);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00483}00483 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00484}00484         \textcolor{comment}{/* check if we are complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00485}00485         \textcolor{keywordflow}{if} ((td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}} == 0) || got\_short) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00486}00486                 \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structuss820dci__td_aa0731f3d6c6eb8ddaf004ce60cfaf68f}{short\_pkt}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00487}00487                         \textcolor{comment}{/* we are complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00488}00488                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00489}00489                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00490}00490                 \textcolor{comment}{/* else need to receive a zero length packet */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00491}00491         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00492}00492         \textcolor{keywordflow}{if} (-\/-\/to) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00493}00493                 \textcolor{keywordflow}{goto} repeat;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00494}00494         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00495}00495         \textcolor{keywordflow}{return} (1);                     \textcolor{comment}{/* not complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00496}00496 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00497}00497 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00498}00498 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00499}\mbox{\hyperlink{uss820dci_8c_ae12c5fc87058691e1c6784e740858525}{00499}} \mbox{\hyperlink{uss820dci_8c_afa91532b7607cda0e01bfa70d653069d}{uss820dci\_data\_tx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__td}{uss820dci\_td}} *td)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00500}00500 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00501}00501         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__search}{usb\_page\_search}} buf\_res;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00502}00502         uint16\_t count;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00503}00503         uint16\_t count\_copy;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00504}00504         uint8\_t rx\_stat;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00505}00505         uint8\_t tx\_flag;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00506}00506         uint8\_t to;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00507}00507 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00508}00508         \textcolor{comment}{/* select the correct endpoint */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00509}00509         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0b06ea26c439873f4f2d95f3e046399f}{USS820\_EPINDEX}}, td-\/>\mbox{\hyperlink{structuss820dci__td_aeb35fca5ed072225fe0d1146ccba58ca}{ep\_index}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00510}00510 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00511}00511         to = 2;                         \textcolor{comment}{/* don't loop forever! */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00512}00512 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00513}00513 repeat:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00514}00514         \textcolor{comment}{/* read out TX FIFO flags */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00515}00515         tx\_flag = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_aae3ad54bb87040a7e7fc1b3115800217}{USS820\_TXFLG}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00516}00516 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00517}00517         DPRINTFN(5, \textcolor{stringliteral}{"{}tx\_flag=0x\%02x rem=\%u\(\backslash\)n"{}}, tx\_flag, td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00518}00518 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00519}00519         \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structuss820dci__td_aeb35fca5ed072225fe0d1146ccba58ca}{ep\_index}} == 0) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00520}00520                 \textcolor{comment}{/* read out RX FIFO status last */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00521}00521                 rx\_stat = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a65fe8a6e994a38f50f62121c92a29f9d}{USS820\_RXSTAT}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00522}00522 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00523}00523                 DPRINTFN(5, \textcolor{stringliteral}{"{}rx\_stat=0x\%02x\(\backslash\)n"{}}, rx\_stat);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00524}00524 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00525}00525                 \textcolor{keywordflow}{if} (rx\_stat \& (\mbox{\hyperlink{uss820dci_8h_a3a582c9ad8904b014b29bd3de68bf965}{USS820\_RXSTAT\_RXSETUP}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00526}00526                     \mbox{\hyperlink{uss820dci_8h_a01f35b8f604f84fb9cfab50d843e8505}{USS820\_RXSTAT\_RXSOVW}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00527}00527                     \mbox{\hyperlink{uss820dci_8h_ac9a9b15b9723daf3a6b0d56cba3fb072}{USS820\_RXSTAT\_EDOVW}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00528}00528                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00529}00529 \textcolor{comment}{                         * The current transfer was aborted by the USB}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00530}00530 \textcolor{comment}{                         * Host:}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00531}00531 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00532}00532                         td-\/>\mbox{\hyperlink{structuss820dci__td_ad13f9096c22a9f00efd24c6ac003ed58}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00533}00533                         \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00534}00534                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00535}00535         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00536}00536         \textcolor{keywordflow}{if} (tx\_flag \& (\mbox{\hyperlink{uss820dci_8h_af0d4c1ce75478913d817abd03ec930cd}{USS820\_TXFLG\_TXOVF}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00537}00537             \mbox{\hyperlink{uss820dci_8h_af5636891e6df7401d895042eaacd4ff9}{USS820\_TXFLG\_TXURF}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00538}00538                 td-\/>\mbox{\hyperlink{structuss820dci__td_ad13f9096c22a9f00efd24c6ac003ed58}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00539}00539                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00540}00540         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00541}00541         \textcolor{keywordflow}{if} (tx\_flag \& \mbox{\hyperlink{uss820dci_8h_adbd739320691dc931487e42cc8fd0109}{USS820\_TXFLG\_TXFIF0}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00542}00542                 \textcolor{keywordflow}{if} (tx\_flag \& \mbox{\hyperlink{uss820dci_8h_a3d40d20139b43dad3310d9b31b76788e}{USS820\_TXFLG\_TXFIF1}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00543}00543                         \textcolor{keywordflow}{return} (1);     \textcolor{comment}{/* not complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00544}00544                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00545}00545         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00546}00546         \textcolor{keywordflow}{if} ((!td-\/>\mbox{\hyperlink{structuss820dci__td_a8ea913de0c7616f949ccaac63b07dcd6}{support\_multi\_buffer}}) \&\&}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00547}00547             (tx\_flag \& (\mbox{\hyperlink{uss820dci_8h_adbd739320691dc931487e42cc8fd0109}{USS820\_TXFLG\_TXFIF0}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00548}00548             \mbox{\hyperlink{uss820dci_8h_a3d40d20139b43dad3310d9b31b76788e}{USS820\_TXFLG\_TXFIF1}}))) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00549}00549                 \textcolor{keywordflow}{return} (1);             \textcolor{comment}{/* not complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00550}00550         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00551}00551         count = td-\/>\mbox{\hyperlink{structuss820dci__td_afa7c588af7e2bd19854303bedd0b847b}{max\_packet\_size}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00552}00552         \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}} < count) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00553}00553                 \textcolor{comment}{/* we have a short packet */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00554}00554                 td-\/>\mbox{\hyperlink{structuss820dci__td_aa0731f3d6c6eb8ddaf004ce60cfaf68f}{short\_pkt}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00555}00555                 count = td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00556}00556         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00557}00557         count\_copy = count;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00558}00558         \textcolor{keywordflow}{while} (count > 0) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00559}00559                 \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(td-\/>\mbox{\hyperlink{structuss820dci__td_a6cc25a9d249613049b1186a0df8812a4}{pc}}, td-\/>\mbox{\hyperlink{structuss820dci__td_a4e1d3a45030cb27fac9599e438d2cd63}{offset}}, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00560}00560 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00561}00561                 \textcolor{comment}{/* get correct length */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00562}00562                 \textcolor{keywordflow}{if} (buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}} > count) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00563}00563                         buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}} = count;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00564}00564                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00565}00565                 \textcolor{comment}{/* transmit data */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00566}00566                 bus\_space\_write\_multi\_1(sc-\/>\mbox{\hyperlink{structuss820dci__softc_a10224f13b0c450aaa9078c02c74a067f}{sc\_io\_tag}}, sc-\/>\mbox{\hyperlink{structuss820dci__softc_a73cae3e8a1fd7db2f9db50b3d70b1b39}{sc\_io\_hdl}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00567}00567                     \mbox{\hyperlink{uss820dci_8h_ad16e61ff40f18916f4363bbf2cf043b0}{USS820\_TXDAT}} * \mbox{\hyperlink{uss820dci_8h_a0890d24efc51f41b962c0a692a0e3198}{USS820\_REG\_STRIDE}}, buf\_res.\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}}, buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00568}00568 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00569}00569                 \textcolor{comment}{/* update counters */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00570}00570                 count -\/= buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00571}00571                 td-\/>\mbox{\hyperlink{structuss820dci__td_a4e1d3a45030cb27fac9599e438d2cd63}{offset}} += buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00572}00572                 td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}} -\/= buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00573}00573         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00574}00574 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00575}00575         \textcolor{comment}{/* post-\/write high packet byte count first */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00576}00576         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a7eca995d6d4630c01ace492262f9a112}{USS820\_TXCNTH}}, count\_copy >> 8);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00577}00577 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00578}00578         \textcolor{comment}{/* post-\/write low packet byte count last */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00579}00579         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a4e6e2b56842e7772399274fdca89ae9b}{USS820\_TXCNTL}}, count\_copy);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00580}00580 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00581}00581         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00582}00582 \textcolor{comment}{         * Enable TX output, which must happen after that we have written}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00583}00583 \textcolor{comment}{         * data into the FIFO. This is undocumented.}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00584}00584 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00585}00585         \textcolor{keywordflow}{if} (!td-\/>\mbox{\hyperlink{structuss820dci__td_a3691a108734facd73534a4710d9897cd}{did\_enable}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00586}00586                 \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(\mbox{\hyperlink{uss820dci_8c_af671d36f028c8381b5b71fc5d399de50}{USS820\_DCI\_PC2SC}}(td-\/>\mbox{\hyperlink{structuss820dci__td_a6cc25a9d249613049b1186a0df8812a4}{pc}}),}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00587}00587                     \mbox{\hyperlink{uss820dci_8h_afcbdca78b9a54f715315abe91a6fc1b7}{USS820\_EPCON}}, 0xFF, \mbox{\hyperlink{uss820dci_8h_a8826728dbe05268e3ad5d04468766809}{USS820\_EPCON\_TXOE}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00588}00588                 td-\/>\mbox{\hyperlink{structuss820dci__td_a3691a108734facd73534a4710d9897cd}{did\_enable}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00589}00589         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00590}00590         \textcolor{comment}{/* check remainder */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00591}00591         \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}} == 0) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00592}00592                 \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structuss820dci__td_aa0731f3d6c6eb8ddaf004ce60cfaf68f}{short\_pkt}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00593}00593                         \textcolor{keywordflow}{return} (0);     \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00594}00594                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00595}00595                 \textcolor{comment}{/* else we need to transmit a short packet */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00596}00596         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00597}00597         \textcolor{keywordflow}{if} (-\/-\/to) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00598}00598                 \textcolor{keywordflow}{goto} repeat;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00599}00599         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00600}00600         \textcolor{keywordflow}{return} (1);                     \textcolor{comment}{/* not complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00601}00601 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00602}00602 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00603}00603 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00604}\mbox{\hyperlink{uss820dci_8c_a074a0d0c88117d8f4847a951b4829e2d}{00604}} \mbox{\hyperlink{uss820dci_8c_a9c299fbe4ec6640c58cc390b8a53eaa0}{uss820dci\_data\_tx\_sync}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc, \textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__td}{uss820dci\_td}} *td)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00605}00605 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00606}00606         uint8\_t rx\_stat;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00607}00607         uint8\_t tx\_flag;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00608}00608 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00609}00609         \textcolor{comment}{/* select the correct endpoint */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00610}00610         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0b06ea26c439873f4f2d95f3e046399f}{USS820\_EPINDEX}}, td-\/>\mbox{\hyperlink{structuss820dci__td_aeb35fca5ed072225fe0d1146ccba58ca}{ep\_index}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00611}00611 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00612}00612         \textcolor{comment}{/* read out TX FIFO flag */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00613}00613         tx\_flag = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_aae3ad54bb87040a7e7fc1b3115800217}{USS820\_TXFLG}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00614}00614 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00615}00615         \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structuss820dci__td_aeb35fca5ed072225fe0d1146ccba58ca}{ep\_index}} == 0) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00616}00616                 \textcolor{comment}{/* read out RX FIFO status last */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00617}00617                 rx\_stat = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a65fe8a6e994a38f50f62121c92a29f9d}{USS820\_RXSTAT}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00618}00618 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00619}00619                 DPRINTFN(5, \textcolor{stringliteral}{"{}rx\_stat=0x\%02x rem=\%u\(\backslash\)n"{}}, rx\_stat, td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00620}00620 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00621}00621                 \textcolor{keywordflow}{if} (rx\_stat \& (\mbox{\hyperlink{uss820dci_8h_a3a582c9ad8904b014b29bd3de68bf965}{USS820\_RXSTAT\_RXSETUP}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00622}00622                     \mbox{\hyperlink{uss820dci_8h_a01f35b8f604f84fb9cfab50d843e8505}{USS820\_RXSTAT\_RXSOVW}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00623}00623                     \mbox{\hyperlink{uss820dci_8h_ac9a9b15b9723daf3a6b0d56cba3fb072}{USS820\_RXSTAT\_EDOVW}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00624}00624                         DPRINTFN(5, \textcolor{stringliteral}{"{}faking complete\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00625}00625                         \textcolor{comment}{/* Race condition */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00626}00626                         \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00627}00627                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00628}00628         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00629}00629         DPRINTFN(5, \textcolor{stringliteral}{"{}tx\_flag=0x\%02x rem=\%u\(\backslash\)n"{}}, tx\_flag, td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00630}00630 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00631}00631         \textcolor{keywordflow}{if} (tx\_flag \& (\mbox{\hyperlink{uss820dci_8h_af0d4c1ce75478913d817abd03ec930cd}{USS820\_TXFLG\_TXOVF}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00632}00632             \mbox{\hyperlink{uss820dci_8h_af5636891e6df7401d895042eaacd4ff9}{USS820\_TXFLG\_TXURF}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00633}00633                 td-\/>\mbox{\hyperlink{structuss820dci__td_ad13f9096c22a9f00efd24c6ac003ed58}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00634}00634                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00635}00635         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00636}00636         \textcolor{keywordflow}{if} (tx\_flag \& (\mbox{\hyperlink{uss820dci_8h_adbd739320691dc931487e42cc8fd0109}{USS820\_TXFLG\_TXFIF0}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00637}00637             \mbox{\hyperlink{uss820dci_8h_a3d40d20139b43dad3310d9b31b76788e}{USS820\_TXFLG\_TXFIF1}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00638}00638                 \textcolor{keywordflow}{return} (1);             \textcolor{comment}{/* not complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00639}00639         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00640}00640         \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structuss820dci__td_aeb35fca5ed072225fe0d1146ccba58ca}{ep\_index}} == 0 \&\& sc-\/>\mbox{\hyperlink{structuss820dci__softc_a3ad76ae5bf551533a09f2013f7126e37}{sc\_dv\_addr}} != 0xFF) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00641}00641                 \textcolor{comment}{/* write function address */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00642}00642                 \mbox{\hyperlink{uss820dci_8c_a0b365b2543b7b4c205195acbc39a5f46}{uss820dci\_set\_address}}(sc, sc-\/>\mbox{\hyperlink{structuss820dci__softc_a3ad76ae5bf551533a09f2013f7126e37}{sc\_dv\_addr}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00643}00643         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00644}00644         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00645}00645 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00646}00646 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00647}00647 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00648}\mbox{\hyperlink{uss820dci_8c_aa16c8228ecd9bc27b400078ef733ad47}{00648}} \mbox{\hyperlink{uss820dci_8c_aa16c8228ecd9bc27b400078ef733ad47}{uss820dci\_xfer\_do\_fifo}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00649}00649 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00650}00650         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc = \mbox{\hyperlink{uss820dci_8c_acfc82510504a3887660a91aada755cb2}{USS820\_DCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00651}00651         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__td}{uss820dci\_td}} *td;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00652}00652 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00653}00653         DPRINTFN(9, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00654}00654 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00655}00655         td = xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00656}00656         \textcolor{keywordflow}{if} (td == NULL)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00657}00657                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00658}00658 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00659}00659         \textcolor{keywordflow}{while} (1) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00660}00660                 \textcolor{keywordflow}{if} ((td-\/>\mbox{\hyperlink{structuss820dci__td_ab5979302fb7e87eae34f76c325fd5741}{func}}) (sc, td)) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00661}00661                         \textcolor{comment}{/* operation in progress */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00662}00662                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00663}00663                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00664}00664                 \textcolor{keywordflow}{if} (((\textcolor{keywordtype}{void} *)td) == xfer-\/>\mbox{\hyperlink{structusb__xfer_ae74733ea0d49027c19477ea63a223f26}{td\_transfer\_last}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00665}00665                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00666}00666                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00667}00667                 \textcolor{keywordflow}{if} (td-\/>error) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00668}00668                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00669}00669                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (td-\/>remainder > 0) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00670}00670                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00671}00671 \textcolor{comment}{                         * We had a short transfer. If there is no alternate}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00672}00672 \textcolor{comment}{                         * next, stop processing !}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00673}00673 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00674}00674                         \textcolor{keywordflow}{if} (!td-\/>alt\_next) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00675}00675                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00676}00676                         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00677}00677                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00678}00678                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00679}00679 \textcolor{comment}{                 * Fetch the next transfer descriptor.}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00680}00680 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00681}00681                 td = td-\/>obj\_next;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00682}00682                 xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} = td;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00683}00683         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00684}00684         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00685}00685 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00686}00686 done:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00687}00687         \textcolor{comment}{/* compute all actual lengths */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00688}00688         xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} = NULL;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00689}00689         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a1fe8b0a1e1a4f462576093847927ff6d}{sc\_xfer\_complete}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00690}00690 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00691}00691 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00692}00692 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00693}\mbox{\hyperlink{uss820dci_8c_aa710670c46744902ba9b3c3d8fb341cb}{00693}} \mbox{\hyperlink{uss820dci_8c_aa710670c46744902ba9b3c3d8fb341cb}{uss820dci\_xfer\_do\_complete}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00694}00694 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00695}00695         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__td}{uss820dci\_td}} *td;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00696}00696 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00697}00697         DPRINTFN(9, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00698}00698 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00699}00699         td = xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00700}00700         \textcolor{keywordflow}{if} (td == NULL) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00701}00701                 \textcolor{comment}{/* compute all actual lengths */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00702}00702                 \mbox{\hyperlink{uss820dci_8c_aa3e592e9fca0359a060dacad85f100ba}{uss820dci\_standard\_done}}(xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00703}00703                 \textcolor{keywordflow}{return}(1);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00704}00704         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00705}00705         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00706}00706 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00707}00707 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00708}00708 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00709}\mbox{\hyperlink{uss820dci_8c_abf262944870628a3ee66680084b98fa6}{00709}} \mbox{\hyperlink{uss820dci_8c_abf262944870628a3ee66680084b98fa6}{uss820dci\_interrupt\_poll\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00710}00710 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00711}00711         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00712}00712 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00713}00713         TAILQ\_FOREACH(xfer, \&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_afe87bf7e25fe7284a87d14ca231bc818}{intr\_q}}.head, wait\_entry)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00714}00714                 \mbox{\hyperlink{uss820dci_8c_aa16c8228ecd9bc27b400078ef733ad47}{uss820dci\_xfer\_do\_fifo}}(xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00715}00715 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00716}00716 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00717}00717 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00718}\mbox{\hyperlink{uss820dci_8c_a73f91fbfc5af133e7d4f13e14e360d3b}{00718}} \mbox{\hyperlink{uss820dci_8c_a73f91fbfc5af133e7d4f13e14e360d3b}{uss820dci\_interrupt\_complete\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00719}00719 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00720}00720         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00721}00721 repeat:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00722}00722         TAILQ\_FOREACH(xfer, \&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_afe87bf7e25fe7284a87d14ca231bc818}{intr\_q}}.head, wait\_entry) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00723}00723                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{uss820dci_8c_aa710670c46744902ba9b3c3d8fb341cb}{uss820dci\_xfer\_do\_complete}}(xfer))}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00724}00724                         \textcolor{keywordflow}{goto} repeat;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00725}00725         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00726}00726 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00727}00727 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00728}00728 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00729}\mbox{\hyperlink{uss820dci_8c_a50986a3ac5c80ae638fe1c6f2e43c170}{00729}} \mbox{\hyperlink{uss820dci_8c_a50986a3ac5c80ae638fe1c6f2e43c170}{uss820dci\_wait\_suspend}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc, uint8\_t on)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00730}00730 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00731}00731         uint8\_t scr;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00732}00732         uint8\_t scratch;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00733}00733 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00734}00734         scr = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0787d7f00483e5c50657fdcc3dfb8b0c}{USS820\_SCR}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00735}00735         scratch = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a20598d9de36dde28cd01cb43d4b7c039}{USS820\_SCRATCH}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00736}00736 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00737}00737         \textcolor{keywordflow}{if} (on) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00738}00738                 scr |= \mbox{\hyperlink{uss820dci_8h_a1ba47807c77a3ba97fd165242526dc4e}{USS820\_SCR\_IE\_SUSP}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00739}00739                 scratch \&= \string~USS820\_SCRATCH\_IE\_RESUME;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00740}00740         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00741}00741                 scr \&= \string~USS820\_SCR\_IE\_SUSP;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00742}00742                 scratch |= \mbox{\hyperlink{uss820dci_8h_a5b49d8350b51abbcd184c9f44e10d5e4}{USS820\_SCRATCH\_IE\_RESUME}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00743}00743         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00744}00744 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00745}00745         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0787d7f00483e5c50657fdcc3dfb8b0c}{USS820\_SCR}}, scr);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00746}00746         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a20598d9de36dde28cd01cb43d4b7c039}{USS820\_SCRATCH}}, scratch);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00747}00747 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00748}00748 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00749}00749 \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00750}\mbox{\hyperlink{uss820dci_8c_ad2d5fb796ea94714e16eaa7cdcf2aef0}{00750}} \mbox{\hyperlink{uss820dci_8c_ad2d5fb796ea94714e16eaa7cdcf2aef0}{uss820dci\_filter\_interrupt}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00751}00751 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00752}00752         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00753}00753         \textcolor{keywordtype}{int} retval = FILTER\_HANDLED;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00754}00754         uint8\_t ssr;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00755}00755 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00756}00756         \mbox{\hyperlink{usb__core_8h_abcb3565f999c2fe1f334aa41320470c7}{USB\_BUS\_SPIN\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00757}00757 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00758}00758         ssr = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a2698e233aff9dc4ec305e54ed5db90cd}{USS820\_SSR}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00759}00759         \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a2698e233aff9dc4ec305e54ed5db90cd}{USS820\_SSR}}, \mbox{\hyperlink{uss820dci_8c_ade7f77f7468f591e64897730f9c8a844}{USS820\_DCI\_THREAD\_IRQ}}, 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00760}00760 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00761}00761         \textcolor{keywordflow}{if} (ssr \& \mbox{\hyperlink{uss820dci_8c_ade7f77f7468f591e64897730f9c8a844}{USS820\_DCI\_THREAD\_IRQ}})}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00762}00762                 retval = FILTER\_SCHEDULE\_THREAD;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00763}00763 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00764}00764         \textcolor{comment}{/* poll FIFOs, if any */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00765}00765         \mbox{\hyperlink{uss820dci_8c_abf262944870628a3ee66680084b98fa6}{uss820dci\_interrupt\_poll\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00766}00766 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00767}00767         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structuss820dci__softc_a1fe8b0a1e1a4f462576093847927ff6d}{sc\_xfer\_complete}} != 0)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00768}00768                 retval = FILTER\_SCHEDULE\_THREAD;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00769}00769 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00770}00770         \mbox{\hyperlink{usb__core_8h_a8f9d74e35430e8ad2cff383f4fe26002}{USB\_BUS\_SPIN\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00771}00771 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00772}00772         \textcolor{keywordflow}{return} (retval);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00773}00773 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00774}00774 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00775}00775 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00776}\mbox{\hyperlink{uss820dci_8c_aa8a3fa8aef71c69ac71cf99a5222fd2d}{00776}} \mbox{\hyperlink{uss820dci_8c_aa8a3fa8aef71c69ac71cf99a5222fd2d}{uss820dci\_interrupt}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00777}00777 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00778}00778         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc = arg;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00779}00779         uint8\_t ssr;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00780}00780         uint8\_t event;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00781}00781 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00782}00782         \mbox{\hyperlink{usb__core_8h_a21dab1de8f52baf9fbf7617c6b1ec033}{USB\_BUS\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00783}00783         \mbox{\hyperlink{usb__core_8h_abcb3565f999c2fe1f334aa41320470c7}{USB\_BUS\_SPIN\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00784}00784 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00785}00785         ssr = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a2698e233aff9dc4ec305e54ed5db90cd}{USS820\_SSR}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00786}00786 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00787}00787         \textcolor{comment}{/* acknowledge all interrupts */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00788}00788 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00789}00789         \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a2698e233aff9dc4ec305e54ed5db90cd}{USS820\_SSR}}, \string~\mbox{\hyperlink{uss820dci_8c_ade7f77f7468f591e64897730f9c8a844}{USS820\_DCI\_THREAD\_IRQ}}, 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00790}00790 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00791}00791         \textcolor{comment}{/* check for any bus state change interrupts */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00792}00792 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00793}00793         \textcolor{keywordflow}{if} (ssr \& \mbox{\hyperlink{uss820dci_8c_ade7f77f7468f591e64897730f9c8a844}{USS820\_DCI\_THREAD\_IRQ}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00794}00794                 \textcolor{keyword}{event} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00795}00795 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00796}00796                 \textcolor{keywordflow}{if} (ssr \& \mbox{\hyperlink{uss820dci_8h_a626ac8c359903e1095fa3691391b56f0}{USS820\_SSR\_RESET}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00797}00797                         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a46cc6d5d03a942cf0a909c29224c0269}{status\_bus\_reset}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00798}00798                         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_abac956aef830fc8d8c3d0aebb83be4a9}{status\_suspend}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00799}00799                         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_ab13374a188ee78ccc573808db1d721d2}{change\_suspend}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00800}00800                         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a42040e7846ee6876bc61984313874e07}{change\_connect}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00801}00801 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00802}00802                         \textcolor{comment}{/* disable resume interrupt */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00803}00803                         \mbox{\hyperlink{uss820dci_8c_a50986a3ac5c80ae638fe1c6f2e43c170}{uss820dci\_wait\_suspend}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00804}00804 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00805}00805                         \textcolor{keyword}{event} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00806}00806                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00807}00807                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00808}00808 \textcolor{comment}{                 * If "{}RESUME"{} and "{}SUSPEND"{} is set at the same time}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00809}00809 \textcolor{comment}{                 * we interpret that like "{}RESUME"{}. Resume is set when}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00810}00810 \textcolor{comment}{                 * there is at least 3 milliseconds of inactivity on}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00811}00811 \textcolor{comment}{                 * the USB BUS.}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00812}00812 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00813}00813                 \textcolor{keywordflow}{if} (ssr \& \mbox{\hyperlink{uss820dci_8h_a45f19e5df8cfbc2608cc7cdc48f871bb}{USS820\_SSR\_RESUME}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00814}00814                         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_abac956aef830fc8d8c3d0aebb83be4a9}{status\_suspend}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00815}00815                                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_abac956aef830fc8d8c3d0aebb83be4a9}{status\_suspend}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00816}00816                                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_ab13374a188ee78ccc573808db1d721d2}{change\_suspend}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00817}00817                                 \textcolor{comment}{/* disable resume interrupt */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00818}00818                                 \mbox{\hyperlink{uss820dci_8c_a50986a3ac5c80ae638fe1c6f2e43c170}{uss820dci\_wait\_suspend}}(sc, 1);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00819}00819                                 \textcolor{keyword}{event} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00820}00820                         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00821}00821                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ssr \& \mbox{\hyperlink{uss820dci_8h_a5fab896a67dcfb5f4abd0ce310070efd}{USS820\_SSR\_SUSPEND}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00822}00822                         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_abac956aef830fc8d8c3d0aebb83be4a9}{status\_suspend}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00823}00823                                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_abac956aef830fc8d8c3d0aebb83be4a9}{status\_suspend}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00824}00824                                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_ab13374a188ee78ccc573808db1d721d2}{change\_suspend}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00825}00825                                 \textcolor{comment}{/* enable resume interrupt */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00826}00826                                 \mbox{\hyperlink{uss820dci_8c_a50986a3ac5c80ae638fe1c6f2e43c170}{uss820dci\_wait\_suspend}}(sc, 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00827}00827                                 \textcolor{keyword}{event} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00828}00828                         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00829}00829                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00830}00830                 \textcolor{keywordflow}{if} (event) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00831}00831                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}real bus interrupt 0x\%02x\(\backslash\)n"{}}, ssr);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00832}00832 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00833}00833                         \textcolor{comment}{/* complete root HUB interrupt endpoint */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00834}00834                         \mbox{\hyperlink{uss820dci_8c_af0f739feed148316a4d60b9fedaf4446}{uss820dci\_root\_intr}}(sc);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00835}00835                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00836}00836         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00837}00837         \textcolor{comment}{/* acknowledge all SBI interrupts */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00838}00838         \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a2641d6b4ab276ac6887c5c65c64d5519}{USS820\_SBI}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00839}00839 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00840}00840         \textcolor{comment}{/* acknowledge all SBI1 interrupts */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00841}00841         \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_ab278f6870588bdd86d5f2fa04fb03058}{USS820\_SBI1}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00842}00842 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00843}00843         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structuss820dci__softc_a1fe8b0a1e1a4f462576093847927ff6d}{sc\_xfer\_complete}} != 0) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00844}00844                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a1fe8b0a1e1a4f462576093847927ff6d}{sc\_xfer\_complete}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00845}00845 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00846}00846                 \textcolor{comment}{/* complete FIFOs, if any */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00847}00847                 \mbox{\hyperlink{uss820dci_8c_a73f91fbfc5af133e7d4f13e14e360d3b}{uss820dci\_interrupt\_complete\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00848}00848         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00849}00849         \mbox{\hyperlink{usb__core_8h_a8f9d74e35430e8ad2cff383f4fe26002}{USB\_BUS\_SPIN\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00850}00850         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00851}00851 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00852}00852 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00853}00853 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00854}\mbox{\hyperlink{uss820dci_8c_a454bb352d244177e8b3f7fcb9a226bb8}{00854}} \mbox{\hyperlink{uss820dci_8c_a454bb352d244177e8b3f7fcb9a226bb8}{uss820dci\_setup\_standard\_chain\_sub}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820__std__temp}{uss820\_std\_temp}} *temp)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00855}00855 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00856}00856         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__td}{uss820dci\_td}} *td;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00857}00857 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00858}00858         \textcolor{comment}{/* get current Transfer Descriptor */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00859}00859         td = temp-\/>\mbox{\hyperlink{structuss820__std__temp_abed536534ac987a9923f6fe852bc0916}{td\_next}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00860}00860         temp-\/>\mbox{\hyperlink{structuss820__std__temp_a9de634521637e3ec5e2c54e5cdcc49b3}{td}} = td;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00861}00861 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00862}00862         \textcolor{comment}{/* prepare for next TD */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00863}00863         temp-\/>\mbox{\hyperlink{structuss820__std__temp_abed536534ac987a9923f6fe852bc0916}{td\_next}} = td-\/>\mbox{\hyperlink{structuss820dci__td_a8eec7af4458d276d91bc5c658cb002e2}{obj\_next}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00864}00864 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00865}00865         \textcolor{comment}{/* fill out the Transfer Descriptor */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00866}00866         td-\/>\mbox{\hyperlink{structuss820dci__td_ab5979302fb7e87eae34f76c325fd5741}{func}} = temp-\/>\mbox{\hyperlink{structuss820__std__temp_adf4eafd0be36d918789fada5229f78ec}{func}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00867}00867         td-\/>\mbox{\hyperlink{structuss820dci__td_a6cc25a9d249613049b1186a0df8812a4}{pc}} = temp-\/>\mbox{\hyperlink{structuss820__std__temp_abac5ff0675cb766ca729583c819ecdcb}{pc}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00868}00868         td-\/>\mbox{\hyperlink{structuss820dci__td_a4e1d3a45030cb27fac9599e438d2cd63}{offset}} = temp-\/>\mbox{\hyperlink{structuss820__std__temp_a5870750162c8e19e2080b055e304ab08}{offset}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00869}00869         td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}} = temp-\/>\mbox{\hyperlink{structuss820__std__temp_a79048b722b801b14df089e5ade207d41}{len}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00870}00870         td-\/>\mbox{\hyperlink{structuss820dci__td_ad13f9096c22a9f00efd24c6ac003ed58}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00871}00871         td-\/>\mbox{\hyperlink{structuss820dci__td_a3691a108734facd73534a4710d9897cd}{did\_enable}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00872}00872         td-\/>\mbox{\hyperlink{structuss820dci__td_a82dfce76492a969f4746cb66579ef424}{did\_stall}} = temp-\/>\mbox{\hyperlink{structuss820__std__temp_aebd772867c9873e3d11c482978a062ed}{did\_stall}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00873}00873         td-\/>\mbox{\hyperlink{structuss820dci__td_aa0731f3d6c6eb8ddaf004ce60cfaf68f}{short\_pkt}} = temp-\/>\mbox{\hyperlink{structuss820__std__temp_a92e2c19a1a6c442ab90b53b7df33dbf6}{short\_pkt}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00874}00874         td-\/>\mbox{\hyperlink{structuss820dci__td_a6d6c893763ce2f43596d593da57aa7a3}{alt\_next}} = temp-\/>\mbox{\hyperlink{structuss820__std__temp_a1615ffe714d2263da4d1069134707068}{setup\_alt\_next}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00875}00875 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00876}00876 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00877}00877 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00878}\mbox{\hyperlink{uss820dci_8c_aca6b2ca4730cfce621d94c894c434eeb}{00878}} \mbox{\hyperlink{uss820dci_8c_aca6b2ca4730cfce621d94c894c434eeb}{uss820dci\_setup\_standard\_chain}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00879}00879 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00880}00880         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820__std__temp}{uss820\_std\_temp}} temp;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00881}00881         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00882}00882         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__td}{uss820dci\_td}} *td;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00883}00883         uint32\_t x;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00884}00884         uint8\_t ep\_no;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00885}00885 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00886}00886         DPRINTFN(9, \textcolor{stringliteral}{"{}addr=\%d endpt=\%d sumlen=\%d speed=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00887}00887             xfer-\/>\mbox{\hyperlink{structusb__xfer_a8ff4ea2a405466a9ce1d9a154a535f0b}{address}}, \mbox{\hyperlink{usb_8h_a5c87169fa1d69d81d7ac06bd59265243}{UE\_GET\_ADDR}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}}),}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00888}00888             xfer-\/>\mbox{\hyperlink{structusb__xfer_af7389161d91d0c0b7a17b1eaaa1772c0}{sumlen}}, \mbox{\hyperlink{usb__device_8c_a7aed6ff31c86f304cb29317095a0de1c}{usbd\_get\_speed}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}}));}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00889}00889 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00890}00890         temp.\mbox{\hyperlink{structuss820__std__temp_a7133b301645598fa0ff155a3884adfde}{max\_frame\_size}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae115ce000f084f7d5f8c005fa88d2703}{max\_frame\_size}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00891}00891 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00892}00892         td = xfer-\/>\mbox{\hyperlink{structusb__xfer_a68f3cea7860d801fe4e03b3301c9381d}{td\_start}}[0];}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00893}00893         xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}} = td;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00894}00894         xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} = td;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00895}00895 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00896}00896         \textcolor{comment}{/* setup temp */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00897}00897 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00898}00898         temp.\mbox{\hyperlink{structuss820__std__temp_abac5ff0675cb766ca729583c819ecdcb}{pc}} = NULL;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00899}00899         temp.\mbox{\hyperlink{structuss820__std__temp_a9de634521637e3ec5e2c54e5cdcc49b3}{td}} = NULL;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00900}00900         temp.\mbox{\hyperlink{structuss820__std__temp_abed536534ac987a9923f6fe852bc0916}{td\_next}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a68f3cea7860d801fe4e03b3301c9381d}{td\_start}}[0];}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00901}00901         temp.\mbox{\hyperlink{structuss820__std__temp_a5870750162c8e19e2080b055e304ab08}{offset}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00902}00902         temp.\mbox{\hyperlink{structuss820__std__temp_a1615ffe714d2263da4d1069134707068}{setup\_alt\_next}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a1023a81a83c7acfbe3134100363e7fde}{short\_frames\_ok}} ||}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00903}00903             xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a5367e64daae30f55ec887872d577fa80}{isochronous\_xfr}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00904}00904         temp.\mbox{\hyperlink{structuss820__std__temp_aebd772867c9873e3d11c482978a062ed}{did\_stall}} = !xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a62d0b716bbeed6d1abd325baf168f145}{control\_stall}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00905}00905 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00906}00906         sc = \mbox{\hyperlink{uss820dci_8c_acfc82510504a3887660a91aada755cb2}{USS820\_DCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00907}00907         ep\_no = (xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}} \& \mbox{\hyperlink{usb_8h_a227db1f194f105a22faae81401d3e18e}{UE\_ADDR}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00908}00908 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00909}00909         \textcolor{comment}{/* check if we should prepend a setup message */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00910}00910 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00911}00911         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00912}00912                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a0add2c86d09b768df5f354746b8fe16f}{control\_hdr}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00913}00913                         temp.\mbox{\hyperlink{structuss820__std__temp_adf4eafd0be36d918789fada5229f78ec}{func}} = \&\mbox{\hyperlink{uss820dci_8c_ad463c127b46606e3359b64f9e988601f}{uss820dci\_setup\_rx}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00914}00914                         temp.\mbox{\hyperlink{structuss820__std__temp_a79048b722b801b14df089e5ade207d41}{len}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a04bfeb929b15a30d355f94eb7ff2a586}{frlengths}}[0];}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00915}00915                         temp.\mbox{\hyperlink{structuss820__std__temp_abac5ff0675cb766ca729583c819ecdcb}{pc}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}} + 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00916}00916                         temp.\mbox{\hyperlink{structuss820__std__temp_a92e2c19a1a6c442ab90b53b7df33dbf6}{short\_pkt}} = temp.\mbox{\hyperlink{structuss820__std__temp_a79048b722b801b14df089e5ade207d41}{len}} ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00917}00917                         \textcolor{comment}{/* check for last frame */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00918}00918                         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}} == 1) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00919}00919                                 \textcolor{comment}{/* no STATUS stage yet, SETUP is last */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00920}00920                                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a100da5a86a7ab85605683dc51d48ef86}{control\_act}})}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00921}00921                                         temp.\mbox{\hyperlink{structuss820__std__temp_a1615ffe714d2263da4d1069134707068}{setup\_alt\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00922}00922                         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00923}00923 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00924}00924                         \mbox{\hyperlink{uss820dci_8c_a454bb352d244177e8b3f7fcb9a226bb8}{uss820dci\_setup\_standard\_chain\_sub}}(\&temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00925}00925                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00926}00926                 x = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00927}00927         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00928}00928                 x = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00929}00929         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00930}00930 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00931}00931         \textcolor{keywordflow}{if} (x != xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00932}00932                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}} \& \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00933}00933                         temp.\mbox{\hyperlink{structuss820__std__temp_adf4eafd0be36d918789fada5229f78ec}{func}} = \&\mbox{\hyperlink{uss820dci_8c_afa91532b7607cda0e01bfa70d653069d}{uss820dci\_data\_tx}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00934}00934                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00935}00935                         temp.\mbox{\hyperlink{structuss820__std__temp_adf4eafd0be36d918789fada5229f78ec}{func}} = \&\mbox{\hyperlink{uss820dci_8c_a9b943775beb18c16eb336d08925ade60}{uss820dci\_data\_rx}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00936}00936                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00937}00937 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00938}00938                 \textcolor{comment}{/* setup "{}pc"{} pointer */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00939}00939                 temp.\mbox{\hyperlink{structuss820__std__temp_abac5ff0675cb766ca729583c819ecdcb}{pc}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}} + x;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00940}00940         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00941}00941         \textcolor{keywordflow}{while} (x != xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00942}00942                 \textcolor{comment}{/* DATA0 / DATA1 message */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00943}00943 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00944}00944                 temp.\mbox{\hyperlink{structuss820__std__temp_a79048b722b801b14df089e5ade207d41}{len}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a04bfeb929b15a30d355f94eb7ff2a586}{frlengths}}[x];}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00945}00945 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00946}00946                 x++;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00947}00947 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00948}00948                 \textcolor{keywordflow}{if} (x == xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00949}00949                         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00950}00950                                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a100da5a86a7ab85605683dc51d48ef86}{control\_act}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00951}00951                                         temp.\mbox{\hyperlink{structuss820__std__temp_a1615ffe714d2263da4d1069134707068}{setup\_alt\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00952}00952                                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00953}00953                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00954}00954                                 temp.\mbox{\hyperlink{structuss820__std__temp_a1615ffe714d2263da4d1069134707068}{setup\_alt\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00955}00955                         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00956}00956                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00957}00957                 \textcolor{keywordflow}{if} (temp.\mbox{\hyperlink{structuss820__std__temp_a79048b722b801b14df089e5ade207d41}{len}} == 0) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00958}00958                         \textcolor{comment}{/* make sure that we send an USB packet */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00959}00959 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00960}00960                         temp.\mbox{\hyperlink{structuss820__std__temp_a92e2c19a1a6c442ab90b53b7df33dbf6}{short\_pkt}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00961}00961 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00962}00962                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00963}00963                         \textcolor{comment}{/* regular data transfer */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00964}00964 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00965}00965                         temp.\mbox{\hyperlink{structuss820__std__temp_a92e2c19a1a6c442ab90b53b7df33dbf6}{short\_pkt}} = (xfer-\/>\mbox{\hyperlink{structusb__xfer_aa251db061296120bb15fd562088a1d9d}{flags}}.\mbox{\hyperlink{structusb__xfer__flags_a76816b701c58c22a9a78904b109c2e95}{force\_short\_xfer}}) ? 0 : 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00966}00966                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00967}00967 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00968}00968                 \mbox{\hyperlink{uss820dci_8c_a454bb352d244177e8b3f7fcb9a226bb8}{uss820dci\_setup\_standard\_chain\_sub}}(\&temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00969}00969 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00970}00970                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a5367e64daae30f55ec887872d577fa80}{isochronous\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00971}00971                         temp.\mbox{\hyperlink{structuss820__std__temp_a5870750162c8e19e2080b055e304ab08}{offset}} += temp.\mbox{\hyperlink{structuss820__std__temp_a79048b722b801b14df089e5ade207d41}{len}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00972}00972                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00973}00973                         \textcolor{comment}{/* get next Page Cache pointer */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00974}00974                         temp.\mbox{\hyperlink{structuss820__std__temp_abac5ff0675cb766ca729583c819ecdcb}{pc}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}} + x;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00975}00975                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00976}00976         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00977}00977 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00978}00978         \textcolor{comment}{/* check for control transfer */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00979}00979         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00980}00980                 uint8\_t need\_sync;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00981}00981 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00982}00982                 \textcolor{comment}{/* always setup a valid "{}pc"{} pointer for status and sync */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00983}00983                 temp.\mbox{\hyperlink{structuss820__std__temp_abac5ff0675cb766ca729583c819ecdcb}{pc}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}} + 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00984}00984                 temp.\mbox{\hyperlink{structuss820__std__temp_a79048b722b801b14df089e5ade207d41}{len}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00985}00985                 temp.\mbox{\hyperlink{structuss820__std__temp_a92e2c19a1a6c442ab90b53b7df33dbf6}{short\_pkt}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00986}00986                 temp.\mbox{\hyperlink{structuss820__std__temp_a1615ffe714d2263da4d1069134707068}{setup\_alt\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00987}00987 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00988}00988                 \textcolor{comment}{/* check if we should append a status stage */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00989}00989                 \textcolor{keywordflow}{if} (!xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a100da5a86a7ab85605683dc51d48ef86}{control\_act}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00990}00990                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00991}00991 \textcolor{comment}{                         * Send a DATA1 message and invert the current}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00992}00992 \textcolor{comment}{                         * endpoint direction.}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00993}00993 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00994}00994                         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}} \& \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00995}00995                                 temp.\mbox{\hyperlink{structuss820__std__temp_adf4eafd0be36d918789fada5229f78ec}{func}} = \&\mbox{\hyperlink{uss820dci_8c_a9b943775beb18c16eb336d08925ade60}{uss820dci\_data\_rx}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00996}00996                                 need\_sync = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00997}00997                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00998}00998                                 temp.\mbox{\hyperlink{structuss820__std__temp_adf4eafd0be36d918789fada5229f78ec}{func}} = \&\mbox{\hyperlink{uss820dci_8c_afa91532b7607cda0e01bfa70d653069d}{uss820dci\_data\_tx}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l00999}00999                                 need\_sync = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01000}01000                         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01001}01001                         temp.\mbox{\hyperlink{structuss820__std__temp_a79048b722b801b14df089e5ade207d41}{len}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01002}01002                         temp.\mbox{\hyperlink{structuss820__std__temp_a92e2c19a1a6c442ab90b53b7df33dbf6}{short\_pkt}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01003}01003 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01004}01004                         \mbox{\hyperlink{uss820dci_8c_a454bb352d244177e8b3f7fcb9a226bb8}{uss820dci\_setup\_standard\_chain\_sub}}(\&temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01005}01005                         \textcolor{keywordflow}{if} (need\_sync) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01006}01006                                 \textcolor{comment}{/* we need a SYNC point after TX */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01007}01007                                 temp.\mbox{\hyperlink{structuss820__std__temp_adf4eafd0be36d918789fada5229f78ec}{func}} = \&\mbox{\hyperlink{uss820dci_8c_a9c299fbe4ec6640c58cc390b8a53eaa0}{uss820dci\_data\_tx\_sync}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01008}01008                                 \mbox{\hyperlink{uss820dci_8c_a454bb352d244177e8b3f7fcb9a226bb8}{uss820dci\_setup\_standard\_chain\_sub}}(\&temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01009}01009                         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01010}01010                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01011}01011         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01012}01012         \textcolor{comment}{/* must have at least one frame! */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01013}01013         td = temp.\mbox{\hyperlink{structuss820__std__temp_a9de634521637e3ec5e2c54e5cdcc49b3}{td}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01014}01014         xfer-\/>\mbox{\hyperlink{structusb__xfer_ae74733ea0d49027c19477ea63a223f26}{td\_transfer\_last}} = td;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01015}01015 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01016}01016 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01017}01017 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01018}\mbox{\hyperlink{uss820dci_8c_a131d6a28edce02a81480a449f9bdb02c}{01018}} \mbox{\hyperlink{uss820dci_8c_a131d6a28edce02a81480a449f9bdb02c}{uss820dci\_timeout}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01019}01019 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01020}01020         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer = arg;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01021}01021 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01022}01022         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}xfer=\%p\(\backslash\)n"{}}, xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01023}01023 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01024}01024         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01025}01025 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01026}01026         \textcolor{comment}{/* transfer is transferred */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01027}01027         \mbox{\hyperlink{uss820dci_8c_a58c989352bde3ee6a94c65b754b2748a}{uss820dci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945aeb31baaa7bf416e200f2a0d4ece60820}{USB\_ERR\_TIMEOUT}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01028}01028 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01029}01029 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01030}01030 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01031}\mbox{\hyperlink{uss820dci_8c_a797e59671cbff9cd10d0bb2b969d97d7}{01031}} \mbox{\hyperlink{uss820dci_8c_a797e59671cbff9cd10d0bb2b969d97d7}{uss820dci\_intr\_set}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, uint8\_t set)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01032}01032 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01033}01033         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc = \mbox{\hyperlink{uss820dci_8c_acfc82510504a3887660a91aada755cb2}{USS820\_DCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01034}01034         uint8\_t ep\_no = (xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}} \& \mbox{\hyperlink{usb_8h_a227db1f194f105a22faae81401d3e18e}{UE\_ADDR}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01035}01035         uint8\_t ep\_reg;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01036}01036         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01037}01037 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01038}01038         DPRINTFN(15, \textcolor{stringliteral}{"{}endpoint 0x\%02x\(\backslash\)n"{}}, xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01039}01039 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01040}01040         \textcolor{keywordflow}{if} (ep\_no > 3) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01041}01041                 ep\_reg = \mbox{\hyperlink{uss820dci_8h_a9b1745700a940bcb85659af80b19a2ac}{USS820\_SBIE1}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01042}01042         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01043}01043                 ep\_reg = \mbox{\hyperlink{uss820dci_8h_aff6f5747d2d16aa520a2a90d80c088ce}{USS820\_SBIE}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01044}01044         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01045}01045 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01046}01046         ep\_no \&= 3;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01047}01047         ep\_no = 1 << (2 * ep\_no);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01048}01048 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01049}01049         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01050}01050                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a0add2c86d09b768df5f354746b8fe16f}{control\_hdr}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01051}01051                         ep\_no <<= 1;    \textcolor{comment}{/* RX interrupt only */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01052}01052                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01053}01053                         ep\_no |= (ep\_no << 1);  \textcolor{comment}{/* RX and TX interrupt */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01054}01054                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01055}01055         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01056}01056                 \textcolor{keywordflow}{if} (!(xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}} \& \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01057}01057                         ep\_no <<= 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01058}01058                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01059}01059         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01060}01060         temp = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, ep\_reg);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01061}01061         \textcolor{keywordflow}{if} (set) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01062}01062                 temp |= ep\_no;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01063}01063         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01064}01064                 temp \&= \string~ep\_no;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01065}01065         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01066}01066         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, ep\_reg, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01067}01067 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01068}01068 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01069}01069 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01070}\mbox{\hyperlink{uss820dci_8c_a6199bb6f5c2c4526db43a08e32888942}{01070}} \mbox{\hyperlink{uss820dci_8c_a6199bb6f5c2c4526db43a08e32888942}{uss820dci\_start\_standard\_chain}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01071}01071 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01072}01072         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc = \mbox{\hyperlink{uss820dci_8c_acfc82510504a3887660a91aada755cb2}{USS820\_DCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01073}01073 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01074}01074         DPRINTFN(9, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01075}01075 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01076}01076         \mbox{\hyperlink{usb__core_8h_abcb3565f999c2fe1f334aa41320470c7}{USB\_BUS\_SPIN\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01077}01077 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01078}01078         \textcolor{comment}{/* poll one time */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01079}01079         \mbox{\hyperlink{uss820dci_8c_aa16c8228ecd9bc27b400078ef733ad47}{uss820dci\_xfer\_do\_fifo}}(xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01080}01080 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01081}01081         \textcolor{keywordflow}{if} (\mbox{\hyperlink{uss820dci_8c_aa710670c46744902ba9b3c3d8fb341cb}{uss820dci\_xfer\_do\_complete}}(xfer) == 0) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01082}01082                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01083}01083 \textcolor{comment}{                 * Only enable the endpoint interrupt when we are}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01084}01084 \textcolor{comment}{                 * actually waiting for data, hence we are dealing}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01085}01085 \textcolor{comment}{                 * with level triggered interrupts !}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01086}01086 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01087}01087                 \mbox{\hyperlink{uss820dci_8c_a797e59671cbff9cd10d0bb2b969d97d7}{uss820dci\_intr\_set}}(xfer, 1);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01088}01088 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01089}01089                 \textcolor{comment}{/* put transfer on interrupt queue */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01090}01090                 \mbox{\hyperlink{usb__transfer_8c_abfdcc46256df403f3f4d1b02db7ccb16}{usbd\_transfer\_enqueue}}(\&xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}}-\/>\mbox{\hyperlink{structusb__bus_afe87bf7e25fe7284a87d14ca231bc818}{intr\_q}}, xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01091}01091 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01092}01092                 \textcolor{comment}{/* start timeout, if any */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01093}01093                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a766f3db3d34b816ff819212c11f27ad3}{timeout}} != 0) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01094}01094                         \mbox{\hyperlink{usb__transfer_8c_ad2a08e4791c74765a0ecc20d5894ab36}{usbd\_transfer\_timeout\_ms}}(xfer,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01095}01095                             \&\mbox{\hyperlink{uss820dci_8c_a131d6a28edce02a81480a449f9bdb02c}{uss820dci\_timeout}}, xfer-\/>\mbox{\hyperlink{structusb__xfer_a766f3db3d34b816ff819212c11f27ad3}{timeout}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01096}01096                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01097}01097         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01098}01098         \mbox{\hyperlink{usb__core_8h_a8f9d74e35430e8ad2cff383f4fe26002}{USB\_BUS\_SPIN\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01099}01099 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01100}01100 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01101}01101 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01102}\mbox{\hyperlink{uss820dci_8c_af0f739feed148316a4d60b9fedaf4446}{01102}} \mbox{\hyperlink{uss820dci_8c_af0f739feed148316a4d60b9fedaf4446}{uss820dci\_root\_intr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01103}01103 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01104}01104         DPRINTFN(9, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01105}01105 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01106}01106         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01107}01107 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01108}01108         \textcolor{comment}{/* set port bit */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01109}01109         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a4d859bc07f134ecb820ee39d9f16b493}{sc\_hub\_idata}}[0] = 0x02; \textcolor{comment}{/* we only have one port */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01110}01110 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01111}01111         \mbox{\hyperlink{usb__hub_8c_a5d4ec35789c119dd1afa44df46d4b8ed}{uhub\_root\_intr}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}}, sc-\/>\mbox{\hyperlink{structuss820dci__softc_a4d859bc07f134ecb820ee39d9f16b493}{sc\_hub\_idata}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01112}01112             \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structuss820dci__softc_a4d859bc07f134ecb820ee39d9f16b493}{sc\_hub\_idata}}));}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01113}01113 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01114}01114 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01115}01115 \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01116}\mbox{\hyperlink{uss820dci_8c_ab9f4bf65e121b67b9c337b52d8786570}{01116}} \mbox{\hyperlink{uss820dci_8c_ab9f4bf65e121b67b9c337b52d8786570}{uss820dci\_standard\_done\_sub}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01117}01117 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01118}01118         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__td}{uss820dci\_td}} *td;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01119}01119         uint32\_t \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01120}01120         uint8\_t \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01121}01121 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01122}01122         DPRINTFN(9, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01123}01123 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01124}01124         td = xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01125}01125 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01126}01126         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01127}01127                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = td-\/>\mbox{\hyperlink{structuss820dci__td_afaf1e6341bc2d63441f4a63542453ff2}{remainder}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01128}01128 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01129}01129                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}} != xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01130}01130                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01131}01131 \textcolor{comment}{                         * Verify the length and subtract}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01132}01132 \textcolor{comment}{                         * the remainder from "{}frlengths[]"{}:}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01133}01133 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01134}01134                         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} > xfer-\/>\mbox{\hyperlink{structusb__xfer_a04bfeb929b15a30d355f94eb7ff2a586}{frlengths}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}}]) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01135}01135                                 td-\/>\mbox{\hyperlink{structuss820dci__td_ad13f9096c22a9f00efd24c6ac003ed58}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01136}01136                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01137}01137                                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a04bfeb929b15a30d355f94eb7ff2a586}{frlengths}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}}] -\/= \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01138}01138                         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01139}01139                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01140}01140                 \textcolor{comment}{/* Check for transfer error */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01141}01141                 \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structuss820dci__td_ad13f9096c22a9f00efd24c6ac003ed58}{error}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01142}01142                         \textcolor{comment}{/* the transfer is finished */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01143}01143                         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01144}01144                         td = NULL;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01145}01145                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01146}01146                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01147}01147                 \textcolor{comment}{/* Check for short transfer */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01148}01148                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} > 0) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01149}01149                         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a1023a81a83c7acfbe3134100363e7fde}{short\_frames\_ok}} ||}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01150}01150                             xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a5367e64daae30f55ec887872d577fa80}{isochronous\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01151}01151                                 \textcolor{comment}{/* follow alt next */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01152}01152                                 \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structuss820dci__td_a6d6c893763ce2f43596d593da57aa7a3}{alt\_next}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01153}01153                                         td = td-\/>\mbox{\hyperlink{structuss820dci__td_a8eec7af4458d276d91bc5c658cb002e2}{obj\_next}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01154}01154                                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01155}01155                                         td = NULL;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01156}01156                                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01157}01157                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01158}01158                                 \textcolor{comment}{/* the transfer is finished */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01159}01159                                 td = NULL;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01160}01160                         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01161}01161                         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01162}01162                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01163}01163                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01164}01164                 td = td-\/>\mbox{\hyperlink{structuss820dci__td_a8eec7af4458d276d91bc5c658cb002e2}{obj\_next}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01165}01165 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01166}01166                 \textcolor{comment}{/* this USB frame is complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01167}01167                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01168}01168                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01169}01169 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01170}01170         \} \textcolor{keywordflow}{while} (0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01171}01171 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01172}01172         \textcolor{comment}{/* update transfer cache */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01173}01173 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01174}01174         xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} = td;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01175}01175 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01176}01176         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} ?}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01177}01177             \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a83258c6183686c303988db96e7f5713a}{USB\_ERR\_STALLED}} : \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a01e440e0629669433dd14bc477757c74}{USB\_ERR\_NORMAL\_COMPLETION}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01178}01178 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01179}01179 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01180}01180 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01181}\mbox{\hyperlink{uss820dci_8c_aa3e592e9fca0359a060dacad85f100ba}{01181}} \mbox{\hyperlink{uss820dci_8c_aa3e592e9fca0359a060dacad85f100ba}{uss820dci\_standard\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01182}01182 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01183}01183         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01184}01184 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01185}01185         DPRINTFN(13, \textcolor{stringliteral}{"{}xfer=\%p endpoint=\%p transfer done\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01186}01186             xfer, xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01187}01187 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01188}01188         \textcolor{comment}{/* reset scanner */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01189}01189 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01190}01190         xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01191}01191 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01192}01192         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01193}01193                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a0add2c86d09b768df5f354746b8fe16f}{control\_hdr}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01194}01194                         err = \mbox{\hyperlink{uss820dci_8c_ab9f4bf65e121b67b9c337b52d8786570}{uss820dci\_standard\_done\_sub}}(xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01195}01195                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01196}01196                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01197}01197 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01198}01198                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01199}01199                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01200}01200                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01201}01201         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01202}01202         \textcolor{keywordflow}{while} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}} != xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01203}01203                 err = \mbox{\hyperlink{uss820dci_8c_ab9f4bf65e121b67b9c337b52d8786570}{uss820dci\_standard\_done\_sub}}(xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01204}01204                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}}++;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01205}01205 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01206}01206                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01207}01207                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01208}01208                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01209}01209         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01210}01210 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01211}01211         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}} \&\&}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01212}01212             !xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a100da5a86a7ab85605683dc51d48ef86}{control\_act}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01213}01213                 err = \mbox{\hyperlink{uss820dci_8c_ab9f4bf65e121b67b9c337b52d8786570}{uss820dci\_standard\_done\_sub}}(xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01214}01214         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01215}01215 done:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01216}01216         \mbox{\hyperlink{uss820dci_8c_a58c989352bde3ee6a94c65b754b2748a}{uss820dci\_device\_done}}(xfer, err);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01217}01217 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01218}01218 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01219}01219 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01220}01220 \textcolor{comment}{ *      uss820dci\_device\_done}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01221}01221 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01222}01222 \textcolor{comment}{ * NOTE: this function can be called more than one time on the}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01223}01223 \textcolor{comment}{ * same USB transfer!}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01224}01224 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01225}01225 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01226}\mbox{\hyperlink{uss820dci_8c_a58c989352bde3ee6a94c65b754b2748a}{01226}} \mbox{\hyperlink{uss820dci_8c_a58c989352bde3ee6a94c65b754b2748a}{uss820dci\_device\_done}}(\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{uss820dci_8c_source_l01227}01227 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01228}01228         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc = \mbox{\hyperlink{uss820dci_8c_acfc82510504a3887660a91aada755cb2}{USS820\_DCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01229}01229 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01230}01230         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01231}01231 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01232}01232         DPRINTFN(2, \textcolor{stringliteral}{"{}xfer=\%p, endpoint=\%p, error=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01233}01233             xfer, xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01234}01234 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01235}01235         \mbox{\hyperlink{usb__core_8h_abcb3565f999c2fe1f334aa41320470c7}{USB\_BUS\_SPIN\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01236}01236 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01237}01237         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a0ea2ef8ef9f5c2c6676e7f609c2a4ada}{usb\_mode}} == \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806bada6c05f1ad342e782a92990170fca2cc}{USB\_MODE\_DEVICE}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01238}01238                 \mbox{\hyperlink{uss820dci_8c_a797e59671cbff9cd10d0bb2b969d97d7}{uss820dci\_intr\_set}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01239}01239         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01240}01240         \textcolor{comment}{/* dequeue transfer and start next transfer */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01241}01241         \mbox{\hyperlink{usb__transfer_8c_a3141421f88316987bbc9b10e36715faf}{usbd\_transfer\_done}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01242}01242 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01243}01243         \mbox{\hyperlink{usb__core_8h_a8f9d74e35430e8ad2cff383f4fe26002}{USB\_BUS\_SPIN\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01244}01244 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01245}01245 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01246}01246 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01247}\mbox{\hyperlink{uss820dci_8c_a00bf6d01a51e7eb6a00fe05b8ebe2b7f}{01247}} \mbox{\hyperlink{uss820dci_8c_a00bf6d01a51e7eb6a00fe05b8ebe2b7f}{uss820dci\_xfer\_stall}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01248}01248 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01249}01249         \mbox{\hyperlink{uss820dci_8c_a58c989352bde3ee6a94c65b754b2748a}{uss820dci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a83258c6183686c303988db96e7f5713a}{USB\_ERR\_STALLED}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01250}01250 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01251}01251 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01252}01252 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01253}\mbox{\hyperlink{uss820dci_8c_a1ce33ff39f67eae3fdf6b192c5dcde68}{01253}} \mbox{\hyperlink{uss820dci_8c_a1ce33ff39f67eae3fdf6b192c5dcde68}{uss820dci\_set\_stall}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01254}01254     \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__endpoint}{usb\_endpoint}} *ep, uint8\_t *did\_stall)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01255}01255 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01256}01256         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01257}01257         uint8\_t ep\_no;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01258}01258         uint8\_t ep\_type;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01259}01259         uint8\_t ep\_dir;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01260}01260         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01261}01261 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01262}01262         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01263}01263 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01264}01264         DPRINTFN(5, \textcolor{stringliteral}{"{}endpoint=\%p\(\backslash\)n"{}}, ep);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01265}01265 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01266}01266         \textcolor{comment}{/* set FORCESTALL */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01267}01267         sc = \mbox{\hyperlink{uss820dci_8c_acfc82510504a3887660a91aada755cb2}{USS820\_DCI\_BUS2SC}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01268}01268         ep\_no = (ep-\/>\mbox{\hyperlink{structusb__endpoint_af3b96b9fe1e612b303833c2e2d0365e1}{edesc}}-\/>\mbox{\hyperlink{structusb__endpoint__descriptor_a3d0a0ab41c53023055a242d66a437a2d}{bEndpointAddress}} \& \mbox{\hyperlink{usb_8h_a227db1f194f105a22faae81401d3e18e}{UE\_ADDR}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01269}01269         ep\_dir = (ep-\/>\mbox{\hyperlink{structusb__endpoint_af3b96b9fe1e612b303833c2e2d0365e1}{edesc}}-\/>\mbox{\hyperlink{structusb__endpoint__descriptor_a3d0a0ab41c53023055a242d66a437a2d}{bEndpointAddress}} \& (\mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}} | \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}}));}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01270}01270         ep\_type = (ep-\/>\mbox{\hyperlink{structusb__endpoint_af3b96b9fe1e612b303833c2e2d0365e1}{edesc}}-\/>\mbox{\hyperlink{structusb__endpoint__descriptor_aff28dcc97802a405b31baccd33c2bf8f}{bmAttributes}} \& \mbox{\hyperlink{usb_8h_a8badd3504359a0aed83ac575a46a67b4}{UE\_XFERTYPE}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01271}01271 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01272}01272         \textcolor{keywordflow}{if} (ep\_type == \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01273}01273                 \textcolor{comment}{/* should not happen */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01274}01274                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01275}01275         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01276}01276         \mbox{\hyperlink{usb__core_8h_abcb3565f999c2fe1f334aa41320470c7}{USB\_BUS\_SPIN\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01277}01277         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0b06ea26c439873f4f2d95f3e046399f}{USS820\_EPINDEX}}, ep\_no);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01278}01278 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01279}01279         \textcolor{keywordflow}{if} (ep\_dir == \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01280}01280                 temp = \mbox{\hyperlink{uss820dci_8h_aa0787b6781413253c862c9157f2ebe7a}{USS820\_EPCON\_TXSTL}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01281}01281         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01282}01282                 temp = \mbox{\hyperlink{uss820dci_8h_abce4c79037326a74b35b01ecb3560f68}{USS820\_EPCON\_RXSTL}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01283}01283         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01284}01284         \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_afcbdca78b9a54f715315abe91a6fc1b7}{USS820\_EPCON}}, 0xFF, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01285}01285         \mbox{\hyperlink{usb__core_8h_a8f9d74e35430e8ad2cff383f4fe26002}{USB\_BUS\_SPIN\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01286}01286 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01287}01287 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01288}01288 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01289}\mbox{\hyperlink{uss820dci_8c_a7e5fc9915735a53755cc8b8dd205008e}{01289}} \mbox{\hyperlink{uss820dci_8c_a7e5fc9915735a53755cc8b8dd205008e}{uss820dci\_clear\_stall\_sub}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01290}01290     uint8\_t ep\_no, uint8\_t ep\_type, uint8\_t ep\_dir)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01291}01291 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01292}01292         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01293}01293 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01294}01294         \textcolor{keywordflow}{if} (ep\_type == \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01295}01295                 \textcolor{comment}{/* clearing stall is not needed */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01296}01296                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01297}01297         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01298}01298         \mbox{\hyperlink{usb__core_8h_abcb3565f999c2fe1f334aa41320470c7}{USB\_BUS\_SPIN\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01299}01299 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01300}01300         \textcolor{comment}{/* select endpoint index */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01301}01301         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0b06ea26c439873f4f2d95f3e046399f}{USS820\_EPINDEX}}, ep\_no);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01302}01302 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01303}01303         \textcolor{comment}{/* clear stall and disable I/O transfers */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01304}01304         \textcolor{keywordflow}{if} (ep\_dir == \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01305}01305                 temp = 0xFF \string^ (\mbox{\hyperlink{uss820dci_8h_a8826728dbe05268e3ad5d04468766809}{USS820\_EPCON\_TXOE}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01306}01306                     \mbox{\hyperlink{uss820dci_8h_aa0787b6781413253c862c9157f2ebe7a}{USS820\_EPCON\_TXSTL}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01307}01307         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01308}01308                 temp = 0xFF \string^ (\mbox{\hyperlink{uss820dci_8h_afb875b8490295e8f2b64d2a3daeb5932}{USS820\_EPCON\_RXIE}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01309}01309                     \mbox{\hyperlink{uss820dci_8h_abce4c79037326a74b35b01ecb3560f68}{USS820\_EPCON\_RXSTL}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01310}01310         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01311}01311         \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_afcbdca78b9a54f715315abe91a6fc1b7}{USS820\_EPCON}}, temp, 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01312}01312 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01313}01313         \textcolor{keywordflow}{if} (ep\_dir == \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01314}01314                 \textcolor{comment}{/* reset data toggle */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01315}01315                 \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_ac0ffb786dfcf5ee1c85a068671d8ded2}{USS820\_TXSTAT}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01316}01316                     \mbox{\hyperlink{uss820dci_8h_aaf3387a731122722f1bf2345b88c37a5}{USS820\_TXSTAT\_TXSOVW}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01317}01317 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01318}01318                 \textcolor{comment}{/* reset FIFO */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01319}01319                 temp = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_aea00116cf82edca0ca3f50ada53f677b}{USS820\_TXCON}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01320}01320                 temp |= \mbox{\hyperlink{uss820dci_8h_af951f2b485d7e3ef565d1a1bfda90bcd}{USS820\_TXCON\_TXCLR}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01321}01321                 \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_aea00116cf82edca0ca3f50ada53f677b}{USS820\_TXCON}}, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01322}01322                 temp \&= \string~USS820\_TXCON\_TXCLR;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01323}01323                 \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_aea00116cf82edca0ca3f50ada53f677b}{USS820\_TXCON}}, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01324}01324         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01325}01325                 \textcolor{comment}{/* reset data toggle */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01326}01326                 \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a65fe8a6e994a38f50f62121c92a29f9d}{USS820\_RXSTAT}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01327}01327                     0, \mbox{\hyperlink{uss820dci_8h_a01f35b8f604f84fb9cfab50d843e8505}{USS820\_RXSTAT\_RXSOVW}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01328}01328 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01329}01329                 \textcolor{comment}{/* reset FIFO */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01330}01330                 temp = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a6f9047c452e8a1f2eaa492cc45028451}{USS820\_RXCON}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01331}01331                 temp |= \mbox{\hyperlink{uss820dci_8h_a7c74abbc122adf3186f6ea6277c94f67}{USS820\_RXCON\_RXCLR}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01332}01332                 temp \&= \string~USS820\_RXCON\_RXFFRC;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01333}01333                 \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a6f9047c452e8a1f2eaa492cc45028451}{USS820\_RXCON}}, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01334}01334                 temp \&= \string~USS820\_RXCON\_RXCLR;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01335}01335                 \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a6f9047c452e8a1f2eaa492cc45028451}{USS820\_RXCON}}, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01336}01336         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01337}01337         \mbox{\hyperlink{usb__core_8h_a8f9d74e35430e8ad2cff383f4fe26002}{USB\_BUS\_SPIN\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01338}01338 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01339}01339 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01340}01340 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01341}\mbox{\hyperlink{uss820dci_8c_a04d79712c20e63015a5c6d3f56173262}{01341}} \mbox{\hyperlink{uss820dci_8c_a04d79712c20e63015a5c6d3f56173262}{uss820dci\_clear\_stall}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__endpoint}{usb\_endpoint}} *ep)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01342}01342 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01343}01343         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01344}01344         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__endpoint__descriptor}{usb\_endpoint\_descriptor}} *ed;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01345}01345 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01346}01346         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01347}01347 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01348}01348         DPRINTFN(5, \textcolor{stringliteral}{"{}endpoint=\%p\(\backslash\)n"{}}, ep);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01349}01349 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01350}01350         \textcolor{comment}{/* check mode */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01351}01351         \textcolor{keywordflow}{if} (udev-\/>\mbox{\hyperlink{structusb__device_ae7b27fdcae02d49bee5c2f0a9130b633}{flags}}.\mbox{\hyperlink{structusb__device__flags_ad686103f845c7d070e25fa7a26c34694}{usb\_mode}} != \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806bada6c05f1ad342e782a92990170fca2cc}{USB\_MODE\_DEVICE}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01352}01352                 \textcolor{comment}{/* not supported */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01353}01353                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01354}01354         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01355}01355         \textcolor{comment}{/* get softc */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01356}01356         sc = \mbox{\hyperlink{uss820dci_8c_acfc82510504a3887660a91aada755cb2}{USS820\_DCI\_BUS2SC}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01357}01357 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01358}01358         \textcolor{comment}{/* get endpoint descriptor */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01359}01359         ed = ep-\/>\mbox{\hyperlink{structusb__endpoint_af3b96b9fe1e612b303833c2e2d0365e1}{edesc}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01360}01360 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01361}01361         \textcolor{comment}{/* reset endpoint */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01362}01362         \mbox{\hyperlink{uss820dci_8c_a7e5fc9915735a53755cc8b8dd205008e}{uss820dci\_clear\_stall\_sub}}(sc,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01363}01363             (ed-\/>\mbox{\hyperlink{structusb__endpoint__descriptor_a3d0a0ab41c53023055a242d66a437a2d}{bEndpointAddress}} \& \mbox{\hyperlink{usb_8h_a227db1f194f105a22faae81401d3e18e}{UE\_ADDR}}),}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01364}01364             (ed-\/>\mbox{\hyperlink{structusb__endpoint__descriptor_aff28dcc97802a405b31baccd33c2bf8f}{bmAttributes}} \& \mbox{\hyperlink{usb_8h_a8badd3504359a0aed83ac575a46a67b4}{UE\_XFERTYPE}}),}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01365}01365             (ed-\/>\mbox{\hyperlink{structusb__endpoint__descriptor_a3d0a0ab41c53023055a242d66a437a2d}{bEndpointAddress}} \& (\mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}} | \mbox{\hyperlink{usb_8h_a9a98e1bc9388db2ab5213e9d6496e851}{UE\_DIR\_OUT}})));}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01366}01366 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01367}01367 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01368}01368 \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01369}\mbox{\hyperlink{uss820dci_8c_a98197c2581e608dfd6db912812650fd6}{01369}} \mbox{\hyperlink{uss820dci_8c_a98197c2581e608dfd6db912812650fd6}{uss820dci\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01370}01370 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01371}01371         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__hw__ep__profile}{usb\_hw\_ep\_profile}} *pf;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01372}01372         uint8\_t \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01373}01373         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01374}01374 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01375}01375         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}start\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01376}01376 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01377}01377         \textcolor{comment}{/* set up the bus structure */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01378}01378         sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a333d9234cb56ddeb93ac0625c3d48252}{usbrev}} = \mbox{\hyperlink{usb_8h_ad11f3f35a7768f59a4f69ad460a7661fae19468be699e848d31901be7456388e0}{USB\_REV\_1\_1}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01379}01379         sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a81450db76aab5d75bdc5a8a67b2d0939}{methods}} = \&\mbox{\hyperlink{uss820dci_8c_a3fb35df1ab4f9aac9fac32c83b7f7495}{uss820dci\_bus\_methods}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01380}01380 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01381}01381         \mbox{\hyperlink{usb__core_8h_a21dab1de8f52baf9fbf7617c6b1ec033}{USB\_BUS\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01382}01382 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01383}01383         \textcolor{comment}{/* we always have VBUS */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01384}01384         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a5aa01e0a8c2e2e6d767ec042f02257f8}{status\_vbus}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01385}01385 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01386}01386         \textcolor{comment}{/* reset the chip */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01387}01387         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0787d7f00483e5c50657fdcc3dfb8b0c}{USS820\_SCR}}, \mbox{\hyperlink{uss820dci_8h_ae22decd28f232f7dc604411e9031c904}{USS820\_SCR\_SRESET}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01388}01388         DELAY(100);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01389}01389         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0787d7f00483e5c50657fdcc3dfb8b0c}{USS820\_SCR}}, 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01390}01390 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01391}01391         \textcolor{comment}{/* wait for reset to complete */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01392}01392         \textcolor{keywordflow}{for} (\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} = 0;; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}++) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01393}01393                 temp = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_ab8ac313ab08ef664cae153d150fd3cad}{USS820\_MCSR}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01394}01394 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01395}01395                 \textcolor{keywordflow}{if} (temp \& \mbox{\hyperlink{uss820dci_8h_a3e1f0ccc865e0ef38307e378d4b89548}{USS820\_MCSR\_INIT}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01396}01396                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01397}01397                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01398}01398                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} == 100) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01399}01399                         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01400}01400                         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945ac568d752239d287fca75588222df1bdf}{USB\_ERR\_INVAL}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01401}01401                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01402}01402                 \textcolor{comment}{/* wait a little for things to stabilise */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01403}01403                 DELAY(100);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01404}01404         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01405}01405 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01406}01406         \textcolor{comment}{/* do a pulldown */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01407}01407         \mbox{\hyperlink{uss820dci_8c_a75c73e9a93f46f8163f4293e0fd228b5}{uss820dci\_pull\_down}}(sc);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01408}01408 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01409}01409         \textcolor{comment}{/* wait 10ms for pulldown to stabilise */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01410}01410         \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a7355d01a9b05ad01972eccabe5747edf}{bus\_mtx}}, hz / 100);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01411}01411 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01412}01412         \textcolor{comment}{/* check hardware revision */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01413}01413         temp = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_ab6961d27ea418033dd8e801fa749c04c}{USS820\_REV}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01414}01414 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01415}01415         \textcolor{keywordflow}{if} (temp < 0x13) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01416}01416                 \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01417}01417                 \textcolor{keywordflow}{return} (\mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945ac568d752239d287fca75588222df1bdf}{USB\_ERR\_INVAL}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01418}01418         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01419}01419         \textcolor{comment}{/* enable interrupts */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01420}01420         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0787d7f00483e5c50657fdcc3dfb8b0c}{USS820\_SCR}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01421}01421             \mbox{\hyperlink{uss820dci_8h_a5a286ffbf1f12a505a7472d3a2f6824c}{USS820\_SCR\_T\_IRQ}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01422}01422             \mbox{\hyperlink{uss820dci_8h_ab842f6c2c729dfb3d056c981392875cf}{USS820\_SCR\_IE\_RESET}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01423}01423         \textcolor{comment}{/* USS820\_SCR\_RWUPE | */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01424}01424             \mbox{\hyperlink{uss820dci_8h_a1ba47807c77a3ba97fd165242526dc4e}{USS820\_SCR\_IE\_SUSP}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01425}01425             \mbox{\hyperlink{uss820dci_8h_a08aa5387332fd2ba2efa51d9a910b512}{USS820\_SCR\_IRQPOL}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01426}01426 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01427}01427         \textcolor{comment}{/* enable interrupts */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01428}01428         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a20598d9de36dde28cd01cb43d4b7c039}{USS820\_SCRATCH}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01429}01429             \mbox{\hyperlink{uss820dci_8h_a5b49d8350b51abbcd184c9f44e10d5e4}{USS820\_SCRATCH\_IE\_RESUME}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01430}01430 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01431}01431         \textcolor{comment}{/* enable features */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01432}01432         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_ab8ac313ab08ef664cae153d150fd3cad}{USS820\_MCSR}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01433}01433             \mbox{\hyperlink{uss820dci_8h_a75cb25bda0e5d90fe848321aaf71c2da}{USS820\_MCSR\_BDFEAT}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01434}01434             \mbox{\hyperlink{uss820dci_8h_a71f5de68aa98d393611389c77325d07a}{USS820\_MCSR\_FEAT}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01435}01435 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01436}01436         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a7acae99ac1d59d5a14d7ed368439d755}{mcsr\_feat}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01437}01437 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01438}01438         \textcolor{comment}{/* disable interrupts */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01439}01439         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_aff6f5747d2d16aa520a2a90d80c088ce}{USS820\_SBIE}}, 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01440}01440 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01441}01441         \textcolor{comment}{/* disable interrupts */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01442}01442         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a9b1745700a940bcb85659af80b19a2ac}{USS820\_SBIE1}}, 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01443}01443 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01444}01444         \textcolor{comment}{/* disable all endpoints */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01445}01445         \textcolor{keywordflow}{for} (\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} = 0; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} != \mbox{\hyperlink{uss820dci_8h_a6c1e81553bbea3460c395ee711eddbd3}{USS820\_EP\_MAX}}; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}++) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01446}01446                 \textcolor{comment}{/* select endpoint */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01447}01447                 \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0b06ea26c439873f4f2d95f3e046399f}{USS820\_EPINDEX}}, \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01448}01448 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01449}01449                 \textcolor{comment}{/* disable endpoint */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01450}01450                 \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_afcbdca78b9a54f715315abe91a6fc1b7}{USS820\_EPCON}}, 0, 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01451}01451         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01452}01452 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01453}01453         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01454}01454 \textcolor{comment}{         * Initialise default values for some registers that cannot be}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01455}01455 \textcolor{comment}{         * changed during operation!}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01456}01456 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01457}01457         \textcolor{keywordflow}{for} (\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} = 0; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} != \mbox{\hyperlink{uss820dci_8h_a6c1e81553bbea3460c395ee711eddbd3}{USS820\_EP\_MAX}}; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}++) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01458}01458                 \mbox{\hyperlink{uss820dci_8c_a9f50bc4724098fbbeea76e12b1be95ae}{uss820dci\_get\_hw\_ep\_profile}}(NULL, \&pf, \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01459}01459 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01460}01460                 \textcolor{comment}{/* the maximum frame sizes should be the same */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01461}01461                 \textcolor{keywordflow}{if} (pf-\/>max\_in\_frame\_size != pf-\/>max\_out\_frame\_size) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01462}01462                         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}Max frame size mismatch \%u != \%u\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01463}01463                             pf-\/>max\_in\_frame\_size, pf-\/>max\_out\_frame\_size);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01464}01464                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01465}01465                 \textcolor{keywordflow}{if} (pf-\/>support\_isochronous) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01466}01466                         \textcolor{keywordflow}{if} (pf-\/>max\_in\_frame\_size <= 64) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01467}01467                                 temp = (\mbox{\hyperlink{uss820dci_8h_a33946567d9a7675c22d7c6437edf86dc}{USS820\_TXCON\_FFSZ\_16\_64}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01468}01468                                     \mbox{\hyperlink{uss820dci_8h_a3ce8fb61213e99300dc50b93ad98ff79}{USS820\_TXCON\_TXISO}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01469}01469                                     \mbox{\hyperlink{uss820dci_8h_a307a62dbcb16a230739273a4f4974eca}{USS820\_TXCON\_ATM}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01470}01470                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (pf-\/>max\_in\_frame\_size <= 256) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01471}01471                                 temp = (\mbox{\hyperlink{uss820dci_8h_ae631160993c9347cd7216bad456ae49e}{USS820\_TXCON\_FFSZ\_64\_256}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01472}01472                                     \mbox{\hyperlink{uss820dci_8h_a3ce8fb61213e99300dc50b93ad98ff79}{USS820\_TXCON\_TXISO}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01473}01473                                     \mbox{\hyperlink{uss820dci_8h_a307a62dbcb16a230739273a4f4974eca}{USS820\_TXCON\_ATM}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01474}01474                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (pf-\/>max\_in\_frame\_size <= 512) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01475}01475                                 temp = (\mbox{\hyperlink{uss820dci_8h_a341106f6d353f0e7d5dadddee8b42f21}{USS820\_TXCON\_FFSZ\_8\_512}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01476}01476                                     \mbox{\hyperlink{uss820dci_8h_a3ce8fb61213e99300dc50b93ad98ff79}{USS820\_TXCON\_TXISO}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01477}01477                                     \mbox{\hyperlink{uss820dci_8h_a307a62dbcb16a230739273a4f4974eca}{USS820\_TXCON\_ATM}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01478}01478                         \} \textcolor{keywordflow}{else} \{        \textcolor{comment}{/* 1024 bytes */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01479}01479                                 temp = (\mbox{\hyperlink{uss820dci_8h_a96b4db8c4ae4f7e6b5b3b85d3b1cf30c}{USS820\_TXCON\_FFSZ\_32\_1024}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01480}01480                                     \mbox{\hyperlink{uss820dci_8h_a3ce8fb61213e99300dc50b93ad98ff79}{USS820\_TXCON\_TXISO}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01481}01481                                     \mbox{\hyperlink{uss820dci_8h_a307a62dbcb16a230739273a4f4974eca}{USS820\_TXCON\_ATM}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01482}01482                         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01483}01483                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01484}01484                         \textcolor{keywordflow}{if} ((pf-\/>max\_in\_frame\_size <= 8) \&\&}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01485}01485                             (sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a7acae99ac1d59d5a14d7ed368439d755}{mcsr\_feat}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01486}01486                                 temp = (\mbox{\hyperlink{uss820dci_8h_a341106f6d353f0e7d5dadddee8b42f21}{USS820\_TXCON\_FFSZ\_8\_512}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01487}01487                                     \mbox{\hyperlink{uss820dci_8h_a307a62dbcb16a230739273a4f4974eca}{USS820\_TXCON\_ATM}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01488}01488                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (pf-\/>max\_in\_frame\_size <= 16) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01489}01489                                 temp = (\mbox{\hyperlink{uss820dci_8h_a33946567d9a7675c22d7c6437edf86dc}{USS820\_TXCON\_FFSZ\_16\_64}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01490}01490                                     \mbox{\hyperlink{uss820dci_8h_a307a62dbcb16a230739273a4f4974eca}{USS820\_TXCON\_ATM}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01491}01491                         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} ((pf-\/>max\_in\_frame\_size <= 32) \&\&}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01492}01492                             (sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a7acae99ac1d59d5a14d7ed368439d755}{mcsr\_feat}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01493}01493                                 temp = (\mbox{\hyperlink{uss820dci_8h_a96b4db8c4ae4f7e6b5b3b85d3b1cf30c}{USS820\_TXCON\_FFSZ\_32\_1024}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01494}01494                                     \mbox{\hyperlink{uss820dci_8h_a307a62dbcb16a230739273a4f4974eca}{USS820\_TXCON\_ATM}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01495}01495                         \} \textcolor{keywordflow}{else} \{        \textcolor{comment}{/* 64 bytes */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01496}01496                                 temp = (\mbox{\hyperlink{uss820dci_8h_ae631160993c9347cd7216bad456ae49e}{USS820\_TXCON\_FFSZ\_64\_256}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01497}01497                                     \mbox{\hyperlink{uss820dci_8h_a307a62dbcb16a230739273a4f4974eca}{USS820\_TXCON\_ATM}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01498}01498                         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01499}01499                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01500}01500 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01501}01501                 \textcolor{comment}{/* need to configure the chip early */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01502}01502 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01503}01503                 \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0b06ea26c439873f4f2d95f3e046399f}{USS820\_EPINDEX}}, \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01504}01504                 \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_aea00116cf82edca0ca3f50ada53f677b}{USS820\_TXCON}}, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01505}01505                 \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a6f9047c452e8a1f2eaa492cc45028451}{USS820\_RXCON}}, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01506}01506 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01507}01507                 \textcolor{keywordflow}{if} (pf-\/>support\_control) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01508}01508                         temp = \mbox{\hyperlink{uss820dci_8h_acbde3a80a7a369f762fe156e3c50f595}{USS820\_EPCON\_CTLEP}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01509}01509                             \mbox{\hyperlink{uss820dci_8h_abefcbe39adcd9899bcd18d94cd88b237}{USS820\_EPCON\_RXSPM}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01510}01510                             \mbox{\hyperlink{uss820dci_8h_afb875b8490295e8f2b64d2a3daeb5932}{USS820\_EPCON\_RXIE}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01511}01511                             \mbox{\hyperlink{uss820dci_8h_abe224007d87f87d4609670953a74ec32}{USS820\_EPCON\_RXEPEN}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01512}01512                             \mbox{\hyperlink{uss820dci_8h_a8826728dbe05268e3ad5d04468766809}{USS820\_EPCON\_TXOE}} |}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01513}01513                             \mbox{\hyperlink{uss820dci_8h_a6b39dd3f9ce2588ae238d41eca1253cb}{USS820\_EPCON\_TXEPEN}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01514}01514                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01515}01515                         temp = \mbox{\hyperlink{uss820dci_8h_abe224007d87f87d4609670953a74ec32}{USS820\_EPCON\_RXEPEN}} | \mbox{\hyperlink{uss820dci_8h_a6b39dd3f9ce2588ae238d41eca1253cb}{USS820\_EPCON\_TXEPEN}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01516}01516                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01517}01517 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01518}01518                 \mbox{\hyperlink{uss820dci_8c_a9a05d5aed1fee331da7462ae4dfd3e04}{uss820dci\_update\_shared\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_afcbdca78b9a54f715315abe91a6fc1b7}{USS820\_EPCON}}, 0, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01519}01519         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01520}01520 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01521}01521         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01522}01522 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01523}01523         \textcolor{comment}{/* catch any lost interrupts */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01524}01524 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01525}01525         \mbox{\hyperlink{uss820dci_8c_a39044d009b14f90f9ecb222a550d6069}{uss820dci\_do\_poll}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01526}01526 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01527}01527         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01528}01528 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01529}01529 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01530}01530 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01531}\mbox{\hyperlink{uss820dci_8c_a8d10d418d39e65504468b08bb3a9c554}{01531}} \mbox{\hyperlink{uss820dci_8c_a8d10d418d39e65504468b08bb3a9c554}{uss820dci\_uninit}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01532}01532 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01533}01533         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01534}01534 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01535}01535         \mbox{\hyperlink{usb__core_8h_a21dab1de8f52baf9fbf7617c6b1ec033}{USB\_BUS\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01536}01536 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01537}01537         \textcolor{comment}{/* disable all interrupts */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01538}01538         temp = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0787d7f00483e5c50657fdcc3dfb8b0c}{USS820\_SCR}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01539}01539         temp \&= \string~USS820\_SCR\_T\_IRQ;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01540}01540         \mbox{\hyperlink{uss820dci_8h_ac533323db41de708e03441671f490dce}{USS820\_WRITE\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a0787d7f00483e5c50657fdcc3dfb8b0c}{USS820\_SCR}}, temp);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01541}01541 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01542}01542         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a627795cb3a352b3023c9360686d9eb6b}{port\_powered}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01543}01543         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a5aa01e0a8c2e2e6d767ec042f02257f8}{status\_vbus}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01544}01544         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a46cc6d5d03a942cf0a909c29224c0269}{status\_bus\_reset}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01545}01545         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_abac956aef830fc8d8c3d0aebb83be4a9}{status\_suspend}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01546}01546         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_ab13374a188ee78ccc573808db1d721d2}{change\_suspend}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01547}01547         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a42040e7846ee6876bc61984313874e07}{change\_connect}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01548}01548 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01549}01549         \mbox{\hyperlink{uss820dci_8c_a75c73e9a93f46f8163f4293e0fd228b5}{uss820dci\_pull\_down}}(sc);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01550}01550         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01551}01551 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01552}01552 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01553}01553 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01554}\mbox{\hyperlink{uss820dci_8c_a19505ed252272a9cdc782263cacdc395}{01554}} \mbox{\hyperlink{uss820dci_8c_a19505ed252272a9cdc782263cacdc395}{uss820dci\_suspend}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01555}01555 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01556}01556         \textcolor{comment}{/* TODO */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01557}01557 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01558}01558 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01559}01559 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01560}\mbox{\hyperlink{uss820dci_8c_aa1cd4453cdbb27571563ee708437f564}{01560}} \mbox{\hyperlink{uss820dci_8c_aa1cd4453cdbb27571563ee708437f564}{uss820dci\_resume}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01561}01561 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01562}01562         \textcolor{comment}{/* TODO */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01563}01563 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01564}01564 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01565}01565 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01566}\mbox{\hyperlink{uss820dci_8c_a39044d009b14f90f9ecb222a550d6069}{01566}} \mbox{\hyperlink{uss820dci_8c_a39044d009b14f90f9ecb222a550d6069}{uss820dci\_do\_poll}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__bus}{usb\_bus}} *bus)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01567}01567 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01568}01568         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc = \mbox{\hyperlink{uss820dci_8c_acfc82510504a3887660a91aada755cb2}{USS820\_DCI\_BUS2SC}}(bus);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01569}01569 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01570}01570         \mbox{\hyperlink{usb__core_8h_a21dab1de8f52baf9fbf7617c6b1ec033}{USB\_BUS\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01571}01571         \mbox{\hyperlink{usb__core_8h_abcb3565f999c2fe1f334aa41320470c7}{USB\_BUS\_SPIN\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01572}01572         \mbox{\hyperlink{uss820dci_8c_abf262944870628a3ee66680084b98fa6}{uss820dci\_interrupt\_poll\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01573}01573         \mbox{\hyperlink{uss820dci_8c_a73f91fbfc5af133e7d4f13e14e360d3b}{uss820dci\_interrupt\_complete\_locked}}(sc);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01574}01574         \mbox{\hyperlink{usb__core_8h_a8f9d74e35430e8ad2cff383f4fe26002}{USB\_BUS\_SPIN\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01575}01575         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01576}01576 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01577}01577 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01578}01578 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01579}01579 \textcolor{comment}{ * uss820dci bulk support}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01580}01580 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01581}01581 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01582}\mbox{\hyperlink{uss820dci_8c_a1c78c6cca0fbb7122ffd31d583c6e4b5}{01582}} \mbox{\hyperlink{uss820dci_8c_a1c78c6cca0fbb7122ffd31d583c6e4b5}{uss820dci\_device\_bulk\_open}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01583}01583 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01584}01584         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01585}01585 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01586}01586 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01587}01587 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01588}\mbox{\hyperlink{uss820dci_8c_aa99b58ef44ba759177dd02e211db62dc}{01588}} \mbox{\hyperlink{uss820dci_8c_aa99b58ef44ba759177dd02e211db62dc}{uss820dci\_device\_bulk\_close}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01589}01589 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01590}01590         \mbox{\hyperlink{uss820dci_8c_a58c989352bde3ee6a94c65b754b2748a}{uss820dci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01591}01591 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01592}01592 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01593}01593 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01594}\mbox{\hyperlink{uss820dci_8c_a5c39b774ed70e5122cc5bf79d3e270bf}{01594}} \mbox{\hyperlink{uss820dci_8c_a5c39b774ed70e5122cc5bf79d3e270bf}{uss820dci\_device\_bulk\_enter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01595}01595 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01596}01596         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01597}01597 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01598}01598 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01599}01599 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01600}\mbox{\hyperlink{uss820dci_8c_a57372ef472c46c9b38e7dfd9e8965163}{01600}} \mbox{\hyperlink{uss820dci_8c_a57372ef472c46c9b38e7dfd9e8965163}{uss820dci\_device\_bulk\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01601}01601 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01602}01602         \textcolor{comment}{/* setup TDs */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01603}01603         \mbox{\hyperlink{uss820dci_8c_aca6b2ca4730cfce621d94c894c434eeb}{uss820dci\_setup\_standard\_chain}}(xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01604}01604         \mbox{\hyperlink{uss820dci_8c_a6199bb6f5c2c4526db43a08e32888942}{uss820dci\_start\_standard\_chain}}(xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01605}01605 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01606}01606 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01607}01607 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{uss820dci_8c_a3e974242be8c2c5be0a83c7801c77412}{uss820dci\_device\_bulk\_methods}} =}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01608}01608 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01609}01609         .\mbox{\hyperlink{structusb__pipe__methods_a9745134b3e58cdaff56836b57ac15d52}{open}} = \mbox{\hyperlink{uss820dci_8c_a1c78c6cca0fbb7122ffd31d583c6e4b5}{uss820dci\_device\_bulk\_open}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01610}01610         .close = \mbox{\hyperlink{uss820dci_8c_aa99b58ef44ba759177dd02e211db62dc}{uss820dci\_device\_bulk\_close}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01611}01611         .enter = \mbox{\hyperlink{uss820dci_8c_a5c39b774ed70e5122cc5bf79d3e270bf}{uss820dci\_device\_bulk\_enter}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01612}01612         .start = \mbox{\hyperlink{uss820dci_8c_a57372ef472c46c9b38e7dfd9e8965163}{uss820dci\_device\_bulk\_start}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01613}01613 \};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01614}01614 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01615}01615 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01616}01616 \textcolor{comment}{ * uss820dci control support}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01617}01617 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01618}01618 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01619}\mbox{\hyperlink{uss820dci_8c_aad6101bad4216a75b48f9f17934e62e1}{01619}} \mbox{\hyperlink{uss820dci_8c_aad6101bad4216a75b48f9f17934e62e1}{uss820dci\_device\_ctrl\_open}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01620}01620 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01621}01621         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01622}01622 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01623}01623 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01624}01624 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01625}\mbox{\hyperlink{uss820dci_8c_a9b7985c704a8db8e860386f4a6796c86}{01625}} \mbox{\hyperlink{uss820dci_8c_a9b7985c704a8db8e860386f4a6796c86}{uss820dci\_device\_ctrl\_close}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01626}01626 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01627}01627         \mbox{\hyperlink{uss820dci_8c_a58c989352bde3ee6a94c65b754b2748a}{uss820dci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01628}01628 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01629}01629 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01630}01630 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01631}\mbox{\hyperlink{uss820dci_8c_a850683ad2cb5840b72a204427e6ee25f}{01631}} \mbox{\hyperlink{uss820dci_8c_a850683ad2cb5840b72a204427e6ee25f}{uss820dci\_device\_ctrl\_enter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01632}01632 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01633}01633         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01634}01634 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01635}01635 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01636}01636 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01637}\mbox{\hyperlink{uss820dci_8c_a47396470aed9a367516bd90613ddc889}{01637}} \mbox{\hyperlink{uss820dci_8c_a47396470aed9a367516bd90613ddc889}{uss820dci\_device\_ctrl\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01638}01638 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01639}01639         \textcolor{comment}{/* setup TDs */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01640}01640         \mbox{\hyperlink{uss820dci_8c_aca6b2ca4730cfce621d94c894c434eeb}{uss820dci\_setup\_standard\_chain}}(xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01641}01641         \mbox{\hyperlink{uss820dci_8c_a6199bb6f5c2c4526db43a08e32888942}{uss820dci\_start\_standard\_chain}}(xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01642}01642 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01643}01643 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01644}01644 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{uss820dci_8c_a2db8b78c176b87be68f8fb89d01b4a7c}{uss820dci\_device\_ctrl\_methods}} =}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01645}01645 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01646}01646         .\mbox{\hyperlink{structusb__pipe__methods_a9745134b3e58cdaff56836b57ac15d52}{open}} = \mbox{\hyperlink{uss820dci_8c_aad6101bad4216a75b48f9f17934e62e1}{uss820dci\_device\_ctrl\_open}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01647}01647         .close = \mbox{\hyperlink{uss820dci_8c_a9b7985c704a8db8e860386f4a6796c86}{uss820dci\_device\_ctrl\_close}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01648}01648         .enter = \mbox{\hyperlink{uss820dci_8c_a850683ad2cb5840b72a204427e6ee25f}{uss820dci\_device\_ctrl\_enter}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01649}01649         .start = \mbox{\hyperlink{uss820dci_8c_a47396470aed9a367516bd90613ddc889}{uss820dci\_device\_ctrl\_start}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01650}01650 \};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01651}01651 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01652}01652 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01653}01653 \textcolor{comment}{ * uss820dci interrupt support}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01654}01654 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01655}01655 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01656}\mbox{\hyperlink{uss820dci_8c_a099c33b0634947107b2f330c6be1d674}{01656}} \mbox{\hyperlink{uss820dci_8c_a099c33b0634947107b2f330c6be1d674}{uss820dci\_device\_intr\_open}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01657}01657 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01658}01658         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01659}01659 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01660}01660 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01661}01661 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01662}\mbox{\hyperlink{uss820dci_8c_aad24a388b10b7ca78499f762571a5ea9}{01662}} \mbox{\hyperlink{uss820dci_8c_aad24a388b10b7ca78499f762571a5ea9}{uss820dci\_device\_intr\_close}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01663}01663 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01664}01664         \mbox{\hyperlink{uss820dci_8c_a58c989352bde3ee6a94c65b754b2748a}{uss820dci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01665}01665 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01666}01666 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01667}01667 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01668}\mbox{\hyperlink{uss820dci_8c_a8dded9923af65349bf7f4613be8493ef}{01668}} \mbox{\hyperlink{uss820dci_8c_a8dded9923af65349bf7f4613be8493ef}{uss820dci\_device\_intr\_enter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01669}01669 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01670}01670         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01671}01671 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01672}01672 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01673}01673 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01674}\mbox{\hyperlink{uss820dci_8c_a9b37b8cbadb33b54bb6093987ed5a57d}{01674}} \mbox{\hyperlink{uss820dci_8c_a9b37b8cbadb33b54bb6093987ed5a57d}{uss820dci\_device\_intr\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01675}01675 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01676}01676         \textcolor{comment}{/* setup TDs */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01677}01677         \mbox{\hyperlink{uss820dci_8c_aca6b2ca4730cfce621d94c894c434eeb}{uss820dci\_setup\_standard\_chain}}(xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01678}01678         \mbox{\hyperlink{uss820dci_8c_a6199bb6f5c2c4526db43a08e32888942}{uss820dci\_start\_standard\_chain}}(xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01679}01679 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01680}01680 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01681}01681 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{uss820dci_8c_a85070bd6b9239094b8f8f6e6ef90c205}{uss820dci\_device\_intr\_methods}} =}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01682}01682 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01683}01683         .\mbox{\hyperlink{structusb__pipe__methods_a9745134b3e58cdaff56836b57ac15d52}{open}} = \mbox{\hyperlink{uss820dci_8c_a099c33b0634947107b2f330c6be1d674}{uss820dci\_device\_intr\_open}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01684}01684         .close = \mbox{\hyperlink{uss820dci_8c_aad24a388b10b7ca78499f762571a5ea9}{uss820dci\_device\_intr\_close}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01685}01685         .enter = \mbox{\hyperlink{uss820dci_8c_a8dded9923af65349bf7f4613be8493ef}{uss820dci\_device\_intr\_enter}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01686}01686         .start = \mbox{\hyperlink{uss820dci_8c_a9b37b8cbadb33b54bb6093987ed5a57d}{uss820dci\_device\_intr\_start}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01687}01687 \};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01688}01688 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01689}01689 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01690}01690 \textcolor{comment}{ * uss820dci full speed isochronous support}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01691}01691 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01692}01692 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01693}\mbox{\hyperlink{uss820dci_8c_a36f885edb013e3cda4e4efa8606d6b96}{01693}} \mbox{\hyperlink{uss820dci_8c_a36f885edb013e3cda4e4efa8606d6b96}{uss820dci\_device\_isoc\_fs\_open}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01694}01694 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01695}01695         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01696}01696 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01697}01697 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01698}01698 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01699}\mbox{\hyperlink{uss820dci_8c_a7aeb4979e97f6216e619cb3498a46850}{01699}} \mbox{\hyperlink{uss820dci_8c_a7aeb4979e97f6216e619cb3498a46850}{uss820dci\_device\_isoc\_fs\_close}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01700}01700 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01701}01701         \mbox{\hyperlink{uss820dci_8c_a58c989352bde3ee6a94c65b754b2748a}{uss820dci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01702}01702 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01703}01703 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01704}01704 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01705}\mbox{\hyperlink{uss820dci_8c_ad08ad4af13e0892cfc3028c72e4040e2}{01705}} \mbox{\hyperlink{uss820dci_8c_ad08ad4af13e0892cfc3028c72e4040e2}{uss820dci\_device\_isoc\_fs\_enter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01706}01706 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01707}01707         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc = \mbox{\hyperlink{uss820dci_8c_acfc82510504a3887660a91aada755cb2}{USS820\_DCI\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01708}01708         uint32\_t nframes;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01709}01709 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01710}01710         DPRINTFN(6, \textcolor{stringliteral}{"{}xfer=\%p next=\%d nframes=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01711}01711             xfer, xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_a6a4a923c46e82cd1298d7832e169d7d1}{isoc\_next}}, xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01712}01712 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01713}01713         \textcolor{comment}{/* get the current frame index -\/ we don't need the high bits */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01714}01714 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01715}01715         nframes = \mbox{\hyperlink{uss820dci_8h_ad2f0892cb104886e17040331611f3fa6}{USS820\_READ\_1}}(sc, \mbox{\hyperlink{uss820dci_8h_a10760248837d09005fc3a40547b88ba1}{USS820\_SOFL}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01716}01716 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01717}01717         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__transfer_8c_ac7c1dd004c5c80fdda721a68ad16504d}{usbd\_xfer\_get\_isochronous\_start\_frame}}(}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01718}01718             xfer, nframes, 0, 1, \mbox{\hyperlink{uss820dci_8h_a7ae7a67f058a0c5064c43ba71be8587c}{USS820\_SOFL\_MASK}}, NULL))}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01719}01719                 DPRINTFN(3, \textcolor{stringliteral}{"{}start next=\%d\(\backslash\)n"{}}, xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_a6a4a923c46e82cd1298d7832e169d7d1}{isoc\_next}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01720}01720 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01721}01721         \textcolor{comment}{/* setup TDs */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01722}01722         \mbox{\hyperlink{uss820dci_8c_aca6b2ca4730cfce621d94c894c434eeb}{uss820dci\_setup\_standard\_chain}}(xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01723}01723 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01724}01724 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01725}01725 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01726}\mbox{\hyperlink{uss820dci_8c_a58e8b5ea9cff367b0fc5122bebd08441}{01726}} \mbox{\hyperlink{uss820dci_8c_a58e8b5ea9cff367b0fc5122bebd08441}{uss820dci\_device\_isoc\_fs\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01727}01727 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01728}01728         \textcolor{comment}{/* start TD chain */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01729}01729         \mbox{\hyperlink{uss820dci_8c_a6199bb6f5c2c4526db43a08e32888942}{uss820dci\_start\_standard\_chain}}(xfer);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01730}01730 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01731}01731 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01732}01732 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{uss820dci_8c_a46d92450c9eac878cd9c202be25dbcb9}{uss820dci\_device\_isoc\_fs\_methods}} =}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01733}01733 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01734}01734         .\mbox{\hyperlink{structusb__pipe__methods_a9745134b3e58cdaff56836b57ac15d52}{open}} = \mbox{\hyperlink{uss820dci_8c_a36f885edb013e3cda4e4efa8606d6b96}{uss820dci\_device\_isoc\_fs\_open}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01735}01735         .close = \mbox{\hyperlink{uss820dci_8c_a7aeb4979e97f6216e619cb3498a46850}{uss820dci\_device\_isoc\_fs\_close}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01736}01736         .enter = \mbox{\hyperlink{uss820dci_8c_ad08ad4af13e0892cfc3028c72e4040e2}{uss820dci\_device\_isoc\_fs\_enter}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01737}01737         .start = \mbox{\hyperlink{uss820dci_8c_a58e8b5ea9cff367b0fc5122bebd08441}{uss820dci\_device\_isoc\_fs\_start}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01738}01738 \};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01739}01739 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01740}01740 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01741}01741 \textcolor{comment}{ * uss820dci root control support}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01742}01742 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01743}01743 \textcolor{comment}{ * Simulate a hardware HUB by handling all the necessary requests.}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01744}01744 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01745}01745 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01746}\mbox{\hyperlink{uss820dci_8c_a2d8a778064cd24f6eec9ed6f515760d4}{01746}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__descriptor}{usb\_device\_descriptor}} \mbox{\hyperlink{uss820dci_8c_a2d8a778064cd24f6eec9ed6f515760d4}{uss820dci\_devd}} = \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01747}01747         .\mbox{\hyperlink{structusb__device__descriptor_a5123036bdc67e99a87a1f5dbf13975be}{bLength}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__descriptor}{usb\_device\_descriptor}}),}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01748}01748         .\mbox{\hyperlink{structusb__device__descriptor_a5335f6d2de0050e61da6f979d71e2f67}{bDescriptorType}} = \mbox{\hyperlink{usb_8h_a91e8696a051fcdd76cd797fa128938a2}{UDESC\_DEVICE}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01749}01749         .bcdUSB = \{0x00, 0x02\},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01750}01750         .bDeviceClass = \mbox{\hyperlink{usb_8h_a3c5e5fca25f06d3b8ddc5ec932116178}{UDCLASS\_HUB}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01751}01751         .bDeviceSubClass = \mbox{\hyperlink{usb_8h_a0ce87986a681a89bcb413e066e007785}{UDSUBCLASS\_HUB}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01752}01752         .bDeviceProtocol = \mbox{\hyperlink{usb_8h_ab80f5dc89606b21b68c1081e55c7d373}{UDPROTO\_FSHUB}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01753}01753         .bMaxPacketSize = 64,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01754}01754         .bcdDevice = \{0x00, 0x01\},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01755}01755         .iManufacturer = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01756}01756         .iProduct = 2,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01757}01757         .bNumConfigurations = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01758}01758 \};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01759}01759 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01760}\mbox{\hyperlink{uss820dci_8c_ab236b2300d80d7f67eed9e2ddcf15be4}{01760}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__qualifier}{usb\_device\_qualifier}} \mbox{\hyperlink{uss820dci_8c_ab236b2300d80d7f67eed9e2ddcf15be4}{uss820dci\_odevd}} = \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01761}01761         .\mbox{\hyperlink{structusb__device__qualifier_a6766da99aaeda4873781e16e8c5d9e26}{bLength}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__qualifier}{usb\_device\_qualifier}}),}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01762}01762         .\mbox{\hyperlink{structusb__device__qualifier_ac0b448458fb3029d87593499d5cafe01}{bDescriptorType}} = \mbox{\hyperlink{usb_8h_a5ab2dc4d80db05aea0b739d0f9f66bb1}{UDESC\_DEVICE\_QUALIFIER}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01763}01763         .bcdUSB = \{0x00, 0x02\},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01764}01764         .bDeviceClass = \mbox{\hyperlink{usb_8h_a3c5e5fca25f06d3b8ddc5ec932116178}{UDCLASS\_HUB}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01765}01765         .bDeviceSubClass = \mbox{\hyperlink{usb_8h_a0ce87986a681a89bcb413e066e007785}{UDSUBCLASS\_HUB}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01766}01766         .bDeviceProtocol = \mbox{\hyperlink{usb_8h_ab80f5dc89606b21b68c1081e55c7d373}{UDPROTO\_FSHUB}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01767}01767         .bMaxPacketSize0 = 0,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01768}01768         .bNumConfigurations = 0,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01769}01769 \};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01770}01770 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01771}\mbox{\hyperlink{uss820dci_8c_af49a9646d40a2aa2609e17a1c9c7b8d1}{01771}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__config__desc}{uss820dci\_config\_desc}} \mbox{\hyperlink{uss820dci_8c_af49a9646d40a2aa2609e17a1c9c7b8d1}{uss820dci\_confd}} = \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01772}01772         .\mbox{\hyperlink{structuss820dci__config__desc_ac5d5beb72ec6e96a627e488c2d9379e6}{confd}} = \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01773}01773                 .\mbox{\hyperlink{structusb__config__descriptor_ab93f48211c037d6431326d0d46db44b3}{bLength}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config__descriptor}{usb\_config\_descriptor}}),}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01774}01774                 .\mbox{\hyperlink{structusb__config__descriptor_a5fe7b158ddf2b2c752a0e9d5540ccb30}{bDescriptorType}} = \mbox{\hyperlink{usb_8h_a35d8259be2f4b9d3b278e889898a697a}{UDESC\_CONFIG}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01775}01775                 .wTotalLength[0] = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{uss820dci_8c_af49a9646d40a2aa2609e17a1c9c7b8d1}{uss820dci\_confd}}),}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01776}01776                 .\mbox{\hyperlink{structusb__config__descriptor_a60b87e4669815bc7e5728c897dae77fb}{bNumInterface}} = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01777}01777                 .\mbox{\hyperlink{structusb__config__descriptor_affc7816579932817c36478f630b7b7a1}{bConfigurationValue}} = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01778}01778                 .\mbox{\hyperlink{structusb__config__descriptor_af2e38326d498da74125894ea7482bed8}{iConfiguration}} = 0,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01779}01779                 .\mbox{\hyperlink{structusb__config__descriptor_a8f3926a6e43bcd315b7b2f770cdfed7e}{bmAttributes}} = \mbox{\hyperlink{usb_8h_a1a9a7ef4724e86785942f8ca612cd661}{UC\_SELF\_POWERED}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01780}01780                 .\mbox{\hyperlink{structusb__config__descriptor_aeac4fc9cf1261c3db5e17e28b48f873c}{bMaxPower}} = 0,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01781}01781         \},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01782}01782         .ifcd = \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01783}01783                 .bLength = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__interface__descriptor}{usb\_interface\_descriptor}}),}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01784}01784                 .\mbox{\hyperlink{structusb__interface__descriptor_ad4f7914ce2bc3d8830d6463a7f2989d6}{bDescriptorType}} = \mbox{\hyperlink{usb_8h_a93c15218c1fed26b097fb0b53a3ce4f7}{UDESC\_INTERFACE}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01785}01785                 .bNumEndpoints = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01786}01786                 .bInterfaceClass = \mbox{\hyperlink{usb_8h_a9087453dd0a77bb9091c9ee62a3c87cc}{UICLASS\_HUB}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01787}01787                 .bInterfaceSubClass = \mbox{\hyperlink{usb_8h_a2b2ea572877c6b2bb5d2238be6554fa0}{UISUBCLASS\_HUB}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01788}01788                 .bInterfaceProtocol = 0,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01789}01789         \},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01790}01790 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01791}01791         .endpd = \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01792}01792                 .bLength = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__endpoint__descriptor}{usb\_endpoint\_descriptor}}),}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01793}01793                 .\mbox{\hyperlink{structusb__endpoint__descriptor_a82be4599246c494022ea964cfddfb121}{bDescriptorType}} = \mbox{\hyperlink{usb_8h_a4b8e0317b094aec02ff237d9b4f7a202}{UDESC\_ENDPOINT}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01794}01794                 .bEndpointAddress = (\mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}} | \mbox{\hyperlink{uss820dci_8c_a09302e8cc92979dfdea39f633ba8da79}{USS820\_DCI\_INTR\_ENDPT}}),}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01795}01795                 .\mbox{\hyperlink{structusb__endpoint__descriptor_aff28dcc97802a405b31baccd33c2bf8f}{bmAttributes}} = \mbox{\hyperlink{usb_8h_a01e28e87ad16f6dfffefc6ccab08baed}{UE\_INTERRUPT}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01796}01796                 .\mbox{\hyperlink{structusb__endpoint__descriptor_af5ba49fb2ee7353335dc33e38d89aed5}{wMaxPacketSize}}[0] = 8,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01797}01797                 .\mbox{\hyperlink{structusb__endpoint__descriptor_a1b46a434989cbf5dd1a7637aebca9f45}{bInterval}} = 255,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01798}01798         \},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01799}01799 \};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01800}\mbox{\hyperlink{uss820dci_8c_ac65fb39fbba36a16524a7f501cd169a3}{01800}} \textcolor{preprocessor}{\#define HSETW(ptr, val) ptr = \{ (uint8\_t)(val), (uint8\_t)((val) >> 8) \}}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01801}01801 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01802}\mbox{\hyperlink{uss820dci_8c_a5e0af95414a1b2c043332df8d299660f}{01802}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__hub__descriptor__min}{usb\_hub\_descriptor\_min}} \mbox{\hyperlink{uss820dci_8c_a5e0af95414a1b2c043332df8d299660f}{uss820dci\_hubd}} = \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01803}01803         .\mbox{\hyperlink{structusb__hub__descriptor__min_a5db444dc404b953cf37504781de07fb8}{bDescLength}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{uss820dci_8c_a5e0af95414a1b2c043332df8d299660f}{uss820dci\_hubd}}),}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01804}01804         .\mbox{\hyperlink{structusb__hub__descriptor__min_aee2a1efbc9b628995a29f9f0fb4d2b42}{bDescriptorType}} = \mbox{\hyperlink{usb_8h_a61e1d91f3367e2a9928acbd3a33b1385}{UDESC\_HUB}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01805}01805         .\mbox{\hyperlink{structusb__hub__descriptor__min_a09ac3e727ad5dabdb449db4e6e44124c}{bNbrPorts}} = 1,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01806}01806         \mbox{\hyperlink{uss820dci_8c_ac65fb39fbba36a16524a7f501cd169a3}{HSETW}}(.\mbox{\hyperlink{structusb__hub__descriptor__min_a9ca8f4e23e04374a0a4a8bed2e7fd15c}{wHubCharacteristics}}, (\mbox{\hyperlink{usb_8h_ae376b1b1d3d165c2d208854983d2139d}{UHD\_PWR\_NO\_SWITCH}} | \mbox{\hyperlink{usb_8h_aac0dd7ff049f3c4d14a3da361d35ec21}{UHD\_OC\_INDIVIDUAL}})),}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01807}01807         .\mbox{\hyperlink{structusb__hub__descriptor__min_a1f75abf2b49096987dd01423a83b6be9}{bPwrOn2PwrGood}} = 50,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01808}01808         .\mbox{\hyperlink{structusb__hub__descriptor__min_a34f984192b2b98c83152607ffac1c7da}{bHubContrCurrent}} = 0,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01809}01809         .\mbox{\hyperlink{structusb__hub__descriptor__min_aad9df054d2dd5e5981552388797aaaa9}{DeviceRemovable}} = \{0\},          \textcolor{comment}{/* port is removable */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01810}01810 \};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01811}01811 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01812}\mbox{\hyperlink{uss820dci_8c_a265c7a0fcb3a015f0e30e8ff1de8b618}{01812}} \textcolor{preprocessor}{\#define STRING\_VENDOR \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01813}01813 \textcolor{preprocessor}{  "{}A\(\backslash\)0G\(\backslash\)0E\(\backslash\)0R\(\backslash\)0E"{}}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01814}01814 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01815}\mbox{\hyperlink{uss820dci_8c_ab7717822bc6abda59578615741ee2223}{01815}} \textcolor{preprocessor}{\#define STRING\_PRODUCT \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01816}01816 \textcolor{preprocessor}{  "{}D\(\backslash\)0C\(\backslash\)0I\(\backslash\)0 \(\backslash\)0R\(\backslash\)0o\(\backslash\)0o\(\backslash\)0t\(\backslash\)0 \(\backslash\)0H\(\backslash\)0U\(\backslash\)0B"{}}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01817}01817 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01818}\mbox{\hyperlink{uss820dci_8c_a7894edb7bfb032f50facbddc4e708c96}{01818}} \mbox{\hyperlink{uss820dci_8c_a7894edb7bfb032f50facbddc4e708c96}{USB\_MAKE\_STRING\_DESC}}(\mbox{\hyperlink{uss820dci_8c_a265c7a0fcb3a015f0e30e8ff1de8b618}{STRING\_VENDOR}}, uss820dci\_vendor);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01819}\mbox{\hyperlink{uss820dci_8c_a10176f5cceb8d6f1a6867a51a9225df7}{01819}} \mbox{\hyperlink{uss820dci_8c_a7894edb7bfb032f50facbddc4e708c96}{USB\_MAKE\_STRING\_DESC}}(\mbox{\hyperlink{uss820dci_8c_ab7717822bc6abda59578615741ee2223}{STRING\_PRODUCT}}, uss820dci\_product);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01820}01820 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01821}01821 \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01822}\mbox{\hyperlink{uss820dci_8c_a3a46eda40a8dfd8799622ff62c52fee7}{01822}} \mbox{\hyperlink{uss820dci_8c_a3a46eda40a8dfd8799622ff62c52fee7}{uss820dci\_roothub\_exec}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01823}01823     \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} *\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \textcolor{keyword}{const} \textcolor{keywordtype}{void} **\mbox{\hyperlink{usb__if_8m_a074c17a419327b41805af2dd7cb152e7}{pptr}}, uint16\_t *plength)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01824}01824 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01825}01825         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc = \mbox{\hyperlink{uss820dci_8c_acfc82510504a3887660a91aada755cb2}{USS820\_DCI\_BUS2SC}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01826}01826         \textcolor{keyword}{const} \textcolor{keywordtype}{void} *ptr;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01827}01827         uint16\_t \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01828}01828         uint16\_t value;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01829}01829         uint16\_t index;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01830}01830         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01831}01831 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01832}01832         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_ac06944c4a4debd07bfbe10857f9b2b1c}{sc\_bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01833}01833 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01834}01834         \textcolor{comment}{/* buffer reset */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01835}01835         ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&sc-\/>\mbox{\hyperlink{structuss820dci__softc_afe92f0e382ca91839049d9b269743389}{sc\_hub\_temp}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01836}01836         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01837}01837         err = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01838}01838 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01839}01839         value = \mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>wValue);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01840}01840         index = \mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>wIndex);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01841}01841 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01842}01842         \textcolor{comment}{/* demultiplex the control request */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01843}01843 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01844}01844         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bmRequestType) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01845}01845         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a760afaa5e388cb04e742b564e4c509f3}{UT\_READ\_DEVICE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01846}01846                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01847}01847                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_afe0147b1f88f094b26142d372647bd01}{UR\_GET\_DESCRIPTOR}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01848}01848                         \textcolor{keywordflow}{goto} tr\_handle\_get\_descriptor;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01849}01849                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a27856773c79338192e9fc272942ffb2a}{UR\_GET\_CONFIG}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01850}01850                         \textcolor{keywordflow}{goto} tr\_handle\_get\_config;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01851}01851                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01852}01852                         \textcolor{keywordflow}{goto} tr\_handle\_get\_status;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01853}01853                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01854}01854                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01855}01855                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01856}01856                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01857}01857 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01858}01858         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a33c2db425d10f85e7b405035bc015d32}{UT\_WRITE\_DEVICE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01859}01859                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01860}01860                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a2e5fb48757cb795a44b99af832d6cd7d}{UR\_SET\_ADDRESS}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01861}01861                         \textcolor{keywordflow}{goto} tr\_handle\_set\_address;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01862}01862                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a03842765b1d21adb3eb41b3d706ec1aa}{UR\_SET\_CONFIG}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01863}01863                         \textcolor{keywordflow}{goto} tr\_handle\_set\_config;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01864}01864                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01865}01865                         \textcolor{keywordflow}{goto} tr\_valid;  \textcolor{comment}{/* nop */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01866}01866                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a1e9409609a7c66d1d575c53d5b2b39d9}{UR\_SET\_DESCRIPTOR}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01867}01867                         \textcolor{keywordflow}{goto} tr\_valid;  \textcolor{comment}{/* nop */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01868}01868                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01869}01869                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01870}01870                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01871}01871                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01872}01872                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01873}01873 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01874}01874         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ab592eead7baaa45331e0e4768c0259dd}{UT\_WRITE\_ENDPOINT}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01875}01875                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01876}01876                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01877}01877                         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>wValue)) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01878}01878                         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a26900a08e106a6bcb220fac754e1b815}{UF\_ENDPOINT\_HALT}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01879}01879                                 \textcolor{keywordflow}{goto} tr\_handle\_clear\_halt;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01880}01880                         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a62760efb62faf9c62861dd006121cde7}{UF\_DEVICE\_REMOTE\_WAKEUP}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01881}01881                                 \textcolor{keywordflow}{goto} tr\_handle\_clear\_wakeup;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01882}01882                         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01883}01883                                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01884}01884                         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01885}01885                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01886}01886                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01887}01887                         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>wValue)) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01888}01888                         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a26900a08e106a6bcb220fac754e1b815}{UF\_ENDPOINT\_HALT}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01889}01889                                 \textcolor{keywordflow}{goto} tr\_handle\_set\_halt;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01890}01890                         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a62760efb62faf9c62861dd006121cde7}{UF\_DEVICE\_REMOTE\_WAKEUP}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01891}01891                                 \textcolor{keywordflow}{goto} tr\_handle\_set\_wakeup;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01892}01892                         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01893}01893                                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01894}01894                         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01895}01895                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01896}01896                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a744ab8acdd49be39deee38a2e4c61fae}{UR\_SYNCH\_FRAME}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01897}01897                         \textcolor{keywordflow}{goto} tr\_valid;  \textcolor{comment}{/* nop */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01898}01898                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01899}01899                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01900}01900                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01901}01901                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01902}01902 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01903}01903         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_acfdcbf0400459ac3c17c15f1ccc3794d}{UT\_READ\_ENDPOINT}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01904}01904                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01905}01905                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01906}01906                         \textcolor{keywordflow}{goto} tr\_handle\_get\_ep\_status;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01907}01907                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01908}01908                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01909}01909                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01910}01910                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01911}01911 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01912}01912         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a1c18aa69d1e986a87fcdbfbb624c954f}{UT\_WRITE\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01913}01913                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01914}01914                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ac158866f6b7f31946ace0216225b79cb}{UR\_SET\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01915}01915                         \textcolor{keywordflow}{goto} tr\_handle\_set\_interface;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01916}01916                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01917}01917                         \textcolor{keywordflow}{goto} tr\_valid;  \textcolor{comment}{/* nop */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01918}01918                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01919}01919                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01920}01920                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01921}01921                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01922}01922                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01923}01923 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01924}01924         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_afc6a17fce8bdb62291274b83223eea65}{UT\_READ\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01925}01925                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01926}01926                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a3654eeeab796d0863e7527e3aac772fe}{UR\_GET\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01927}01927                         \textcolor{keywordflow}{goto} tr\_handle\_get\_interface;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01928}01928                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01929}01929                         \textcolor{keywordflow}{goto} tr\_handle\_get\_iface\_status;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01930}01930                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01931}01931                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01932}01932                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01933}01933                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01934}01934 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01935}01935         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ac338c3af82b085859b50582e10fa7cb7}{UT\_WRITE\_CLASS\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01936}01936         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_aedd6820dd0e6fc1afd8346402bfd7990}{UT\_WRITE\_VENDOR\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01937}01937                 \textcolor{comment}{/* XXX forward */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01938}01938                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01939}01939 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01940}01940         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a4f2e0216ffe1d8145cd1385e42c9a707}{UT\_READ\_CLASS\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01941}01941         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a64932f42cb743ef1af70fe9434f0e71f}{UT\_READ\_VENDOR\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01942}01942                 \textcolor{comment}{/* XXX forward */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01943}01943                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01944}01944 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01945}01945         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a2e2f4f55979f2bd987385ecca0deb448}{UT\_WRITE\_CLASS\_DEVICE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01946}01946                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01947}01947                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01948}01948                         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01949}01949                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a1e9409609a7c66d1d575c53d5b2b39d9}{UR\_SET\_DESCRIPTOR}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01950}01950                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01951}01951                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01952}01952                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01953}01953                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01954}01954                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01955}01955                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01956}01956 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01957}01957         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a2b0da1f1f369841fec9c55cf4df6888b}{UT\_WRITE\_CLASS\_OTHER}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01958}01958                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01959}01959                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01960}01960                         \textcolor{keywordflow}{goto} tr\_handle\_clear\_port\_feature;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01961}01961                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01962}01962                         \textcolor{keywordflow}{goto} tr\_handle\_set\_port\_feature;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01963}01963                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a44d4b0ff5d9dfa1f511a77a5c02d3d45}{UR\_CLEAR\_TT\_BUFFER}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01964}01964                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a98706aa73be778406ec64d7a2c3f2c68}{UR\_RESET\_TT}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01965}01965                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6e4e96fd45ca7b0afd0ea2ea63daae2c}{UR\_STOP\_TT}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01966}01966                         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01967}01967 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01968}01968                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01969}01969                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01970}01970                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01971}01971                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01972}01972 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01973}01973         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ac619fe4cc188166d4001c4b75365154c}{UT\_READ\_CLASS\_OTHER}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01974}01974                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01975}01975                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a82661d7f0b0812c9668c22cf1905b940}{UR\_GET\_TT\_STATE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01976}01976                         \textcolor{keywordflow}{goto} tr\_handle\_get\_tt\_state;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01977}01977                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01978}01978                         \textcolor{keywordflow}{goto} tr\_handle\_get\_port\_status;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01979}01979                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01980}01980                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01981}01981                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01982}01982                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01983}01983 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01984}01984         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ab6456f1ff04af01cc72ae7aa754cd45f}{UT\_READ\_CLASS\_DEVICE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01985}01985                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01986}01986                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_afe0147b1f88f094b26142d372647bd01}{UR\_GET\_DESCRIPTOR}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01987}01987                         \textcolor{keywordflow}{goto} tr\_handle\_get\_class\_descriptor;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01988}01988                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01989}01989                         \textcolor{keywordflow}{goto} tr\_handle\_get\_class\_status;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01990}01990 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01991}01991                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01992}01992                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01993}01993                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01994}01994                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01995}01995         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01996}01996                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01997}01997         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01998}01998         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l01999}01999 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02000}02000 tr\_handle\_get\_descriptor:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02001}02001         \textcolor{keywordflow}{switch} (value >> 8) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02002}02002         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a91e8696a051fcdd76cd797fa128938a2}{UDESC\_DEVICE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02003}02003                 \textcolor{keywordflow}{if} (value \& 0xff) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02004}02004                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02005}02005                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02006}02006                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{uss820dci_8c_a2d8a778064cd24f6eec9ed6f515760d4}{uss820dci\_devd}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02007}02007                 ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{uss820dci_8c_a2d8a778064cd24f6eec9ed6f515760d4}{uss820dci\_devd}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02008}02008                 \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02009}02009         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a5ab2dc4d80db05aea0b739d0f9f66bb1}{UDESC\_DEVICE\_QUALIFIER}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02010}02010                 \textcolor{keywordflow}{if} (value \& 0xff) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02011}02011                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02012}02012                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02013}02013                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{uss820dci_8c_ab236b2300d80d7f67eed9e2ddcf15be4}{uss820dci\_odevd}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02014}02014                 ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{uss820dci_8c_ab236b2300d80d7f67eed9e2ddcf15be4}{uss820dci\_odevd}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02015}02015                 \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02016}02016         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a35d8259be2f4b9d3b278e889898a697a}{UDESC\_CONFIG}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02017}02017                 \textcolor{keywordflow}{if} (value \& 0xff) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02018}02018                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02019}02019                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02020}02020                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{uss820dci_8c_af49a9646d40a2aa2609e17a1c9c7b8d1}{uss820dci\_confd}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02021}02021                 ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{uss820dci_8c_af49a9646d40a2aa2609e17a1c9c7b8d1}{uss820dci\_confd}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02022}02022                 \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02023}02023         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6b58bb576493debe416ae239bb38267c}{UDESC\_STRING}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02024}02024                 \textcolor{keywordflow}{switch} (value \& 0xff) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02025}02025                 \textcolor{keywordflow}{case} 0:         \textcolor{comment}{/* Language table */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02026}02026                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__core_8c_ae7a7499adfcbdfc7011bb2f90217b482}{usb\_string\_lang\_en}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02027}02027                         ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{usb__core_8c_ae7a7499adfcbdfc7011bb2f90217b482}{usb\_string\_lang\_en}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02028}02028                         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02029}02029 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02030}02030                 \textcolor{keywordflow}{case} 1:         \textcolor{comment}{/* Vendor */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02031}02031                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(uss820dci\_vendor);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02032}02032                         ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&uss820dci\_vendor;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02033}02033                         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02034}02034 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02035}02035                 \textcolor{keywordflow}{case} 2:         \textcolor{comment}{/* Product */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02036}02036                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(uss820dci\_product);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02037}02037                         ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&uss820dci\_product;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02038}02038                         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02039}02039                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02040}02040                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02041}02041                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02042}02042                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02043}02043         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02044}02044                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02045}02045         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02046}02046         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02047}02047 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02048}02048 tr\_handle\_get\_config:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02049}02049         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02050}02050         sc-\/>\mbox{\hyperlink{structuss820dci__softc_afe92f0e382ca91839049d9b269743389}{sc\_hub\_temp}}.\mbox{\hyperlink{unionuss820__hub__temp_a74da7212be86b5f0f5b84725c4795d3b}{wValue}}[0] = sc-\/>\mbox{\hyperlink{structuss820dci__softc_aef375c176dc856980d3da9c88eff9e07}{sc\_conf}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02051}02051         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02052}02052 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02053}02053 tr\_handle\_get\_status:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02054}02054         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 2;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02055}02055         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structuss820dci__softc_afe92f0e382ca91839049d9b269743389}{sc\_hub\_temp}}.\mbox{\hyperlink{unionuss820__hub__temp_a74da7212be86b5f0f5b84725c4795d3b}{wValue}}, \mbox{\hyperlink{usb_8h_a5df434c22d261f2fcdf9c54080ad0f48}{UDS\_SELF\_POWERED}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02056}02056         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02057}02057 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02058}02058 tr\_handle\_set\_address:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02059}02059         \textcolor{keywordflow}{if} (value \& 0xFF00) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02060}02060                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02061}02061         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02062}02062         sc-\/>\mbox{\hyperlink{structuss820dci__softc_a2c05757da524da9bebdc5943615a8c50}{sc\_rt\_addr}} = value;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02063}02063         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02064}02064 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02065}02065 tr\_handle\_set\_config:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02066}02066         \textcolor{keywordflow}{if} (value >= 2) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02067}02067                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02068}02068         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02069}02069         sc-\/>\mbox{\hyperlink{structuss820dci__softc_aef375c176dc856980d3da9c88eff9e07}{sc\_conf}} = value;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02070}02070         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02071}02071 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02072}02072 tr\_handle\_get\_interface:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02073}02073         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02074}02074         sc-\/>\mbox{\hyperlink{structuss820dci__softc_afe92f0e382ca91839049d9b269743389}{sc\_hub\_temp}}.\mbox{\hyperlink{unionuss820__hub__temp_a74da7212be86b5f0f5b84725c4795d3b}{wValue}}[0] = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02075}02075         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02076}02076 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02077}02077 tr\_handle\_get\_tt\_state:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02078}02078 tr\_handle\_get\_class\_status:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02079}02079 tr\_handle\_get\_iface\_status:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02080}02080 tr\_handle\_get\_ep\_status:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02081}02081         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 2;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02082}02082         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structuss820dci__softc_afe92f0e382ca91839049d9b269743389}{sc\_hub\_temp}}.\mbox{\hyperlink{unionuss820__hub__temp_a74da7212be86b5f0f5b84725c4795d3b}{wValue}}, 0);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02083}02083         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02084}02084 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02085}02085 tr\_handle\_set\_halt:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02086}02086 tr\_handle\_set\_interface:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02087}02087 tr\_handle\_set\_wakeup:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02088}02088 tr\_handle\_clear\_wakeup:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02089}02089 tr\_handle\_clear\_halt:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02090}02090         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02091}02091 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02092}02092 tr\_handle\_clear\_port\_feature:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02093}02093         \textcolor{keywordflow}{if} (index != 1) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02094}02094                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02095}02095         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02096}02096         DPRINTFN(9, \textcolor{stringliteral}{"{}UR\_CLEAR\_PORT\_FEATURE on port \%d\(\backslash\)n"{}}, index);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02097}02097 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02098}02098         \textcolor{keywordflow}{switch} (value) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02099}02099         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6df9599557522c7163bdcb13c9f4095c}{UHF\_PORT\_SUSPEND}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02100}02100                 \mbox{\hyperlink{uss820dci_8c_ad083fd806c901fac1fba7a3119c9f234}{uss820dci\_wakeup\_peer}}(sc);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02101}02101                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02102}02102 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02103}02103         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a8fa7a9a0c538b3c5c683f530f58d7b11}{UHF\_PORT\_ENABLE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02104}02104                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a4da8d6668f44b94642ddd7deca1ddedb}{port\_enabled}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02105}02105                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02106}02106 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02107}02107         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6027a0c92cd4a7619825f6924b44b3fd}{UHF\_PORT\_TEST}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02108}02108         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_acef0673348b3a416db2e1c3c514b79cb}{UHF\_PORT\_INDICATOR}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02109}02109         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_aed1a43dc5a9b1f893ef9b7a4ce0ed279}{UHF\_C\_PORT\_ENABLE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02110}02110         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6df63ab5c3f9e5715c428f42e7309595}{UHF\_C\_PORT\_OVER\_CURRENT}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02111}02111         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ad0f9e88acdd8f7a6e466e9d3ede9b392}{UHF\_C\_PORT\_RESET}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02112}02112                 \textcolor{comment}{/* nops */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02113}02113                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02114}02114         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a25f7d33df63b7439eb79041effad57f8}{UHF\_PORT\_POWER}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02115}02115                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a627795cb3a352b3023c9360686d9eb6b}{port\_powered}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02116}02116                 \mbox{\hyperlink{uss820dci_8c_a75c73e9a93f46f8163f4293e0fd228b5}{uss820dci\_pull\_down}}(sc);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02117}02117                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02118}02118         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_afe4efdc37762fbdffef921a8ae17e975}{UHF\_C\_PORT\_CONNECTION}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02119}02119                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a42040e7846ee6876bc61984313874e07}{change\_connect}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02120}02120                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02121}02121         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a495feecc17b28cb813521e342360d414}{UHF\_C\_PORT\_SUSPEND}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02122}02122                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_ab13374a188ee78ccc573808db1d721d2}{change\_suspend}} = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02123}02123                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02124}02124         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02125}02125                 err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02126}02126                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02127}02127         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02128}02128         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02129}02129 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02130}02130 tr\_handle\_set\_port\_feature:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02131}02131         \textcolor{keywordflow}{if} (index != 1) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02132}02132                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02133}02133         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02134}02134         DPRINTFN(9, \textcolor{stringliteral}{"{}UR\_SET\_PORT\_FEATURE\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02135}02135 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02136}02136         \textcolor{keywordflow}{switch} (value) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02137}02137         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a8fa7a9a0c538b3c5c683f530f58d7b11}{UHF\_PORT\_ENABLE}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02138}02138                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a4da8d6668f44b94642ddd7deca1ddedb}{port\_enabled}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02139}02139                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02140}02140         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6df9599557522c7163bdcb13c9f4095c}{UHF\_PORT\_SUSPEND}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02141}02141         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ab7d2ba22c960f8009974c75a79739380}{UHF\_PORT\_RESET}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02142}02142         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6027a0c92cd4a7619825f6924b44b3fd}{UHF\_PORT\_TEST}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02143}02143         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_acef0673348b3a416db2e1c3c514b79cb}{UHF\_PORT\_INDICATOR}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02144}02144                 \textcolor{comment}{/* nops */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02145}02145                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02146}02146         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a25f7d33df63b7439eb79041effad57f8}{UHF\_PORT\_POWER}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02147}02147                 sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a627795cb3a352b3023c9360686d9eb6b}{port\_powered}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02148}02148                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02149}02149         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02150}02150                 err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02151}02151                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02152}02152         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02153}02153         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02154}02154 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02155}02155 tr\_handle\_get\_port\_status:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02156}02156 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02157}02157         DPRINTFN(9, \textcolor{stringliteral}{"{}UR\_GET\_PORT\_STATUS\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02158}02158 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02159}02159         \textcolor{keywordflow}{if} (index != 1) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02160}02160                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02161}02161         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02162}02162         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a5aa01e0a8c2e2e6d767ec042f02257f8}{status\_vbus}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02163}02163                 \mbox{\hyperlink{uss820dci_8c_a0840b00f0fc68e20766cd90af355fa40}{uss820dci\_pull\_up}}(sc);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02164}02164         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02165}02165                 \mbox{\hyperlink{uss820dci_8c_a75c73e9a93f46f8163f4293e0fd228b5}{uss820dci\_pull\_down}}(sc);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02166}02166         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02167}02167 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02168}02168         \textcolor{comment}{/* Select FULL-\/speed and Device Side Mode */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02169}02169 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02170}02170         value = \mbox{\hyperlink{usb_8h_a83113706c3590af2f9b0a00b89a05f76}{UPS\_PORT\_MODE\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02171}02171 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02172}02172         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a627795cb3a352b3023c9360686d9eb6b}{port\_powered}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02173}02173                 value |= \mbox{\hyperlink{usb_8h_a615d6c17b8159bf4e146f69a1aa36bbc}{UPS\_PORT\_POWER}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02174}02174         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02175}02175         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a4da8d6668f44b94642ddd7deca1ddedb}{port\_enabled}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02176}02176                 value |= \mbox{\hyperlink{usb_8h_aade8d9406d7a4acd137a942f3c830a23}{UPS\_PORT\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02177}02177         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02178}02178         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a5aa01e0a8c2e2e6d767ec042f02257f8}{status\_vbus}} \&\&}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02179}02179             sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a46cc6d5d03a942cf0a909c29224c0269}{status\_bus\_reset}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02180}02180                 value |= \mbox{\hyperlink{usb_8h_ae763504258270b68d4bfe033088208a5}{UPS\_CURRENT\_CONNECT\_STATUS}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02181}02181         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02182}02182         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_abac956aef830fc8d8c3d0aebb83be4a9}{status\_suspend}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02183}02183                 value |= \mbox{\hyperlink{usb_8h_afbcf31f5c8d04b7ea8da8a819675eeef}{UPS\_SUSPEND}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02184}02184         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02185}02185         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structuss820dci__softc_afe92f0e382ca91839049d9b269743389}{sc\_hub\_temp}}.\mbox{\hyperlink{unionuss820__hub__temp_a85c1d623429ca7e8863dd557deb17956}{ps}}.\mbox{\hyperlink{structusb__port__status_a2b6feb27a59da0abd9e91a4ca8f55866}{wPortStatus}}, value);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02186}02186 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02187}02187         value = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02188}02188 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02189}02189         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_a42040e7846ee6876bc61984313874e07}{change\_connect}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02190}02190                 value |= \mbox{\hyperlink{usb_8h_ae67d894f69d3af508dc6696e73b980ee}{UPS\_C\_CONNECT\_STATUS}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02191}02191         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02192}02192         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structuss820dci__softc_a7dcf9c2c38b1c43533e82a18f5b20c63}{sc\_flags}}.\mbox{\hyperlink{structuss820__flags_ab13374a188ee78ccc573808db1d721d2}{change\_suspend}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02193}02193                 value |= \mbox{\hyperlink{usb_8h_ae2b5e8f919ad7ab52144bbc76128fbc3}{UPS\_C\_SUSPEND}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02194}02194         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02195}02195         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structuss820dci__softc_afe92f0e382ca91839049d9b269743389}{sc\_hub\_temp}}.\mbox{\hyperlink{unionuss820__hub__temp_a85c1d623429ca7e8863dd557deb17956}{ps}}.\mbox{\hyperlink{structusb__port__status_a5651385a11bdb3346496b276d1053de8}{wPortChange}}, value);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02196}02196         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structuss820dci__softc_afe92f0e382ca91839049d9b269743389}{sc\_hub\_temp}}.\mbox{\hyperlink{unionuss820__hub__temp_a85c1d623429ca7e8863dd557deb17956}{ps}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02197}02197         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02198}02198 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02199}02199 tr\_handle\_get\_class\_descriptor:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02200}02200         \textcolor{keywordflow}{if} (value \& 0xFF) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02201}02201                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02202}02202         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02203}02203         ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{uss820dci_8c_a5e0af95414a1b2c043332df8d299660f}{uss820dci\_hubd}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02204}02204         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{uss820dci_8c_a5e0af95414a1b2c043332df8d299660f}{uss820dci\_hubd}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02205}02205         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02206}02206 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02207}02207 tr\_stalled:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02208}02208         err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a83258c6183686c303988db96e7f5713a}{USB\_ERR\_STALLED}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02209}02209 tr\_valid:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02210}02210 done:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02211}02211         *plength = \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02212}02212         *\mbox{\hyperlink{usb__if_8m_a074c17a419327b41805af2dd7cb152e7}{pptr}} = ptr;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02213}02213         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02214}02214 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02215}02215 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02216}02216 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02217}\mbox{\hyperlink{uss820dci_8c_a406364d8c9a8ea87cc744da932d4f604}{02217}} \mbox{\hyperlink{uss820dci_8c_a406364d8c9a8ea87cc744da932d4f604}{uss820dci\_xfer\_setup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__setup__params}{usb\_setup\_params}} *parm)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02218}02218 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02219}02219         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__hw__ep__profile}{usb\_hw\_ep\_profile}} *pf;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02220}02220         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02221}02221         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02222}02222         \textcolor{keywordtype}{void} *last\_obj;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02223}02223         uint32\_t ntd;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02224}02224         uint32\_t \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02225}02225         uint8\_t ep\_no;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02226}02226 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02227}02227         sc = \mbox{\hyperlink{uss820dci_8c_acfc82510504a3887660a91aada755cb2}{USS820\_DCI\_BUS2SC}}(parm-\/>\mbox{\hyperlink{structusb__setup__params_a9f1d602d76af2261a9f113b707bc56f7}{udev}}-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02228}02228         xfer = parm-\/>\mbox{\hyperlink{structusb__setup__params_aa8ed6ed21704b223bdfa97a3ab0d4c0a}{curr\_xfer}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02229}02229 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02230}02230         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02231}02231 \textcolor{comment}{         * NOTE: This driver does not use any of the parameters that}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02232}02232 \textcolor{comment}{         * are computed from the following values. Just set some}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02233}02233 \textcolor{comment}{         * reasonable dummies:}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02234}02234 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02235}02235         parm-\/>\mbox{\hyperlink{structusb__setup__params_acc9d7b0e32de80b152fb807fba90257c}{hc\_max\_packet\_size}} = 0x500;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02236}02236         parm-\/>\mbox{\hyperlink{structusb__setup__params_a82adfb05fee2d6583bce27791144139d}{hc\_max\_packet\_count}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02237}02237         parm-\/>\mbox{\hyperlink{structusb__setup__params_a1a5b54ff6d8638ae7a0acb0b10020155}{hc\_max\_frame\_size}} = 0x500;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02238}02238 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02239}02239         \mbox{\hyperlink{usb__transfer_8c_a26ac79fd0805b2add1b1dac2cf327a4e}{usbd\_transfer\_setup\_sub}}(parm);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02240}02240 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02241}02241         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02242}02242 \textcolor{comment}{         * compute maximum number of TDs}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02243}02243 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02244}02244         \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_ada6e8220c275d4a1a28383d76aab878f}{methods}} == \&\mbox{\hyperlink{uss820dci_8c_a2db8b78c176b87be68f8fb89d01b4a7c}{uss820dci\_device\_ctrl\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02245}02245                 ntd = xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}} + 1 \textcolor{comment}{/* STATUS */} + 1 \textcolor{comment}{/* SYNC */} ;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02246}02246 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02247}02247         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_ada6e8220c275d4a1a28383d76aab878f}{methods}} == \&\mbox{\hyperlink{uss820dci_8c_a3e974242be8c2c5be0a83c7801c77412}{uss820dci\_device\_bulk\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02248}02248                 ntd = xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}} + 1 \textcolor{comment}{/* SYNC */} ;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02249}02249 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02250}02250         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_ada6e8220c275d4a1a28383d76aab878f}{methods}} == \&\mbox{\hyperlink{uss820dci_8c_a85070bd6b9239094b8f8f6e6ef90c205}{uss820dci\_device\_intr\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02251}02251                 ntd = xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}} + 1 \textcolor{comment}{/* SYNC */} ;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02252}02252 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02253}02253         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_ada6e8220c275d4a1a28383d76aab878f}{methods}} == \&\mbox{\hyperlink{uss820dci_8c_a46d92450c9eac878cd9c202be25dbcb9}{uss820dci\_device\_isoc\_fs\_methods}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02254}02254                 ntd = xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}} + 1 \textcolor{comment}{/* SYNC */} ;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02255}02255 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02256}02256         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02257}02257                 ntd = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02258}02258         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02259}02259 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02260}02260         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02261}02261 \textcolor{comment}{         * check if "{}usbd\_transfer\_setup\_sub"{} set an error}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02262}02262 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02263}02263         \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_ad2543ebaa3709e178a7ad9e56de498e0}{err}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02264}02264                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02265}02265         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02266}02266         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02267}02267 \textcolor{comment}{         * allocate transfer descriptors}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02268}02268 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02269}02269         last\_obj = NULL;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02270}02270 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02271}02271         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02272}02272 \textcolor{comment}{         * get profile stuff}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02273}02273 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02274}02274         \textcolor{keywordflow}{if} (ntd) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02275}02275                 ep\_no = xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}} \& \mbox{\hyperlink{usb_8h_a227db1f194f105a22faae81401d3e18e}{UE\_ADDR}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02276}02276                 \mbox{\hyperlink{uss820dci_8c_a9f50bc4724098fbbeea76e12b1be95ae}{uss820dci\_get\_hw\_ep\_profile}}(parm-\/>\mbox{\hyperlink{structusb__setup__params_a9f1d602d76af2261a9f113b707bc56f7}{udev}}, \&pf, ep\_no);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02277}02277 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02278}02278                 \textcolor{keywordflow}{if} (pf == NULL) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02279}02279                         \textcolor{comment}{/* should not happen */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02280}02280                         parm-\/>\mbox{\hyperlink{structusb__setup__params_ad2543ebaa3709e178a7ad9e56de498e0}{err}} = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945ac568d752239d287fca75588222df1bdf}{USB\_ERR\_INVAL}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02281}02281                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02282}02282                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02283}02283         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02284}02284                 ep\_no = 0;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02285}02285                 pf = NULL;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02286}02286         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02287}02287 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02288}02288         \textcolor{comment}{/* align data */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02289}02289         parm-\/>\mbox{\hyperlink{structusb__setup__params_a787abf638db3b00e32f70c2d33b41e27}{size}}[0] += ((-\/parm-\/>\mbox{\hyperlink{structusb__setup__params_a787abf638db3b00e32f70c2d33b41e27}{size}}[0]) \& (\mbox{\hyperlink{usb__freebsd_8h_a0d41cb59a7c8f7a0d52857d77d54f392}{USB\_HOST\_ALIGN}} -\/ 1));}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02290}02290 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02291}02291         \textcolor{keywordflow}{for} (\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} = 0; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} != ntd; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}++) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02292}02292                 \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__td}{uss820dci\_td}} *td;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02293}02293 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02294}02294                 \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_a3a54a1ffd5caf3ab8718c91cbe78b639}{buf}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02295}02295                         td = \mbox{\hyperlink{usb__core_8h_a68f3f7f9da01956353655ebb6678d641}{USB\_ADD\_BYTES}}(parm-\/>\mbox{\hyperlink{structusb__setup__params_a3a54a1ffd5caf3ab8718c91cbe78b639}{buf}}, parm-\/>\mbox{\hyperlink{structusb__setup__params_a787abf638db3b00e32f70c2d33b41e27}{size}}[0]);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02296}02296 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02297}02297                         \textcolor{comment}{/* init TD */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02298}02298                         td-\/>\mbox{\hyperlink{structuss820dci__td_afa7c588af7e2bd19854303bedd0b847b}{max\_packet\_size}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_aefcde8a630b7adefe68cc72e7e7a5bb5}{max\_packet\_size}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02299}02299                         td-\/>\mbox{\hyperlink{structuss820dci__td_aeb35fca5ed072225fe0d1146ccba58ca}{ep\_index}} = ep\_no;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02300}02300                         \textcolor{keywordflow}{if} (pf-\/>support\_multi\_buffer \&\&}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02301}02301                             (parm-\/>\mbox{\hyperlink{structusb__setup__params_ada6e8220c275d4a1a28383d76aab878f}{methods}} != \&\mbox{\hyperlink{uss820dci_8c_a2db8b78c176b87be68f8fb89d01b4a7c}{uss820dci\_device\_ctrl\_methods}})) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02302}02302                                 td-\/>\mbox{\hyperlink{structuss820dci__td_a8ea913de0c7616f949ccaac63b07dcd6}{support\_multi\_buffer}} = 1;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02303}02303                         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02304}02304                         td-\/>\mbox{\hyperlink{structuss820dci__td_a8eec7af4458d276d91bc5c658cb002e2}{obj\_next}} = last\_obj;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02305}02305 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02306}02306                         last\_obj = td;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02307}02307                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02308}02308                 parm-\/>\mbox{\hyperlink{structusb__setup__params_a787abf638db3b00e32f70c2d33b41e27}{size}}[0] += \textcolor{keyword}{sizeof}(*td);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02309}02309         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02310}02310 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02311}02311         xfer-\/>\mbox{\hyperlink{structusb__xfer_a68f3cea7860d801fe4e03b3301c9381d}{td\_start}}[0] = last\_obj;}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02312}02312 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02313}02313 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02314}02314 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02315}\mbox{\hyperlink{uss820dci_8c_acb4df47d5613052714978b78dd3d959a}{02315}} \mbox{\hyperlink{uss820dci_8c_acb4df47d5613052714978b78dd3d959a}{uss820dci\_xfer\_unsetup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02316}02316 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02317}02317         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02318}02318 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02319}02319 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02320}02320 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02321}\mbox{\hyperlink{uss820dci_8c_a3771dafe542b1259b4264a55c4475135}{02321}} \mbox{\hyperlink{uss820dci_8c_a3771dafe542b1259b4264a55c4475135}{uss820dci\_ep\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__endpoint__descriptor}{usb\_endpoint\_descriptor}} *edesc,}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02322}02322     \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__endpoint}{usb\_endpoint}} *ep)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02323}02323 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02324}02324         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc = \mbox{\hyperlink{uss820dci_8c_acfc82510504a3887660a91aada755cb2}{USS820\_DCI\_BUS2SC}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02325}02325 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02326}02326         DPRINTFN(2, \textcolor{stringliteral}{"{}endpoint=\%p, addr=\%d, endpt=\%d, mode=\%d (\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02327}02327             ep, udev-\/>\mbox{\hyperlink{structusb__device_ab9873df4422a53f4fa2d7c17460b11a1}{address}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02328}02328             edesc-\/>\mbox{\hyperlink{structusb__endpoint__descriptor_a3d0a0ab41c53023055a242d66a437a2d}{bEndpointAddress}}, udev-\/>\mbox{\hyperlink{structusb__device_ae7b27fdcae02d49bee5c2f0a9130b633}{flags}}.\mbox{\hyperlink{structusb__device__flags_ad686103f845c7d070e25fa7a26c34694}{usb\_mode}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02329}02329             sc-\/>\mbox{\hyperlink{structuss820dci__softc_a2c05757da524da9bebdc5943615a8c50}{sc\_rt\_addr}});}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02330}02330 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02331}02331         \textcolor{keywordflow}{if} (udev-\/>\mbox{\hyperlink{structusb__device_a5671e9a7365d48bd470879e2b95ea2e5}{device\_index}} != sc-\/>\mbox{\hyperlink{structuss820dci__softc_a2c05757da524da9bebdc5943615a8c50}{sc\_rt\_addr}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02332}02332                 \textcolor{keywordflow}{if} (udev-\/>\mbox{\hyperlink{structusb__device_a1fc02abd43bd33f295493ed23debd852}{speed}} != \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffa0f17d0b9928086c6114fea73e08f1780}{USB\_SPEED\_FULL}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02333}02333                         \textcolor{comment}{/* not supported */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02334}02334                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02335}02335                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02336}02336                 \textcolor{keywordflow}{switch} (edesc-\/>\mbox{\hyperlink{structusb__endpoint__descriptor_aff28dcc97802a405b31baccd33c2bf8f}{bmAttributes}} \& \mbox{\hyperlink{usb_8h_a8badd3504359a0aed83ac575a46a67b4}{UE\_XFERTYPE}}) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02337}02337                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02338}02338                         ep-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}} = \&\mbox{\hyperlink{uss820dci_8c_a2db8b78c176b87be68f8fb89d01b4a7c}{uss820dci\_device\_ctrl\_methods}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02339}02339                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02340}02340                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a01e28e87ad16f6dfffefc6ccab08baed}{UE\_INTERRUPT}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02341}02341                         ep-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}} = \&\mbox{\hyperlink{uss820dci_8c_a85070bd6b9239094b8f8f6e6ef90c205}{uss820dci\_device\_intr\_methods}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02342}02342                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02343}02343                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_aecbab40f64cd5ffe365b73f7360ea2a3}{UE\_ISOCHRONOUS}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02344}02344                         ep-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}} = \&\mbox{\hyperlink{uss820dci_8c_a46d92450c9eac878cd9c202be25dbcb9}{uss820dci\_device\_isoc\_fs\_methods}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02345}02345                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02346}02346                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02347}02347                         ep-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}} = \&\mbox{\hyperlink{uss820dci_8c_a3e974242be8c2c5be0a83c7801c77412}{uss820dci\_device\_bulk\_methods}};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02348}02348                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02349}02349                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02350}02350                         \textcolor{comment}{/* do nothing */}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02351}02351                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02352}02352                 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02353}02353         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02354}02354 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02355}02355 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02356}02356 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02357}\mbox{\hyperlink{uss820dci_8c_af947100417398a4db6c2ebd1d834c3bd}{02357}} \mbox{\hyperlink{uss820dci_8c_af947100417398a4db6c2ebd1d834c3bd}{uss820dci\_set\_hw\_power\_sleep}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__bus}{usb\_bus}} *bus, uint32\_t state)}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02358}02358 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02359}02359         \textcolor{keyword}{struct }\mbox{\hyperlink{structuss820dci__softc}{uss820dci\_softc}} *sc = \mbox{\hyperlink{uss820dci_8c_acfc82510504a3887660a91aada755cb2}{USS820\_DCI\_BUS2SC}}(bus);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02360}02360 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02361}02361         \textcolor{keywordflow}{switch} (state) \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02362}02362         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb__controller_8h_a7059f3b2b6c2ad966a4c72fc57b72de1}{USB\_HW\_POWER\_SUSPEND}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02363}02363                 \mbox{\hyperlink{uss820dci_8c_a19505ed252272a9cdc782263cacdc395}{uss820dci\_suspend}}(sc);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02364}02364                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02365}02365         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb__controller_8h_a9bf3bc2863030915ae241b50188c8f21}{USB\_HW\_POWER\_SHUTDOWN}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02366}02366                 \mbox{\hyperlink{uss820dci_8c_a8d10d418d39e65504468b08bb3a9c554}{uss820dci\_uninit}}(sc);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02367}02367                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02368}02368         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb__controller_8h_a13be95e61855e5fddce8004288a740ca}{USB\_HW\_POWER\_RESUME}}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02369}02369                 \mbox{\hyperlink{uss820dci_8c_aa1cd4453cdbb27571563ee708437f564}{uss820dci\_resume}}(sc);}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02370}02370                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02371}02371         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02372}02372                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02373}02373         \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02374}02374 \}}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02375}02375 }
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02376}02376 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__bus__methods}{usb\_bus\_methods}} \mbox{\hyperlink{uss820dci_8c_a3fb35df1ab4f9aac9fac32c83b7f7495}{uss820dci\_bus\_methods}} =}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02377}02377 \{}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02378}02378         .\mbox{\hyperlink{structusb__bus__methods_ae9169cdc4fe46a61286ad14aa59c3a31}{endpoint\_init}} = \&\mbox{\hyperlink{uss820dci_8c_a3771dafe542b1259b4264a55c4475135}{uss820dci\_ep\_init}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02379}02379         .xfer\_setup = \&\mbox{\hyperlink{uss820dci_8c_a406364d8c9a8ea87cc744da932d4f604}{uss820dci\_xfer\_setup}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02380}02380         .xfer\_unsetup = \&\mbox{\hyperlink{uss820dci_8c_acb4df47d5613052714978b78dd3d959a}{uss820dci\_xfer\_unsetup}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02381}02381         .get\_hw\_ep\_profile = \&\mbox{\hyperlink{uss820dci_8c_a9f50bc4724098fbbeea76e12b1be95ae}{uss820dci\_get\_hw\_ep\_profile}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02382}02382         .xfer\_stall = \&\mbox{\hyperlink{uss820dci_8c_a00bf6d01a51e7eb6a00fe05b8ebe2b7f}{uss820dci\_xfer\_stall}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02383}02383         .set\_stall = \&\mbox{\hyperlink{uss820dci_8c_a1ce33ff39f67eae3fdf6b192c5dcde68}{uss820dci\_set\_stall}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02384}02384         .clear\_stall = \&\mbox{\hyperlink{uss820dci_8c_a04d79712c20e63015a5c6d3f56173262}{uss820dci\_clear\_stall}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02385}02385         .roothub\_exec = \&\mbox{\hyperlink{uss820dci_8c_a3a46eda40a8dfd8799622ff62c52fee7}{uss820dci\_roothub\_exec}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02386}02386         .xfer\_poll = \&\mbox{\hyperlink{uss820dci_8c_a39044d009b14f90f9ecb222a550d6069}{uss820dci\_do\_poll}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02387}02387         .set\_hw\_power\_sleep = \mbox{\hyperlink{uss820dci_8c_af947100417398a4db6c2ebd1d834c3bd}{uss820dci\_set\_hw\_power\_sleep}},}
\DoxyCodeLine{\Hypertarget{uss820dci_8c_source_l02388}02388 \};}

\end{DoxyCode}
