\hypertarget{atmegadci_8c_source}{}\doxysection{atmegadci.\+c}
\label{atmegadci_8c_source}\index{dev/usb/controller/atmegadci.c@{dev/usb/controller/atmegadci.c}}
\mbox{\hyperlink{atmegadci_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00001}00001 \textcolor{comment}{/* \$FreeBSD\$ */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00002}00002 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00003}00003 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00004}00004 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2009 Hans Petter Selasky. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00029}00029 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00030}00030 \textcolor{comment}{ * This file contains the driver for the ATMEGA series USB OTG Controller. This}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00031}00031 \textcolor{comment}{ * driver currently only supports the DCI mode of the USB hardware.}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00032}00032 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00034}00034 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00035}00035 \textcolor{comment}{ * NOTE: When the chip detects BUS-\/reset it will also reset the}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00036}00036 \textcolor{comment}{ * endpoints, Function-\/address and more.}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00037}00037 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00039}00039 \textcolor{preprocessor}{\#ifdef USB\_GLOBAL\_INCLUDE\_FILE}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00040}00040 \textcolor{preprocessor}{\#include USB\_GLOBAL\_INCLUDE\_FILE}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00041}00041 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/stdint.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/stddef.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <sys/sx.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00057}00057 \textcolor{preprocessor}{\#include <sys/callout.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00059}00059 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00060}00060 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00064}\mbox{\hyperlink{atmegadci_8c_a927dd6f59caf10a2991dfb564bcbb1e1}{00064}} \textcolor{preprocessor}{\#define USB\_DEBUG\_VAR atmegadci\_debug}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00066}00066 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__core_8h}{dev/usb/usb\_core.h}}>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00067}00067 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__debug_8h}{dev/usb/usb\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__busdma_8h}{dev/usb/usb\_busdma.h}}>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00069}00069 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__process_8h}{dev/usb/usb\_process.h}}>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00070}00070 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__transfer_8h}{dev/usb/usb\_transfer.h}}>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00071}00071 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__device_8h}{dev/usb/usb\_device.h}}>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00072}00072 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__hub_8h}{dev/usb/usb\_hub.h}}>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00073}00073 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__util_8h}{dev/usb/usb\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00074}00074 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00075}00075 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__controller_8h}{dev/usb/usb\_controller.h}}>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00076}00076 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__bus_8h}{dev/usb/usb\_bus.h}}>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00077}00077 \textcolor{preprocessor}{\#endif                  }\textcolor{comment}{/* USB\_GLOBAL\_INCLUDE\_FILE */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00078}00078 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00079}00079 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{atmegadci_8h}{dev/usb/controller/atmegadci.h}}>}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00081}\mbox{\hyperlink{atmegadci_8c_a4ec0c34c8aa990c317e29a58e91ae4b9}{00081}} \textcolor{preprocessor}{\#define ATMEGA\_BUS2SC(bus) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00082}00082 \textcolor{preprocessor}{    \_\_containerof(bus, struct atmegadci\_softc, sc\_bus)}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00083}00083 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00084}\mbox{\hyperlink{atmegadci_8c_abe04a61f1dc462729683c6eee09f56a0}{00084}} \textcolor{preprocessor}{\#define ATMEGA\_PC2SC(pc) \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00085}00085 \textcolor{preprocessor}{   ATMEGA\_BUS2SC(USB\_DMATAG\_TO\_XROOT((pc)-\/>tag\_parent)-\/>bus)}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00086}00086 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00087}00087 \textcolor{preprocessor}{\#ifdef USB\_DEBUG}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00088}00088 \textcolor{keyword}{static} \textcolor{keywordtype}{int} atmegadci\_debug = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00089}00089 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00090}00090 \textcolor{keyword}{static} \mbox{\hyperlink{dwc__otg_8c_a58e125bcf985ce2333baef42f97b33b3}{SYSCTL\_NODE}}(\_hw\_usb, OID\_AUTO, atmegadci, CTLFLAG\_RW | CTLFLAG\_MPSAFE, 0,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00091}00091     \textcolor{stringliteral}{"{}USB ATMEGA DCI"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00092}00092 \mbox{\hyperlink{dwc__otg_8c_a83d020f0b15dc2783f3f1a6966c75e36}{SYSCTL\_INT}}(\_hw\_usb\_atmegadci, OID\_AUTO, \mbox{\hyperlink{cfumass_8c_ac3e1795766a80ec63b157951b4b9a7d4}{debug}}, CTLFLAG\_RWTUN,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00093}00093     \&atmegadci\_debug, 0, \textcolor{stringliteral}{"{}ATMEGA DCI debug level"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00094}00094 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00095}00095 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00096}\mbox{\hyperlink{atmegadci_8c_a7b3c1042d4fca1e6122e7b6cfd193f63}{00096}} \textcolor{preprocessor}{\#define ATMEGA\_INTR\_ENDPT 1}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00098}00098 \textcolor{comment}{/* prototypes */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00099}00099 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00100}\mbox{\hyperlink{atmegadci_8c_a72940840b9a037001efaf61acf92c3c0}{00100}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__bus__methods}{usb\_bus\_methods}} \mbox{\hyperlink{atmegadci_8c_a72940840b9a037001efaf61acf92c3c0}{atmegadci\_bus\_methods}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00101}\mbox{\hyperlink{atmegadci_8c_a1339815657b83494c0c1ebef93d5b7b9}{00101}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{atmegadci_8c_a1339815657b83494c0c1ebef93d5b7b9}{atmegadci\_device\_non\_isoc\_methods}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00102}\mbox{\hyperlink{atmegadci_8c_a7013f016e82046a3681eedcbb604f080}{00102}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{atmegadci_8c_a7013f016e82046a3681eedcbb604f080}{atmegadci\_device\_isoc\_fs\_methods}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00103}00103 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00104}\mbox{\hyperlink{atmegadci_8c_a2255ce8e367c4a3a7f73b6f2cbe489f2}{00104}} \textcolor{keyword}{static} \mbox{\hyperlink{atmegadci_8h_a5c0e87ebfce875ae816e886bd027c4ea}{atmegadci\_cmd\_t}} \mbox{\hyperlink{atmegadci_8c_a2255ce8e367c4a3a7f73b6f2cbe489f2}{atmegadci\_setup\_rx}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00105}\mbox{\hyperlink{atmegadci_8c_a98d2d1f0d111a4e984d9244e2514c63e}{00105}} \textcolor{keyword}{static} \mbox{\hyperlink{atmegadci_8h_a5c0e87ebfce875ae816e886bd027c4ea}{atmegadci\_cmd\_t}} \mbox{\hyperlink{atmegadci_8c_a98d2d1f0d111a4e984d9244e2514c63e}{atmegadci\_data\_rx}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00106}\mbox{\hyperlink{atmegadci_8c_a902e28d283d3fec9189ed902f5fd078c}{00106}} \textcolor{keyword}{static} \mbox{\hyperlink{atmegadci_8h_a5c0e87ebfce875ae816e886bd027c4ea}{atmegadci\_cmd\_t}} \mbox{\hyperlink{atmegadci_8c_a902e28d283d3fec9189ed902f5fd078c}{atmegadci\_data\_tx}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00107}\mbox{\hyperlink{atmegadci_8c_a90de04b5e9bde5aa6db6ea3f8eef65dd}{00107}} \textcolor{keyword}{static} \mbox{\hyperlink{atmegadci_8h_a5c0e87ebfce875ae816e886bd027c4ea}{atmegadci\_cmd\_t}} \mbox{\hyperlink{atmegadci_8c_a90de04b5e9bde5aa6db6ea3f8eef65dd}{atmegadci\_data\_tx\_sync}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00108}00108 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{atmegadci_8c_aead7f9a2fff27fcee562264b49fd20a3}{atmegadci\_device\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00109}00109 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{atmegadci_8c_ab515c07746e43584b0fa5367ceae3400}{atmegadci\_do\_poll}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__bus}{usb\_bus}} *);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00110}00110 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{atmegadci_8c_a87fd630fad0c899eacff699448abc88e}{atmegadci\_standard\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00111}00111 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{atmegadci_8c_aa12c0de7fbeebc3fcbdcf546215e2f13}{atmegadci\_root\_intr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00112}00112 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00113}00113 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00114}00114 \textcolor{comment}{ * Here is a list of what the chip supports:}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00115}00115 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00116}00116 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__hw__ep__profile}{usb\_hw\_ep\_profile}}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00117}\mbox{\hyperlink{atmegadci_8c_a9b2277af37b92aa12474c600b8bdd5c8}{00117}}         \mbox{\hyperlink{atmegadci_8c_a9b2277af37b92aa12474c600b8bdd5c8}{atmegadci\_ep\_profile}}[2] = \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00118}00118         [0] = \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00119}00119                 .\mbox{\hyperlink{structusb__hw__ep__profile_a0a8423b9793236e6e9bbb907559e29cd}{max\_in\_frame\_size}} = 64,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00120}00120                 .max\_out\_frame\_size = 64,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00121}00121                 .is\_simplex = 1,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00122}00122                 .support\_control = 1,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00123}00123         \},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00124}00124         [1] = \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00125}00125                 .max\_in\_frame\_size = 64,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00126}00126                 .max\_out\_frame\_size = 64,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00127}00127                 .is\_simplex = 1,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00128}00128                 .support\_bulk = 1,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00129}00129                 .support\_interrupt = 1,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00130}00130                 .support\_isochronous = 1,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00131}00131                 .support\_in = 1,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00132}00132                 .support\_out = 1,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00133}00133         \},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00134}00134 \};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00135}00135 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00136}00136 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00137}\mbox{\hyperlink{atmegadci_8c_ab00f1df4e7493e60301308aa84b0c6ba}{00137}} \mbox{\hyperlink{atmegadci_8c_ab00f1df4e7493e60301308aa84b0c6ba}{atmegadci\_get\_hw\_ep\_profile}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00138}00138     \textcolor{keyword}{const} \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__hw__ep__profile}{usb\_hw\_ep\_profile}} **ppf, uint8\_t ep\_addr)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00139}00139 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00140}00140         \textcolor{keywordflow}{if} (ep\_addr == 0)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00141}00141                 *ppf = \mbox{\hyperlink{atmegadci_8c_a9b2277af37b92aa12474c600b8bdd5c8}{atmegadci\_ep\_profile}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00142}00142         \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ep\_addr < \mbox{\hyperlink{atmegadci_8h_ab64acf9721f6a47204a4ba241daae6be}{ATMEGA\_EP\_MAX}})}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00143}00143                 *ppf = \mbox{\hyperlink{atmegadci_8c_a9b2277af37b92aa12474c600b8bdd5c8}{atmegadci\_ep\_profile}} + 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00144}00144         \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00145}00145                 *ppf = NULL;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00146}00146 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00147}00147 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00148}00148 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00149}\mbox{\hyperlink{atmegadci_8c_af35160c10228534e4c5beeedeb64bcd3}{00149}} \mbox{\hyperlink{atmegadci_8c_af35160c10228534e4c5beeedeb64bcd3}{atmegadci\_clocks\_on}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00150}00150 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00151}00151         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a954a86b1b8eab3b946f3a39936d47ca0}{clocks\_off}} \&\&}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00152}00152             sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a9e88e81a993a9ef8ab1d04f7338758bd}{port\_powered}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00153}00153                 DPRINTFN(5, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00154}00154 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00155}00155                 \textcolor{comment}{/* turn on clocks */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00156}00156                 (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a2e4ba3301b473d566f4230afdcf4c5d9}{sc\_clocks\_on}}) (\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00157}00157 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00158}00158                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a4acbffcc30de819731409e4bf02f69c1}{ATMEGA\_USBCON}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00159}00159                     \mbox{\hyperlink{atmegadci_8h_a37227c640b965834d81a04d447d55826}{ATMEGA\_USBCON\_USBE}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00160}00160                     \mbox{\hyperlink{atmegadci_8h_ad78058db264e40f3ae75f4419f7450da}{ATMEGA\_USBCON\_OTGPADE}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00161}00161                     \mbox{\hyperlink{atmegadci_8h_a50e0025f04832e0ab9cd6d5a99c4396b}{ATMEGA\_USBCON\_VBUSTE}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00162}00162 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00163}00163                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a954a86b1b8eab3b946f3a39936d47ca0}{clocks\_off}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00164}00164 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00165}00165                 \textcolor{comment}{/* enable transceiver ? */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00166}00166         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00167}00167 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00168}00168 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00169}00169 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00170}\mbox{\hyperlink{atmegadci_8c_a5876c2b37c2599fc774556a7e89cc467}{00170}} \mbox{\hyperlink{atmegadci_8c_a5876c2b37c2599fc774556a7e89cc467}{atmegadci\_clocks\_off}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00171}00171 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00172}00172         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a954a86b1b8eab3b946f3a39936d47ca0}{clocks\_off}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00173}00173                 DPRINTFN(5, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00174}00174 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00175}00175                 \textcolor{comment}{/* disable Transceiver ? */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00176}00176 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00177}00177                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a4acbffcc30de819731409e4bf02f69c1}{ATMEGA\_USBCON}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00178}00178                     \mbox{\hyperlink{atmegadci_8h_a37227c640b965834d81a04d447d55826}{ATMEGA\_USBCON\_USBE}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00179}00179                     \mbox{\hyperlink{atmegadci_8h_ad78058db264e40f3ae75f4419f7450da}{ATMEGA\_USBCON\_OTGPADE}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00180}00180                     \mbox{\hyperlink{atmegadci_8h_a120529d0ba4cfbaa95cecf224c41c180}{ATMEGA\_USBCON\_FRZCLK}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00181}00181                     \mbox{\hyperlink{atmegadci_8h_a50e0025f04832e0ab9cd6d5a99c4396b}{ATMEGA\_USBCON\_VBUSTE}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00182}00182 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00183}00183                 \textcolor{comment}{/* turn clocks off */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00184}00184                 (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a68c8e45a5b4e45260629c91056e1e2d5}{sc\_clocks\_off}}) (\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00185}00185 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00186}00186                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a954a86b1b8eab3b946f3a39936d47ca0}{clocks\_off}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00187}00187         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00188}00188 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00189}00189 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00190}00190 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00191}\mbox{\hyperlink{atmegadci_8c_a5d5c430b6c7108410079b5e7d53e41ba}{00191}} \mbox{\hyperlink{atmegadci_8c_a5d5c430b6c7108410079b5e7d53e41ba}{atmegadci\_pull\_up}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00192}00192 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00193}00193         \textcolor{comment}{/* pullup D+, if possible */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00194}00194 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00195}00195         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_ae14adbe35c4775380be0ea2564d7efd2}{d\_pulled\_up}} \&\&}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00196}00196             sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a9e88e81a993a9ef8ab1d04f7338758bd}{port\_powered}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00197}00197                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_ae14adbe35c4775380be0ea2564d7efd2}{d\_pulled\_up}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00198}00198                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_abf29b5644559d3620f91cdeed8738837}{ATMEGA\_UDCON}}, 0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00199}00199         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00200}00200 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00201}00201 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00202}00202 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00203}\mbox{\hyperlink{atmegadci_8c_adb9a956a838d2c30b422609bc7ebaaf3}{00203}} \mbox{\hyperlink{atmegadci_8c_adb9a956a838d2c30b422609bc7ebaaf3}{atmegadci\_pull\_down}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00204}00204 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00205}00205         \textcolor{comment}{/* pulldown D+, if possible */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00206}00206 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00207}00207         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_ae14adbe35c4775380be0ea2564d7efd2}{d\_pulled\_up}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00208}00208                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_ae14adbe35c4775380be0ea2564d7efd2}{d\_pulled\_up}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00209}00209                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_abf29b5644559d3620f91cdeed8738837}{ATMEGA\_UDCON}}, \mbox{\hyperlink{atmegadci_8h_aa5a3f052ffffd21cf62c0ad11fbf5a01}{ATMEGA\_UDCON\_DETACH}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00210}00210         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00211}00211 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00212}00212 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00213}00213 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00214}\mbox{\hyperlink{atmegadci_8c_a02b27b73c20a70a2e920bf7337d2eab3}{00214}} \mbox{\hyperlink{atmegadci_8c_a02b27b73c20a70a2e920bf7337d2eab3}{atmegadci\_wakeup\_peer}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00215}00215 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00216}00216         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00217}00217 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00218}00218         \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_ae8096abd5d44a92e25e9204ecb7c4415}{status\_suspend}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00219}00219                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00220}00220         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00221}00221 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00222}00222         temp = \mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_abf29b5644559d3620f91cdeed8738837}{ATMEGA\_UDCON}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00223}00223         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_abf29b5644559d3620f91cdeed8738837}{ATMEGA\_UDCON}}, temp | \mbox{\hyperlink{atmegadci_8h_a358ec28aace5fa1b235d88e858c44054}{ATMEGA\_UDCON\_RMWKUP}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00224}00224 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00225}00225         \textcolor{comment}{/* wait 8 milliseconds */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00226}00226         \textcolor{comment}{/* Wait for reset to complete. */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00227}00227         \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a7355d01a9b05ad01972eccabe5747edf}{bus\_mtx}}, hz / 125);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00228}00228 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00229}00229         \textcolor{comment}{/* hardware should have cleared RMWKUP bit */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00230}00230 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00232}00232 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00233}\mbox{\hyperlink{atmegadci_8c_a68c5805d306072199685a01718b07012}{00233}} \mbox{\hyperlink{atmegadci_8c_a68c5805d306072199685a01718b07012}{atmegadci\_set\_address}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc, uint8\_t addr)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00234}00234 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00235}00235         DPRINTFN(5, \textcolor{stringliteral}{"{}addr=\%d\(\backslash\)n"{}}, addr);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00236}00236 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00237}00237         addr |= \mbox{\hyperlink{atmegadci_8h_ac0882267146e3386f2651d84d7c2bdeb}{ATMEGA\_UDADDR\_ADDEN}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00238}00238 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00239}00239         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a6e2cb932552c1dff0846fe153c0ea904}{ATMEGA\_UDADDR}}, addr);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00240}00240 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00241}00241 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00242}00242 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00243}\mbox{\hyperlink{atmegadci_8c_a717090e60d429392259e48dfc5de5f59}{00243}} \mbox{\hyperlink{atmegadci_8c_a2255ce8e367c4a3a7f73b6f2cbe489f2}{atmegadci\_setup\_rx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__td}{atmegadci\_td}} *td)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00244}00244 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00245}00245         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00246}00246         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00247}00247         uint16\_t count;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00248}00248         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00249}00249 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00250}00250         \textcolor{comment}{/* get pointer to softc */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00251}00251         sc = \mbox{\hyperlink{atmegadci_8c_abe04a61f1dc462729683c6eee09f56a0}{ATMEGA\_PC2SC}}(td-\/>\mbox{\hyperlink{structatmegadci__td_a6849a285e12604a1153be745a18292e2}{pc}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00252}00252 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00253}00253         \textcolor{comment}{/* select endpoint number */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00254}00254         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a52bcbb543c212e30e09e7fc1ffd652a4}{ATMEGA\_UENUM}}, td-\/>\mbox{\hyperlink{structatmegadci__td_a32e0f8e743b6f949c336e4248b8c3d11}{ep\_no}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00255}00255 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00256}00256         \textcolor{comment}{/* check endpoint status */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00257}00257         temp = \mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a39b2badd93f06d065817e699210e37b6}{ATMEGA\_UEINTX}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00258}00258 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00259}00259         DPRINTFN(5, \textcolor{stringliteral}{"{}UEINTX=0x\%02x\(\backslash\)n"{}}, temp);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00260}00260 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00261}00261         \textcolor{keywordflow}{if} (!(temp \& \mbox{\hyperlink{atmegadci_8h_a1430e20159953711088b1bc8a62bb8c9}{ATMEGA\_UEINTX\_RXSTPI}})) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00262}00262                 \textcolor{keywordflow}{goto} not\_complete;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00263}00263         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00264}00264         \textcolor{comment}{/* clear did stall */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00265}00265         td-\/>\mbox{\hyperlink{structatmegadci__td_a572d831107a328069f49b76fb43467ee}{did\_stall}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00266}00266         \textcolor{comment}{/* get the packet byte count */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00267}00267         count =}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00268}00268             (\mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a3153e0ff9e25b299b1a805b58bb6f6ae}{ATMEGA\_UEBCHX}}) << 8) |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00269}00269             (\mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_ad28f09833ff1ad20569e65dd7981d46e}{ATMEGA\_UEBCLX}}));}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00270}00270 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00271}00271         \textcolor{comment}{/* mask away undefined bits */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00272}00272         count \&= 0x7FF;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00273}00273 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00274}00274         \textcolor{comment}{/* verify data length */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00275}00275         \textcolor{keywordflow}{if} (count != td-\/>\mbox{\hyperlink{structatmegadci__td_a5a5dddfa5bf35bb4d12877e48d97fd33}{remainder}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00276}00276                 DPRINTFN(0, \textcolor{stringliteral}{"{}Invalid SETUP packet "{}}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00277}00277                     \textcolor{stringliteral}{"{}length, \%d bytes\(\backslash\)n"{}}, count);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00278}00278                 \textcolor{keywordflow}{goto} not\_complete;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00279}00279         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00280}00280         \textcolor{keywordflow}{if} (count != \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}})) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00281}00281                 DPRINTFN(0, \textcolor{stringliteral}{"{}Unsupported SETUP packet "{}}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00282}00282                     \textcolor{stringliteral}{"{}length, \%d bytes\(\backslash\)n"{}}, count);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00283}00283                 \textcolor{keywordflow}{goto} not\_complete;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00284}00284         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00285}00285         \textcolor{comment}{/* receive data */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00286}00286         \mbox{\hyperlink{atmegadci_8h_ae337cbeaabe5562aa910fefa40c40317}{ATMEGA\_READ\_MULTI\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_ae1aeb249292baeff11e11dfad1b5b568}{ATMEGA\_UEDATX}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00287}00287             (\textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}));}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00288}00288 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00289}00289         \textcolor{comment}{/* copy data into real buffer */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00290}00290         \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(td-\/>\mbox{\hyperlink{structatmegadci__td_a6849a285e12604a1153be745a18292e2}{pc}}, 0, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}));}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00291}00291 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00292}00292         td-\/>\mbox{\hyperlink{structatmegadci__td_a31f39ad9a7f8063b3312bf37304f426a}{offset}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00293}00293         td-\/>\mbox{\hyperlink{structatmegadci__td_a5a5dddfa5bf35bb4d12877e48d97fd33}{remainder}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00294}00294 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00295}00295         \textcolor{comment}{/* sneak peek the set address */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00296}00296         \textcolor{keywordflow}{if} ((\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType == \mbox{\hyperlink{usb_8h_a33c2db425d10f85e7b405035bc015d32}{UT\_WRITE\_DEVICE}}) \&\&}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00297}00297             (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest == \mbox{\hyperlink{usb_8h_a2e5fb48757cb795a44b99af832d6cd7d}{UR\_SET\_ADDRESS}})) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00298}00298                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a43d6a4d61e3dea698b9cf73eb010be94}{sc\_dv\_addr}} = \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue[0] \& 0x7F;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00299}00299                 \textcolor{comment}{/* must write address before ZLP */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00300}00300                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a6e2cb932552c1dff0846fe153c0ea904}{ATMEGA\_UDADDR}}, sc-\/>\mbox{\hyperlink{structatmegadci__softc_a43d6a4d61e3dea698b9cf73eb010be94}{sc\_dv\_addr}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00301}00301         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00302}00302                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a43d6a4d61e3dea698b9cf73eb010be94}{sc\_dv\_addr}} = 0xFF;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00303}00303         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00304}00304 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00305}00305         \textcolor{comment}{/* Clear SETUP packet interrupt and all other previous interrupts */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00306}00306         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a39b2badd93f06d065817e699210e37b6}{ATMEGA\_UEINTX}}, 0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00307}00307         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00308}00308 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00309}00309 not\_complete:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00310}00310         \textcolor{comment}{/* abort any ongoing transfer */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00311}00311         \textcolor{keywordflow}{if} (!td-\/>\mbox{\hyperlink{structatmegadci__td_a572d831107a328069f49b76fb43467ee}{did\_stall}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00312}00312                 DPRINTFN(5, \textcolor{stringliteral}{"{}stalling\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00313}00313                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a9443e514c9ce62d48a8750b551d8a872}{ATMEGA\_UECONX}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00314}00314                     \mbox{\hyperlink{atmegadci_8h_a59e68dadccb67f2bf0bc7eed785b2115}{ATMEGA\_UECONX\_EPEN}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00315}00315                     \mbox{\hyperlink{atmegadci_8h_a6638e843e43e70ee26a8da054ca8358e}{ATMEGA\_UECONX\_STALLRQ}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00316}00316                 td-\/>\mbox{\hyperlink{structatmegadci__td_a572d831107a328069f49b76fb43467ee}{did\_stall}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00317}00317         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00318}00318         \textcolor{keywordflow}{if} (temp \& \mbox{\hyperlink{atmegadci_8h_a1430e20159953711088b1bc8a62bb8c9}{ATMEGA\_UEINTX\_RXSTPI}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00319}00319                 \textcolor{comment}{/* clear SETUP packet interrupt */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00320}00320                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a39b2badd93f06d065817e699210e37b6}{ATMEGA\_UEINTX}}, \string~\mbox{\hyperlink{atmegadci_8h_a1430e20159953711088b1bc8a62bb8c9}{ATMEGA\_UEINTX\_RXSTPI}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00321}00321         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00322}00322         \textcolor{comment}{/* we only want to know if there is a SETUP packet */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00323}00323         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_aff83b68d64fe1822f3ddb6025e5f8e9e}{ATMEGA\_UEIENX}}, \mbox{\hyperlink{atmegadci_8h_ad5fb3eb87cfcd9a677fd4927943e4509}{ATMEGA\_UEIENX\_RXSTPE}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00324}00324         \textcolor{keywordflow}{return} (1);                     \textcolor{comment}{/* not complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00325}00325 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00326}00326 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00327}00327 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00328}\mbox{\hyperlink{atmegadci_8c_a52385fff746dcbfc7ea2250b68f9e1eb}{00328}} \mbox{\hyperlink{atmegadci_8c_a98d2d1f0d111a4e984d9244e2514c63e}{atmegadci\_data\_rx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__td}{atmegadci\_td}} *td)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00329}00329 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00330}00330         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00331}00331         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__search}{usb\_page\_search}} buf\_res;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00332}00332         uint16\_t count;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00333}00333         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00334}00334         uint8\_t to;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00335}00335         uint8\_t got\_short;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00336}00336 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00337}00337         to = 3;                         \textcolor{comment}{/* don't loop forever! */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00338}00338         got\_short = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00339}00339 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00340}00340         \textcolor{comment}{/* get pointer to softc */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00341}00341         sc = \mbox{\hyperlink{atmegadci_8c_abe04a61f1dc462729683c6eee09f56a0}{ATMEGA\_PC2SC}}(td-\/>\mbox{\hyperlink{structatmegadci__td_a6849a285e12604a1153be745a18292e2}{pc}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00342}00342 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00343}00343         \textcolor{comment}{/* select endpoint number */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00344}00344         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a52bcbb543c212e30e09e7fc1ffd652a4}{ATMEGA\_UENUM}}, td-\/>\mbox{\hyperlink{structatmegadci__td_a32e0f8e743b6f949c336e4248b8c3d11}{ep\_no}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00345}00345 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00346}00346 repeat:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00347}00347         \textcolor{comment}{/* check if any of the FIFO banks have data */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00348}00348         \textcolor{comment}{/* check endpoint status */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00349}00349         temp = \mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a39b2badd93f06d065817e699210e37b6}{ATMEGA\_UEINTX}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00350}00350 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00351}00351         DPRINTFN(5, \textcolor{stringliteral}{"{}temp=0x\%02x rem=\%u\(\backslash\)n"{}}, temp, td-\/>\mbox{\hyperlink{structatmegadci__td_a5a5dddfa5bf35bb4d12877e48d97fd33}{remainder}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00352}00352 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00353}00353         \textcolor{keywordflow}{if} (temp \& \mbox{\hyperlink{atmegadci_8h_a1430e20159953711088b1bc8a62bb8c9}{ATMEGA\_UEINTX\_RXSTPI}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00354}00354                 \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structatmegadci__td_a5a5dddfa5bf35bb4d12877e48d97fd33}{remainder}} == 0) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00355}00355                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00356}00356 \textcolor{comment}{                         * We are actually complete and have}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00357}00357 \textcolor{comment}{                         * received the next SETUP}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00358}00358 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00359}00359                         DPRINTFN(5, \textcolor{stringliteral}{"{}faking complete\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00360}00360                         \textcolor{keywordflow}{return} (0);     \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00361}00361                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00362}00362                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00363}00363 \textcolor{comment}{                 * USB Host Aborted the transfer.}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00364}00364 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00365}00365                 td-\/>\mbox{\hyperlink{structatmegadci__td_ab944542b543453785720fe98b671656d}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00366}00366                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00367}00367         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00368}00368         \textcolor{comment}{/* check status */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00369}00369         \textcolor{keywordflow}{if} (!(temp \& (\mbox{\hyperlink{atmegadci_8h_a30379ee921128049e529c66d76a7d367}{ATMEGA\_UEINTX\_FIFOCON}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00370}00370             \mbox{\hyperlink{atmegadci_8h_aa046b7ed16ef2ff3eb0c4b22ab26074f}{ATMEGA\_UEINTX\_RXOUTI}}))) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00371}00371                 \textcolor{comment}{/* no data */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00372}00372                 \textcolor{keywordflow}{goto} not\_complete;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00373}00373         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00374}00374         \textcolor{comment}{/* get the packet byte count */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00375}00375         count =}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00376}00376             (\mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a3153e0ff9e25b299b1a805b58bb6f6ae}{ATMEGA\_UEBCHX}}) << 8) |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00377}00377             (\mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_ad28f09833ff1ad20569e65dd7981d46e}{ATMEGA\_UEBCLX}}));}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00378}00378 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00379}00379         \textcolor{comment}{/* mask away undefined bits */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00380}00380         count \&= 0x7FF;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00381}00381 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00382}00382         \textcolor{comment}{/* verify the packet byte count */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00383}00383         \textcolor{keywordflow}{if} (count != td-\/>\mbox{\hyperlink{structatmegadci__td_a9ece031e9648bc06d5dc1de71100fc84}{max\_packet\_size}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00384}00384                 \textcolor{keywordflow}{if} (count < td-\/>max\_packet\_size) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00385}00385                         \textcolor{comment}{/* we have a short packet */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00386}00386                         td-\/>\mbox{\hyperlink{structatmegadci__td_a64ac3b3736047cad98bd78e0c6859338}{short\_pkt}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00387}00387                         got\_short = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00388}00388                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00389}00389                         \textcolor{comment}{/* invalid USB packet */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00390}00390                         td-\/>\mbox{\hyperlink{structatmegadci__td_ab944542b543453785720fe98b671656d}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00391}00391                         \textcolor{keywordflow}{return} (0);     \textcolor{comment}{/* we are complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00392}00392                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00393}00393         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00394}00394         \textcolor{comment}{/* verify the packet byte count */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00395}00395         \textcolor{keywordflow}{if} (count > td-\/>\mbox{\hyperlink{structatmegadci__td_a5a5dddfa5bf35bb4d12877e48d97fd33}{remainder}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00396}00396                 \textcolor{comment}{/* invalid USB packet */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00397}00397                 td-\/>\mbox{\hyperlink{structatmegadci__td_ab944542b543453785720fe98b671656d}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00398}00398                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* we are complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00399}00399         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00400}00400         \textcolor{keywordflow}{while} (count > 0) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00401}00401                 \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(td-\/>\mbox{\hyperlink{structatmegadci__td_a6849a285e12604a1153be745a18292e2}{pc}}, td-\/>\mbox{\hyperlink{structatmegadci__td_a31f39ad9a7f8063b3312bf37304f426a}{offset}}, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00402}00402 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00403}00403                 \textcolor{comment}{/* get correct length */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00404}00404                 \textcolor{keywordflow}{if} (buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}} > count) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00405}00405                         buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}} = count;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00406}00406                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00407}00407                 \textcolor{comment}{/* receive data */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00408}00408                 \mbox{\hyperlink{atmegadci_8h_ae337cbeaabe5562aa910fefa40c40317}{ATMEGA\_READ\_MULTI\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_ae1aeb249292baeff11e11dfad1b5b568}{ATMEGA\_UEDATX}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00409}00409                     buf\_res.\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}}, buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00410}00410 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00411}00411                 \textcolor{comment}{/* update counters */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00412}00412                 count -\/= buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00413}00413                 td-\/>\mbox{\hyperlink{structatmegadci__td_a31f39ad9a7f8063b3312bf37304f426a}{offset}} += buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00414}00414                 td-\/>\mbox{\hyperlink{structatmegadci__td_a5a5dddfa5bf35bb4d12877e48d97fd33}{remainder}} -\/= buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00415}00415         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00416}00416 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00417}00417         \textcolor{comment}{/* clear OUT packet interrupt */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00418}00418         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a39b2badd93f06d065817e699210e37b6}{ATMEGA\_UEINTX}}, \mbox{\hyperlink{atmegadci_8h_aa046b7ed16ef2ff3eb0c4b22ab26074f}{ATMEGA\_UEINTX\_RXOUTI}} \string^ 0xFF);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00419}00419 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00420}00420         \textcolor{comment}{/* release FIFO bank */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00421}00421         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a39b2badd93f06d065817e699210e37b6}{ATMEGA\_UEINTX}}, \mbox{\hyperlink{atmegadci_8h_a30379ee921128049e529c66d76a7d367}{ATMEGA\_UEINTX\_FIFOCON}} \string^ 0xFF);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00422}00422 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00423}00423         \textcolor{comment}{/* check if we are complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00424}00424         \textcolor{keywordflow}{if} ((td-\/>\mbox{\hyperlink{structatmegadci__td_a5a5dddfa5bf35bb4d12877e48d97fd33}{remainder}} == 0) || got\_short) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00425}00425                 \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structatmegadci__td_a64ac3b3736047cad98bd78e0c6859338}{short\_pkt}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00426}00426                         \textcolor{comment}{/* we are complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00427}00427                         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00428}00428                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00429}00429                 \textcolor{comment}{/* else need to receive a zero length packet */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00430}00430         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00431}00431         \textcolor{keywordflow}{if} (-\/-\/to) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00432}00432                 \textcolor{keywordflow}{goto} repeat;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00433}00433         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00434}00434 not\_complete:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00435}00435         \textcolor{comment}{/* we only want to know if there is a SETUP packet or OUT packet */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00436}00436         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_aff83b68d64fe1822f3ddb6025e5f8e9e}{ATMEGA\_UEIENX}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00437}00437             \mbox{\hyperlink{atmegadci_8h_ad5fb3eb87cfcd9a677fd4927943e4509}{ATMEGA\_UEIENX\_RXSTPE}} | \mbox{\hyperlink{atmegadci_8h_a804f59390bc09d30028706e9ca51b3da}{ATMEGA\_UEIENX\_RXOUTE}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00438}00438         \textcolor{keywordflow}{return} (1);                     \textcolor{comment}{/* not complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00439}00439 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00440}00440 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00441}00441 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00442}\mbox{\hyperlink{atmegadci_8c_a1d2e49353bc0f9ba8a501197c8e266d9}{00442}} \mbox{\hyperlink{atmegadci_8c_a902e28d283d3fec9189ed902f5fd078c}{atmegadci\_data\_tx}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__td}{atmegadci\_td}} *td)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00443}00443 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00444}00444         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00445}00445         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__search}{usb\_page\_search}} buf\_res;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00446}00446         uint16\_t count;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00447}00447         uint8\_t to;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00448}00448         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00449}00449 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00450}00450         to = 3;                         \textcolor{comment}{/* don't loop forever! */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00451}00451 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00452}00452         \textcolor{comment}{/* get pointer to softc */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00453}00453         sc = \mbox{\hyperlink{atmegadci_8c_abe04a61f1dc462729683c6eee09f56a0}{ATMEGA\_PC2SC}}(td-\/>\mbox{\hyperlink{structatmegadci__td_a6849a285e12604a1153be745a18292e2}{pc}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00454}00454 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00455}00455         \textcolor{comment}{/* select endpoint number */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00456}00456         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a52bcbb543c212e30e09e7fc1ffd652a4}{ATMEGA\_UENUM}}, td-\/>\mbox{\hyperlink{structatmegadci__td_a32e0f8e743b6f949c336e4248b8c3d11}{ep\_no}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00457}00457 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00458}00458 repeat:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00459}00459 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00460}00460         \textcolor{comment}{/* check endpoint status */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00461}00461         temp = \mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a39b2badd93f06d065817e699210e37b6}{ATMEGA\_UEINTX}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00462}00462 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00463}00463         DPRINTFN(5, \textcolor{stringliteral}{"{}temp=0x\%02x rem=\%u\(\backslash\)n"{}}, temp, td-\/>\mbox{\hyperlink{structatmegadci__td_a5a5dddfa5bf35bb4d12877e48d97fd33}{remainder}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00464}00464 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00465}00465         \textcolor{keywordflow}{if} (temp \& \mbox{\hyperlink{atmegadci_8h_a1430e20159953711088b1bc8a62bb8c9}{ATMEGA\_UEINTX\_RXSTPI}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00466}00466                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00467}00467 \textcolor{comment}{                 * The current transfer was aborted}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00468}00468 \textcolor{comment}{                 * by the USB Host}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00469}00469 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00470}00470                 td-\/>\mbox{\hyperlink{structatmegadci__td_ab944542b543453785720fe98b671656d}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00471}00471                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00472}00472         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00473}00473 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00474}00474         temp = \mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_ab8e43d037844eca9122bdc0a918a329f}{ATMEGA\_UESTA0X}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00475}00475         \textcolor{keywordflow}{if} (temp \& 3) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00476}00476                 \textcolor{comment}{/* cannot write any data -\/ a bank is busy */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00477}00477                 \textcolor{keywordflow}{goto} not\_complete;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00478}00478         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00479}00479 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00480}00480         count = td-\/>\mbox{\hyperlink{structatmegadci__td_a9ece031e9648bc06d5dc1de71100fc84}{max\_packet\_size}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00481}00481         \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structatmegadci__td_a5a5dddfa5bf35bb4d12877e48d97fd33}{remainder}} < count) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00482}00482                 \textcolor{comment}{/* we have a short packet */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00483}00483                 td-\/>\mbox{\hyperlink{structatmegadci__td_a64ac3b3736047cad98bd78e0c6859338}{short\_pkt}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00484}00484                 count = td-\/>\mbox{\hyperlink{structatmegadci__td_a5a5dddfa5bf35bb4d12877e48d97fd33}{remainder}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00485}00485         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00486}00486         \textcolor{keywordflow}{while} (count > 0) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00487}00487                 \mbox{\hyperlink{usb__busdma_8c_ab4f9d07714be540b6d002b44b3716bb2}{usbd\_get\_page}}(td-\/>\mbox{\hyperlink{structatmegadci__td_a6849a285e12604a1153be745a18292e2}{pc}}, td-\/>\mbox{\hyperlink{structatmegadci__td_a31f39ad9a7f8063b3312bf37304f426a}{offset}}, \&buf\_res);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00488}00488 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00489}00489                 \textcolor{comment}{/* get correct length */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00490}00490                 \textcolor{keywordflow}{if} (buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}} > count) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00491}00491                         buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}} = count;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00492}00492                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00493}00493                 \textcolor{comment}{/* transmit data */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00494}00494                 \mbox{\hyperlink{atmegadci_8h_a4cba59a21d80e6985cdc47cd3fd24e4a}{ATMEGA\_WRITE\_MULTI\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_ae1aeb249292baeff11e11dfad1b5b568}{ATMEGA\_UEDATX}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00495}00495                     buf\_res.\mbox{\hyperlink{structusb__page__search_a60cd5ce1bbfbf2d2dec7677b1ba9b01a}{buffer}}, buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00496}00496 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00497}00497                 \textcolor{comment}{/* update counters */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00498}00498                 count -\/= buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00499}00499                 td-\/>\mbox{\hyperlink{structatmegadci__td_a31f39ad9a7f8063b3312bf37304f426a}{offset}} += buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00500}00500                 td-\/>\mbox{\hyperlink{structatmegadci__td_a5a5dddfa5bf35bb4d12877e48d97fd33}{remainder}} -\/= buf\_res.\mbox{\hyperlink{structusb__page__search_add91edb75c219e6992906292ae22bb26}{length}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00501}00501         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00502}00502 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00503}00503         \textcolor{comment}{/* clear IN packet interrupt */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00504}00504         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a39b2badd93f06d065817e699210e37b6}{ATMEGA\_UEINTX}}, 0xFF \string^ \mbox{\hyperlink{atmegadci_8h_a504a01c8fdd69cb5c9ec7dc027c7b6ce}{ATMEGA\_UEINTX\_TXINI}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00505}00505 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00506}00506         \textcolor{comment}{/* allocate FIFO bank */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00507}00507         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a39b2badd93f06d065817e699210e37b6}{ATMEGA\_UEINTX}}, 0xFF \string^ \mbox{\hyperlink{atmegadci_8h_a30379ee921128049e529c66d76a7d367}{ATMEGA\_UEINTX\_FIFOCON}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00508}00508 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00509}00509         \textcolor{comment}{/* check remainder */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00510}00510         \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structatmegadci__td_a5a5dddfa5bf35bb4d12877e48d97fd33}{remainder}} == 0) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00511}00511                 \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structatmegadci__td_a64ac3b3736047cad98bd78e0c6859338}{short\_pkt}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00512}00512                         \textcolor{keywordflow}{return} (0);     \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00513}00513                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00514}00514                 \textcolor{comment}{/* else we need to transmit a short packet */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00515}00515         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00516}00516         \textcolor{keywordflow}{if} (-\/-\/to) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00517}00517                 \textcolor{keywordflow}{goto} repeat;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00518}00518         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00519}00519 not\_complete:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00520}00520         \textcolor{comment}{/* we only want to know if there is a SETUP packet or free IN packet */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00521}00521         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_aff83b68d64fe1822f3ddb6025e5f8e9e}{ATMEGA\_UEIENX}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00522}00522             \mbox{\hyperlink{atmegadci_8h_ad5fb3eb87cfcd9a677fd4927943e4509}{ATMEGA\_UEIENX\_RXSTPE}} | \mbox{\hyperlink{atmegadci_8h_a1887a865f6eb974c1d892282d53d331e}{ATMEGA\_UEIENX\_TXINE}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00523}00523         \textcolor{keywordflow}{return} (1);                     \textcolor{comment}{/* not complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00524}00524 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00525}00525 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00526}00526 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00527}\mbox{\hyperlink{atmegadci_8c_a0d477d91f62e7ea9c6283e29612f8016}{00527}} \mbox{\hyperlink{atmegadci_8c_a90de04b5e9bde5aa6db6ea3f8eef65dd}{atmegadci\_data\_tx\_sync}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__td}{atmegadci\_td}} *td)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00528}00528 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00529}00529         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00530}00530         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00531}00531 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00532}00532         \textcolor{comment}{/* get pointer to softc */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00533}00533         sc = \mbox{\hyperlink{atmegadci_8c_abe04a61f1dc462729683c6eee09f56a0}{ATMEGA\_PC2SC}}(td-\/>\mbox{\hyperlink{structatmegadci__td_a6849a285e12604a1153be745a18292e2}{pc}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00534}00534 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00535}00535         \textcolor{comment}{/* select endpoint number */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00536}00536         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a52bcbb543c212e30e09e7fc1ffd652a4}{ATMEGA\_UENUM}}, td-\/>\mbox{\hyperlink{structatmegadci__td_a32e0f8e743b6f949c336e4248b8c3d11}{ep\_no}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00537}00537 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00538}00538         \textcolor{comment}{/* check endpoint status */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00539}00539         temp = \mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a39b2badd93f06d065817e699210e37b6}{ATMEGA\_UEINTX}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00540}00540 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00541}00541         DPRINTFN(5, \textcolor{stringliteral}{"{}temp=0x\%02x\(\backslash\)n"{}}, temp);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00542}00542 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00543}00543         \textcolor{keywordflow}{if} (temp \& \mbox{\hyperlink{atmegadci_8h_a1430e20159953711088b1bc8a62bb8c9}{ATMEGA\_UEINTX\_RXSTPI}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00544}00544                 DPRINTFN(5, \textcolor{stringliteral}{"{}faking complete\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00545}00545                 \textcolor{comment}{/* Race condition */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00546}00546                 \textcolor{keywordflow}{return} (0);             \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00547}00547         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00548}00548         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00549}00549 \textcolor{comment}{         * The control endpoint has only got one bank, so if that bank}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00550}00550 \textcolor{comment}{         * is free the packet has been transferred!}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00551}00551 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00552}00552         temp = \mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_ab8e43d037844eca9122bdc0a918a329f}{ATMEGA\_UESTA0X}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00553}00553         \textcolor{keywordflow}{if} (temp \& 3) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00554}00554                 \textcolor{comment}{/* cannot write any data -\/ a bank is busy */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00555}00555                 \textcolor{keywordflow}{goto} not\_complete;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00556}00556         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00557}00557         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a43d6a4d61e3dea698b9cf73eb010be94}{sc\_dv\_addr}} != 0xFF) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00558}00558                 \textcolor{comment}{/* set new address */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00559}00559                 \mbox{\hyperlink{atmegadci_8c_a68c5805d306072199685a01718b07012}{atmegadci\_set\_address}}(sc, sc-\/>\mbox{\hyperlink{structatmegadci__softc_a43d6a4d61e3dea698b9cf73eb010be94}{sc\_dv\_addr}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00560}00560         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00561}00561         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00562}00562 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00563}00563 not\_complete:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00564}00564         \textcolor{comment}{/* we only want to know if there is a SETUP packet or free IN packet */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00565}00565         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_aff83b68d64fe1822f3ddb6025e5f8e9e}{ATMEGA\_UEIENX}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00566}00566             \mbox{\hyperlink{atmegadci_8h_ad5fb3eb87cfcd9a677fd4927943e4509}{ATMEGA\_UEIENX\_RXSTPE}} | \mbox{\hyperlink{atmegadci_8h_a1887a865f6eb974c1d892282d53d331e}{ATMEGA\_UEIENX\_TXINE}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00567}00567         \textcolor{keywordflow}{return} (1);                     \textcolor{comment}{/* not complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00568}00568 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00569}00569 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00570}00570 \textcolor{keyword}{static} uint8\_t}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00571}\mbox{\hyperlink{atmegadci_8c_ae40e2aef4126ac1ca821c9c601103480}{00571}} \mbox{\hyperlink{atmegadci_8c_ae40e2aef4126ac1ca821c9c601103480}{atmegadci\_xfer\_do\_fifo}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00572}00572 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00573}00573         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__td}{atmegadci\_td}} *td;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00574}00574 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00575}00575         DPRINTFN(9, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00576}00576 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00577}00577         td = xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00578}00578         \textcolor{keywordflow}{while} (1) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00579}00579                 \textcolor{keywordflow}{if} ((td-\/>\mbox{\hyperlink{structatmegadci__td_a5079ecc94ecbc7310b34f54f5e0c2eef}{func}}) (td)) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00580}00580                         \textcolor{comment}{/* operation in progress */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00581}00581                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00582}00582                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00583}00583                 \textcolor{keywordflow}{if} (((\textcolor{keywordtype}{void} *)td) == xfer-\/>\mbox{\hyperlink{structusb__xfer_ae74733ea0d49027c19477ea63a223f26}{td\_transfer\_last}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00584}00584                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00585}00585                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00586}00586                 \textcolor{keywordflow}{if} (td-\/>error) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00587}00587                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00588}00588                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (td-\/>remainder > 0) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00589}00589                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00590}00590 \textcolor{comment}{                         * We had a short transfer. If there is no alternate}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00591}00591 \textcolor{comment}{                         * next, stop processing !}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00592}00592 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00593}00593                         \textcolor{keywordflow}{if} (!td-\/>alt\_next) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00594}00594                                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00595}00595                         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00596}00596                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00597}00597                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00598}00598 \textcolor{comment}{                 * Fetch the next transfer descriptor and transfer}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00599}00599 \textcolor{comment}{                 * some flags to the next transfer descriptor}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00600}00600 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00601}00601                 td = td-\/>obj\_next;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00602}00602                 xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} = td;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00603}00603         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00604}00604         \textcolor{keywordflow}{return} (1);                     \textcolor{comment}{/* not complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00605}00605 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00606}00606 done:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00607}00607         \textcolor{comment}{/* compute all actual lengths */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00608}00608 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00609}00609         \mbox{\hyperlink{atmegadci_8c_a87fd630fad0c899eacff699448abc88e}{atmegadci\_standard\_done}}(xfer);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00610}00610         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00611}00611 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00612}00612 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00613}00613 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00614}\mbox{\hyperlink{atmegadci_8c_a568389a02c13aa71e5a7f1f550e07838}{00614}} \mbox{\hyperlink{atmegadci_8c_a568389a02c13aa71e5a7f1f550e07838}{atmegadci\_interrupt\_poll}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00615}00615 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00616}00616         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00617}00617 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00618}00618 repeat:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00619}00619         TAILQ\_FOREACH(xfer, \&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_afe87bf7e25fe7284a87d14ca231bc818}{intr\_q}}.head, wait\_entry) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00620}00620                 \textcolor{keywordflow}{if} (!\mbox{\hyperlink{atmegadci_8c_ae40e2aef4126ac1ca821c9c601103480}{atmegadci\_xfer\_do\_fifo}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00621}00621                         \textcolor{comment}{/* queue has been modified */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00622}00622                         \textcolor{keywordflow}{goto} repeat;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00623}00623                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00624}00624         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00625}00625 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00626}00626 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00627}00627 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00628}\mbox{\hyperlink{atmegadci_8c_af895042a26ea7cc879a2d61ccfecddb3}{00628}} \mbox{\hyperlink{atmegadci_8c_af895042a26ea7cc879a2d61ccfecddb3}{atmegadci\_vbus\_interrupt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc, uint8\_t is\_on)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00629}00629 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00630}00630         DPRINTFN(5, \textcolor{stringliteral}{"{}vbus = \%u\(\backslash\)n"{}}, is\_on);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00631}00631 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00632}00632         \textcolor{keywordflow}{if} (is\_on) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00633}00633                 \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a9f76fc77a39d63eb9abe227c619115d4}{status\_vbus}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00634}00634                         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a9f76fc77a39d63eb9abe227c619115d4}{status\_vbus}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00635}00635 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00636}00636                         \textcolor{comment}{/* complete root HUB interrupt endpoint */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00637}00637 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00638}00638                         \mbox{\hyperlink{atmegadci_8c_aa12c0de7fbeebc3fcbdcf546215e2f13}{atmegadci\_root\_intr}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00639}00639                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00640}00640         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00641}00641                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a9f76fc77a39d63eb9abe227c619115d4}{status\_vbus}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00642}00642                         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a9f76fc77a39d63eb9abe227c619115d4}{status\_vbus}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00643}00643                         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a40170bb08e65486444daf167f313fd58}{status\_bus\_reset}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00644}00644                         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_ae8096abd5d44a92e25e9204ecb7c4415}{status\_suspend}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00645}00645                         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a814ac303c9fc29823f328665be7ae7e8}{change\_suspend}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00646}00646                         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_aa3182d5dd2f69694b3abc8068df783da}{change\_connect}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00647}00647 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00648}00648                         \textcolor{comment}{/* complete root HUB interrupt endpoint */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00649}00649 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00650}00650                         \mbox{\hyperlink{atmegadci_8c_aa12c0de7fbeebc3fcbdcf546215e2f13}{atmegadci\_root\_intr}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00651}00651                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00652}00652         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00653}00653 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00654}00654 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00655}00655 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00656}\mbox{\hyperlink{atmegadci_8c_a9e82477f1d253103866f0aa954f78b32}{00656}} \mbox{\hyperlink{atmegadci_8c_a9e82477f1d253103866f0aa954f78b32}{atmegadci\_interrupt}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00657}00657 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00658}00658         uint8\_t \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00659}00659 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00660}00660         \mbox{\hyperlink{usb__core_8h_a21dab1de8f52baf9fbf7617c6b1ec033}{USB\_BUS\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00661}00661 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00662}00662         \textcolor{comment}{/* read interrupt status */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00663}00663         \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = \mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a64e53c6612ebf31936ec3eb2cfbe5489}{ATMEGA\_UDINT}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00664}00664 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00665}00665         \textcolor{comment}{/* clear all set interrupts */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00666}00666         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a64e53c6612ebf31936ec3eb2cfbe5489}{ATMEGA\_UDINT}}, (\string~\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}}) \& 0x7D);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00667}00667 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00668}00668         DPRINTFN(14, \textcolor{stringliteral}{"{}UDINT=0x\%02x\(\backslash\)n"{}}, \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00669}00669 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00670}00670         \textcolor{comment}{/* check for any bus state change interrupts */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00671}00671         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{atmegadci_8h_af11ca0b6657cade0485d94935b645eb8}{ATMEGA\_UDINT\_EORSTI}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00672}00672                 DPRINTFN(5, \textcolor{stringliteral}{"{}end of reset\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00673}00673 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00674}00674                 \textcolor{comment}{/* set correct state */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00675}00675                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a40170bb08e65486444daf167f313fd58}{status\_bus\_reset}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00676}00676                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_ae8096abd5d44a92e25e9204ecb7c4415}{status\_suspend}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00677}00677                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a814ac303c9fc29823f328665be7ae7e8}{change\_suspend}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00678}00678                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_aa3182d5dd2f69694b3abc8068df783da}{change\_connect}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00679}00679 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00680}00680                 \textcolor{comment}{/* disable resume interrupt */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00681}00681                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_acf447da2e83e37948a92a72f2ecb2e12}{ATMEGA\_UDIEN}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00682}00682                     \mbox{\hyperlink{atmegadci_8h_ac039c732348212cb4a2b645fa54ccadc}{ATMEGA\_UDINT\_SUSPE}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00683}00683                     \mbox{\hyperlink{atmegadci_8h_abaa1203667539aee23366453e0c709eb}{ATMEGA\_UDINT\_EORSTE}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00684}00684 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00685}00685                 \textcolor{comment}{/* complete root HUB interrupt endpoint */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00686}00686                 \mbox{\hyperlink{atmegadci_8c_aa12c0de7fbeebc3fcbdcf546215e2f13}{atmegadci\_root\_intr}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00687}00687         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00688}00688         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00689}00689 \textcolor{comment}{         * If resume and suspend is set at the same time we interpret}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00690}00690 \textcolor{comment}{         * that like RESUME. Resume is set when there is at least 3}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00691}00691 \textcolor{comment}{         * milliseconds of inactivity on the USB BUS.}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00692}00692 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00693}00693         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{atmegadci_8h_a90db9a0f77a9b6600576ede5efa9ed79}{ATMEGA\_UDINT\_WAKEUPI}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00694}00694                 DPRINTFN(5, \textcolor{stringliteral}{"{}resume interrupt\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00695}00695 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00696}00696                 \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_ae8096abd5d44a92e25e9204ecb7c4415}{status\_suspend}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00697}00697                         \textcolor{comment}{/* update status bits */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00698}00698                         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_ae8096abd5d44a92e25e9204ecb7c4415}{status\_suspend}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00699}00699                         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a814ac303c9fc29823f328665be7ae7e8}{change\_suspend}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00700}00700 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00701}00701                         \textcolor{comment}{/* disable resume interrupt */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00702}00702                         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_acf447da2e83e37948a92a72f2ecb2e12}{ATMEGA\_UDIEN}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00703}00703                             \mbox{\hyperlink{atmegadci_8h_ac039c732348212cb4a2b645fa54ccadc}{ATMEGA\_UDINT\_SUSPE}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00704}00704                             \mbox{\hyperlink{atmegadci_8h_abaa1203667539aee23366453e0c709eb}{ATMEGA\_UDINT\_EORSTE}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00705}00705 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00706}00706                         \textcolor{comment}{/* complete root HUB interrupt endpoint */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00707}00707                         \mbox{\hyperlink{atmegadci_8c_aa12c0de7fbeebc3fcbdcf546215e2f13}{atmegadci\_root\_intr}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00708}00708                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00709}00709         \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{atmegadci_8h_a7d820c3173b933f5494a765ea6bcc73a}{ATMEGA\_UDINT\_SUSPI}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00710}00710                 DPRINTFN(5, \textcolor{stringliteral}{"{}suspend interrupt\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00711}00711 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00712}00712                 \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_ae8096abd5d44a92e25e9204ecb7c4415}{status\_suspend}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00713}00713                         \textcolor{comment}{/* update status bits */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00714}00714                         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_ae8096abd5d44a92e25e9204ecb7c4415}{status\_suspend}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00715}00715                         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a814ac303c9fc29823f328665be7ae7e8}{change\_suspend}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00716}00716 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00717}00717                         \textcolor{comment}{/* disable suspend interrupt */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00718}00718                         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_acf447da2e83e37948a92a72f2ecb2e12}{ATMEGA\_UDIEN}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00719}00719                             \mbox{\hyperlink{atmegadci_8h_a399e708865a990dad7782c93a8145dab}{ATMEGA\_UDINT\_WAKEUPE}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00720}00720                             \mbox{\hyperlink{atmegadci_8h_abaa1203667539aee23366453e0c709eb}{ATMEGA\_UDINT\_EORSTE}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00721}00721 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00722}00722                         \textcolor{comment}{/* complete root HUB interrupt endpoint */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00723}00723                         \mbox{\hyperlink{atmegadci_8c_aa12c0de7fbeebc3fcbdcf546215e2f13}{atmegadci\_root\_intr}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00724}00724                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00725}00725         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00726}00726         \textcolor{comment}{/* check VBUS */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00727}00727         \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = \mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_ad719b451256717249f6c22721c820913}{ATMEGA\_USBINT}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00728}00728 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00729}00729         \textcolor{comment}{/* clear all set interrupts */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00730}00730         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_ad719b451256717249f6c22721c820913}{ATMEGA\_USBINT}}, (\string~\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}}) \& 0x03);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00731}00731 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00732}00732         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} \& \mbox{\hyperlink{atmegadci_8h_a2075abd487e70efafcc58a897424cf93}{ATMEGA\_USBINT\_VBUSTI}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00733}00733                 uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00734}00734 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00735}00735                 DPRINTFN(5, \textcolor{stringliteral}{"{}USBINT=0x\%02x\(\backslash\)n"{}}, \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00736}00736 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00737}00737                 temp = \mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a158a011ffc65e62a5d2c523b9a809b01}{ATMEGA\_USBSTA}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00738}00738                 \mbox{\hyperlink{atmegadci_8c_af895042a26ea7cc879a2d61ccfecddb3}{atmegadci\_vbus\_interrupt}}(sc, temp \& \mbox{\hyperlink{atmegadci_8h_ae1584367c935546201e6347341511388}{ATMEGA\_USBSTA\_VBUS}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00739}00739         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00740}00740         \textcolor{comment}{/* check for any endpoint interrupts */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00741}00741         \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}} = \mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_aed256dbf16e77ab6378790e49b10e10a}{ATMEGA\_UEINT}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00742}00742         \textcolor{comment}{/* the hardware will clear the UEINT bits automatically */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00743}00743         \textcolor{keywordflow}{if} (\mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00744}00744                 DPRINTFN(5, \textcolor{stringliteral}{"{}real endpoint interrupt UEINT=0x\%02x\(\backslash\)n"{}}, \mbox{\hyperlink{xhci_8h_ade818037fd6c985038ff29656089758d}{status}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00745}00745 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00746}00746                 \mbox{\hyperlink{atmegadci_8c_a568389a02c13aa71e5a7f1f550e07838}{atmegadci\_interrupt\_poll}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00747}00747         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00748}00748         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00749}00749 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00750}00750 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00751}00751 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00752}\mbox{\hyperlink{atmegadci_8c_a42217ba58a90c5269dade9a1929f0603}{00752}} \mbox{\hyperlink{atmegadci_8c_a42217ba58a90c5269dade9a1929f0603}{atmegadci\_setup\_standard\_chain\_sub}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__std__temp}{atmegadci\_std\_temp}} *temp)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00753}00753 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00754}00754         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__td}{atmegadci\_td}} *td;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00755}00755 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00756}00756         \textcolor{comment}{/* get current Transfer Descriptor */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00757}00757         td = temp-\/>\mbox{\hyperlink{structatmegadci__std__temp_acb57d0077cc31f25cb71d46b20972f64}{td\_next}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00758}00758         temp-\/>\mbox{\hyperlink{structatmegadci__std__temp_a58704b041a1f3a8448ec910d41733484}{td}} = td;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00759}00759 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00760}00760         \textcolor{comment}{/* prepare for next TD */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00761}00761         temp-\/>\mbox{\hyperlink{structatmegadci__std__temp_acb57d0077cc31f25cb71d46b20972f64}{td\_next}} = td-\/>\mbox{\hyperlink{structatmegadci__td_af764916e1c905c07d91716073860021f}{obj\_next}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00762}00762 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00763}00763         \textcolor{comment}{/* fill out the Transfer Descriptor */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00764}00764         td-\/>\mbox{\hyperlink{structatmegadci__td_a5079ecc94ecbc7310b34f54f5e0c2eef}{func}} = temp-\/>\mbox{\hyperlink{structatmegadci__std__temp_aab4e6bc6e5080420751000e69f57a012}{func}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00765}00765         td-\/>\mbox{\hyperlink{structatmegadci__td_a6849a285e12604a1153be745a18292e2}{pc}} = temp-\/>\mbox{\hyperlink{structatmegadci__std__temp_a8265fa9dc17b95abb11d85ce5b7b2f22}{pc}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00766}00766         td-\/>\mbox{\hyperlink{structatmegadci__td_a31f39ad9a7f8063b3312bf37304f426a}{offset}} = temp-\/>\mbox{\hyperlink{structatmegadci__std__temp_a20c2e34158ca1cd39b1179d40733dac0}{offset}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00767}00767         td-\/>\mbox{\hyperlink{structatmegadci__td_a5a5dddfa5bf35bb4d12877e48d97fd33}{remainder}} = temp-\/>\mbox{\hyperlink{structatmegadci__std__temp_a75282c34842b0b1b72fd506f8c8bb215}{len}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00768}00768         td-\/>\mbox{\hyperlink{structatmegadci__td_ab944542b543453785720fe98b671656d}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00769}00769         td-\/>\mbox{\hyperlink{structatmegadci__td_a572d831107a328069f49b76fb43467ee}{did\_stall}} = temp-\/>\mbox{\hyperlink{structatmegadci__std__temp_adf6dc83b14ee1be835d1f25212e665c1}{did\_stall}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00770}00770         td-\/>\mbox{\hyperlink{structatmegadci__td_a64ac3b3736047cad98bd78e0c6859338}{short\_pkt}} = temp-\/>\mbox{\hyperlink{structatmegadci__std__temp_ac8786cee46cfa57a98cc3147b8d2987f}{short\_pkt}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00771}00771         td-\/>\mbox{\hyperlink{structatmegadci__td_a9aa3fee5a878a1b65ab5b914a4cb9c80}{alt\_next}} = temp-\/>\mbox{\hyperlink{structatmegadci__std__temp_a9811278bec001c64bd4167085e02774d}{setup\_alt\_next}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00772}00772 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00773}00773 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00774}00774 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00775}\mbox{\hyperlink{atmegadci_8c_a5113301d01f739481786b90b45bf7b4b}{00775}} \mbox{\hyperlink{atmegadci_8c_a5113301d01f739481786b90b45bf7b4b}{atmegadci\_setup\_standard\_chain}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00776}00776 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00777}00777         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__std__temp}{atmegadci\_std\_temp}} temp;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00778}00778         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00779}00779         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__td}{atmegadci\_td}} *td;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00780}00780         uint32\_t x;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00781}00781         uint8\_t \mbox{\hyperlink{structatmegadci__td_a32e0f8e743b6f949c336e4248b8c3d11}{ep\_no}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00782}00782         uint8\_t need\_sync;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00783}00783 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00784}00784         DPRINTFN(9, \textcolor{stringliteral}{"{}addr=\%d endpt=\%d sumlen=\%d speed=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00785}00785             xfer-\/>\mbox{\hyperlink{structusb__xfer_a8ff4ea2a405466a9ce1d9a154a535f0b}{address}}, \mbox{\hyperlink{usb_8h_a5c87169fa1d69d81d7ac06bd59265243}{UE\_GET\_ADDR}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}}),}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00786}00786             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{atmegadci_8c_source_l00787}00787 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00788}00788         temp.\mbox{\hyperlink{structatmegadci__std__temp_a49e01cbd9b35ece72178270577ef09c8}{max\_frame\_size}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae115ce000f084f7d5f8c005fa88d2703}{max\_frame\_size}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00789}00789 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00790}00790         td = xfer-\/>\mbox{\hyperlink{structusb__xfer_a68f3cea7860d801fe4e03b3301c9381d}{td\_start}}[0];}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00791}00791         xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}} = td;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00792}00792         xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} = td;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00793}00793 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00794}00794         \textcolor{comment}{/* setup temp */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00795}00795 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00796}00796         temp.\mbox{\hyperlink{structatmegadci__std__temp_a8265fa9dc17b95abb11d85ce5b7b2f22}{pc}} = NULL;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00797}00797         temp.\mbox{\hyperlink{structatmegadci__std__temp_a58704b041a1f3a8448ec910d41733484}{td}} = NULL;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00798}00798         temp.\mbox{\hyperlink{structatmegadci__std__temp_acb57d0077cc31f25cb71d46b20972f64}{td\_next}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a68f3cea7860d801fe4e03b3301c9381d}{td\_start}}[0];}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00799}00799         temp.\mbox{\hyperlink{structatmegadci__std__temp_a20c2e34158ca1cd39b1179d40733dac0}{offset}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00800}00800         temp.\mbox{\hyperlink{structatmegadci__std__temp_a9811278bec001c64bd4167085e02774d}{setup\_alt\_next}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a1023a81a83c7acfbe3134100363e7fde}{short\_frames\_ok}} ||}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00801}00801             xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a5367e64daae30f55ec887872d577fa80}{isochronous\_xfr}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00802}00802         temp.\mbox{\hyperlink{structatmegadci__std__temp_adf6dc83b14ee1be835d1f25212e665c1}{did\_stall}} = !xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a62d0b716bbeed6d1abd325baf168f145}{control\_stall}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00803}00803 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00804}00804         sc = \mbox{\hyperlink{atmegadci_8c_a4ec0c34c8aa990c317e29a58e91ae4b9}{ATMEGA\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00805}00805         \mbox{\hyperlink{structatmegadci__td_a32e0f8e743b6f949c336e4248b8c3d11}{ep\_no}} = (xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}} \& \mbox{\hyperlink{usb_8h_a227db1f194f105a22faae81401d3e18e}{UE\_ADDR}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00806}00806 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00807}00807         \textcolor{comment}{/* check if we should prepend a setup message */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00808}00808 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00809}00809         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00810}00810                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a0add2c86d09b768df5f354746b8fe16f}{control\_hdr}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00811}00811                         temp.\mbox{\hyperlink{structatmegadci__std__temp_aab4e6bc6e5080420751000e69f57a012}{func}} = \&\mbox{\hyperlink{atmegadci_8c_a2255ce8e367c4a3a7f73b6f2cbe489f2}{atmegadci\_setup\_rx}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00812}00812                         temp.\mbox{\hyperlink{structatmegadci__std__temp_a75282c34842b0b1b72fd506f8c8bb215}{len}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a04bfeb929b15a30d355f94eb7ff2a586}{frlengths}}[0];}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00813}00813                         temp.\mbox{\hyperlink{structatmegadci__std__temp_a8265fa9dc17b95abb11d85ce5b7b2f22}{pc}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}} + 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00814}00814                         temp.\mbox{\hyperlink{structatmegadci__std__temp_ac8786cee46cfa57a98cc3147b8d2987f}{short\_pkt}} = temp.\mbox{\hyperlink{structatmegadci__std__temp_a75282c34842b0b1b72fd506f8c8bb215}{len}} ? 1 : 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00815}00815                         \textcolor{comment}{/* check for last frame */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00816}00816                         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}} == 1) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00817}00817                                 \textcolor{comment}{/* no STATUS stage yet, SETUP is last */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00818}00818                                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a100da5a86a7ab85605683dc51d48ef86}{control\_act}})}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00819}00819                                         temp.\mbox{\hyperlink{structatmegadci__std__temp_a9811278bec001c64bd4167085e02774d}{setup\_alt\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00820}00820                         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00821}00821 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00822}00822                         \mbox{\hyperlink{atmegadci_8c_a42217ba58a90c5269dade9a1929f0603}{atmegadci\_setup\_standard\_chain\_sub}}(\&temp);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00823}00823                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00824}00824                 x = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00825}00825         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00826}00826                 x = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00827}00827         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00828}00828 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00829}00829         \textcolor{keywordflow}{if} (x != xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00830}00830                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}} \& \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00831}00831                         temp.\mbox{\hyperlink{structatmegadci__std__temp_aab4e6bc6e5080420751000e69f57a012}{func}} = \&\mbox{\hyperlink{atmegadci_8c_a902e28d283d3fec9189ed902f5fd078c}{atmegadci\_data\_tx}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00832}00832                         need\_sync = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00833}00833                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00834}00834                         temp.\mbox{\hyperlink{structatmegadci__std__temp_aab4e6bc6e5080420751000e69f57a012}{func}} = \&\mbox{\hyperlink{atmegadci_8c_a98d2d1f0d111a4e984d9244e2514c63e}{atmegadci\_data\_rx}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00835}00835                         need\_sync = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00836}00836                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00837}00837 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00838}00838                 \textcolor{comment}{/* setup "{}pc"{} pointer */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00839}00839                 temp.\mbox{\hyperlink{structatmegadci__std__temp_a8265fa9dc17b95abb11d85ce5b7b2f22}{pc}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}} + x;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00840}00840         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00841}00841                 need\_sync = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00842}00842         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00843}00843         \textcolor{keywordflow}{while} (x != xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00844}00844                 \textcolor{comment}{/* DATA0 / DATA1 message */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00845}00845 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00846}00846                 temp.\mbox{\hyperlink{structatmegadci__std__temp_a75282c34842b0b1b72fd506f8c8bb215}{len}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a04bfeb929b15a30d355f94eb7ff2a586}{frlengths}}[x];}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00847}00847 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00848}00848                 x++;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00849}00849 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00850}00850                 \textcolor{keywordflow}{if} (x == xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00851}00851                         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00852}00852                                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a100da5a86a7ab85605683dc51d48ef86}{control\_act}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00853}00853                                         temp.\mbox{\hyperlink{structatmegadci__std__temp_a9811278bec001c64bd4167085e02774d}{setup\_alt\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00854}00854                                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00855}00855                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00856}00856                                 temp.\mbox{\hyperlink{structatmegadci__std__temp_a9811278bec001c64bd4167085e02774d}{setup\_alt\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00857}00857                         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00858}00858                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00859}00859                 \textcolor{keywordflow}{if} (temp.\mbox{\hyperlink{structatmegadci__std__temp_a75282c34842b0b1b72fd506f8c8bb215}{len}} == 0) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00860}00860                         \textcolor{comment}{/* make sure that we send an USB packet */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00861}00861 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00862}00862                         temp.\mbox{\hyperlink{structatmegadci__std__temp_ac8786cee46cfa57a98cc3147b8d2987f}{short\_pkt}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00863}00863 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00864}00864                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00865}00865                         \textcolor{comment}{/* regular data transfer */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00866}00866 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00867}00867                         temp.\mbox{\hyperlink{structatmegadci__std__temp_ac8786cee46cfa57a98cc3147b8d2987f}{short\_pkt}} = (xfer-\/>\mbox{\hyperlink{structusb__xfer_aa251db061296120bb15fd562088a1d9d}{flags}}.\mbox{\hyperlink{structusb__xfer__flags_a76816b701c58c22a9a78904b109c2e95}{force\_short\_xfer}}) ? 0 : 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00868}00868                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00869}00869 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00870}00870                 \mbox{\hyperlink{atmegadci_8c_a42217ba58a90c5269dade9a1929f0603}{atmegadci\_setup\_standard\_chain\_sub}}(\&temp);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00871}00871 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00872}00872                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a5367e64daae30f55ec887872d577fa80}{isochronous\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00873}00873                         temp.\mbox{\hyperlink{structatmegadci__std__temp_a20c2e34158ca1cd39b1179d40733dac0}{offset}} += temp.\mbox{\hyperlink{structatmegadci__std__temp_a75282c34842b0b1b72fd506f8c8bb215}{len}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00874}00874                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00875}00875                         \textcolor{comment}{/* get next Page Cache pointer */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00876}00876                         temp.\mbox{\hyperlink{structatmegadci__std__temp_a8265fa9dc17b95abb11d85ce5b7b2f22}{pc}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}} + x;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00877}00877                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00878}00878         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00879}00879 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00880}00880         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00881}00881                 \textcolor{comment}{/* always setup a valid "{}pc"{} pointer for status and sync */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00882}00882                 temp.\mbox{\hyperlink{structatmegadci__std__temp_a8265fa9dc17b95abb11d85ce5b7b2f22}{pc}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_a5937368645458023af557e100989c64a}{frbuffers}} + 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00883}00883                 temp.\mbox{\hyperlink{structatmegadci__std__temp_a75282c34842b0b1b72fd506f8c8bb215}{len}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00884}00884                 temp.\mbox{\hyperlink{structatmegadci__std__temp_ac8786cee46cfa57a98cc3147b8d2987f}{short\_pkt}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00885}00885                 temp.\mbox{\hyperlink{structatmegadci__std__temp_a9811278bec001c64bd4167085e02774d}{setup\_alt\_next}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00886}00886 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00887}00887                 \textcolor{comment}{/* check if we need to sync */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00888}00888                 \textcolor{keywordflow}{if} (need\_sync) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00889}00889                         \textcolor{comment}{/* we need a SYNC point after TX */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00890}00890                         temp.\mbox{\hyperlink{structatmegadci__std__temp_aab4e6bc6e5080420751000e69f57a012}{func}} = \&\mbox{\hyperlink{atmegadci_8c_a90de04b5e9bde5aa6db6ea3f8eef65dd}{atmegadci\_data\_tx\_sync}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00891}00891                         \mbox{\hyperlink{atmegadci_8c_a42217ba58a90c5269dade9a1929f0603}{atmegadci\_setup\_standard\_chain\_sub}}(\&temp);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00892}00892                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00893}00893 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00894}00894                 \textcolor{comment}{/* check if we should append a status stage */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00895}00895                 \textcolor{keywordflow}{if} (!xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a100da5a86a7ab85605683dc51d48ef86}{control\_act}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00896}00896                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00897}00897 \textcolor{comment}{                         * Send a DATA1 message and invert the current}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00898}00898 \textcolor{comment}{                         * endpoint direction.}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00899}00899 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00900}00900                         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}} \& \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00901}00901                                 temp.\mbox{\hyperlink{structatmegadci__std__temp_aab4e6bc6e5080420751000e69f57a012}{func}} = \&\mbox{\hyperlink{atmegadci_8c_a98d2d1f0d111a4e984d9244e2514c63e}{atmegadci\_data\_rx}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00902}00902                                 need\_sync = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00903}00903                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00904}00904                                 temp.\mbox{\hyperlink{structatmegadci__std__temp_aab4e6bc6e5080420751000e69f57a012}{func}} = \&\mbox{\hyperlink{atmegadci_8c_a902e28d283d3fec9189ed902f5fd078c}{atmegadci\_data\_tx}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00905}00905                                 need\_sync = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00906}00906                         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00907}00907 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00908}00908                         \mbox{\hyperlink{atmegadci_8c_a42217ba58a90c5269dade9a1929f0603}{atmegadci\_setup\_standard\_chain\_sub}}(\&temp);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00909}00909                         \textcolor{keywordflow}{if} (need\_sync) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00910}00910                                 \textcolor{comment}{/* we need a SYNC point after TX */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00911}00911                                 temp.\mbox{\hyperlink{structatmegadci__std__temp_aab4e6bc6e5080420751000e69f57a012}{func}} = \&\mbox{\hyperlink{atmegadci_8c_a90de04b5e9bde5aa6db6ea3f8eef65dd}{atmegadci\_data\_tx\_sync}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00912}00912                                 \mbox{\hyperlink{atmegadci_8c_a42217ba58a90c5269dade9a1929f0603}{atmegadci\_setup\_standard\_chain\_sub}}(\&temp);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00913}00913                         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00914}00914                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00915}00915         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00916}00916         \textcolor{comment}{/* must have at least one frame! */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00917}00917         td = temp.\mbox{\hyperlink{structatmegadci__std__temp_a58704b041a1f3a8448ec910d41733484}{td}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00918}00918         xfer-\/>\mbox{\hyperlink{structusb__xfer_ae74733ea0d49027c19477ea63a223f26}{td\_transfer\_last}} = td;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00919}00919 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00920}00920 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00921}00921 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00922}\mbox{\hyperlink{atmegadci_8c_a92f14358da0d2973118ef594dbe44f54}{00922}} \mbox{\hyperlink{atmegadci_8c_a92f14358da0d2973118ef594dbe44f54}{atmegadci\_timeout}}(\textcolor{keywordtype}{void} *arg)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00923}00923 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00924}00924         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer = arg;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00925}00925 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00926}00926         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}xfer=\%p\(\backslash\)n"{}}, xfer);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00927}00927 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00928}00928         \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{atmegadci_8c_source_l00929}00929 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00930}00930         \textcolor{comment}{/* transfer is transferred */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00931}00931         \mbox{\hyperlink{atmegadci_8c_aead7f9a2fff27fcee562264b49fd20a3}{atmegadci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945aeb31baaa7bf416e200f2a0d4ece60820}{USB\_ERR\_TIMEOUT}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00932}00932 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00933}00933 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00934}00934 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00935}\mbox{\hyperlink{atmegadci_8c_acbc307829cd642343ad5ea72d92cd70a}{00935}} \mbox{\hyperlink{atmegadci_8c_acbc307829cd642343ad5ea72d92cd70a}{atmegadci\_start\_standard\_chain}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00936}00936 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00937}00937         DPRINTFN(9, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00938}00938 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00939}00939         \textcolor{comment}{/* poll one time -\/ will turn on interrupts */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00940}00940         \textcolor{keywordflow}{if} (\mbox{\hyperlink{atmegadci_8c_ae40e2aef4126ac1ca821c9c601103480}{atmegadci\_xfer\_do\_fifo}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00941}00941                 \textcolor{comment}{/* put transfer on interrupt queue */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00942}00942                 \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{atmegadci_8c_source_l00943}00943 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00944}00944                 \textcolor{comment}{/* start timeout, if any */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00945}00945                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a766f3db3d34b816ff819212c11f27ad3}{timeout}} != 0) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00946}00946                         \mbox{\hyperlink{usb__transfer_8c_ad2a08e4791c74765a0ecc20d5894ab36}{usbd\_transfer\_timeout\_ms}}(xfer,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00947}00947                             \&\mbox{\hyperlink{atmegadci_8c_a92f14358da0d2973118ef594dbe44f54}{atmegadci\_timeout}}, xfer-\/>\mbox{\hyperlink{structusb__xfer_a766f3db3d34b816ff819212c11f27ad3}{timeout}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00948}00948                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00949}00949         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00950}00950 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00951}00951 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00952}00952 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00953}\mbox{\hyperlink{atmegadci_8c_aa12c0de7fbeebc3fcbdcf546215e2f13}{00953}} \mbox{\hyperlink{atmegadci_8c_aa12c0de7fbeebc3fcbdcf546215e2f13}{atmegadci\_root\_intr}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00954}00954 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00955}00955         DPRINTFN(9, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00956}00956 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00957}00957         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00958}00958 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00959}00959         \textcolor{comment}{/* set port bit */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00960}00960         sc-\/>\mbox{\hyperlink{structatmegadci__softc_abccd9a2c043fee6b4ada51ff7a73dc98}{sc\_hub\_idata}}[0] = 0x02; \textcolor{comment}{/* we only have one port */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00961}00961 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00962}00962         \mbox{\hyperlink{usb__hub_8c_a5d4ec35789c119dd1afa44df46d4b8ed}{uhub\_root\_intr}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}}, sc-\/>\mbox{\hyperlink{structatmegadci__softc_abccd9a2c043fee6b4ada51ff7a73dc98}{sc\_hub\_idata}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00963}00963             \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structatmegadci__softc_abccd9a2c043fee6b4ada51ff7a73dc98}{sc\_hub\_idata}}));}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00964}00964  \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00965}00965 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00966}00966 \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00967}\mbox{\hyperlink{atmegadci_8c_aec8e82ca9d8b4b41deba516b66fdb2ef}{00967}} \mbox{\hyperlink{atmegadci_8c_aec8e82ca9d8b4b41deba516b66fdb2ef}{atmegadci\_standard\_done\_sub}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00968}00968 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00969}00969         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__td}{atmegadci\_td}} *td;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00970}00970         uint32\_t \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00971}00971         uint8\_t \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00972}00972 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00973}00973         DPRINTFN(9, \textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00974}00974 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00975}00975         td = xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00976}00976 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00977}00977         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00978}00978                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = td-\/>\mbox{\hyperlink{structatmegadci__td_a5a5dddfa5bf35bb4d12877e48d97fd33}{remainder}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00979}00979 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00980}00980                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}} != xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00981}00981                         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00982}00982 \textcolor{comment}{                         * Verify the length and subtract}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00983}00983 \textcolor{comment}{                         * the remainder from "{}frlengths[]"{}:}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00984}00984 \textcolor{comment}{                         */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00985}00985                         \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{atmegadci_8c_source_l00986}00986                                 td-\/>\mbox{\hyperlink{structatmegadci__td_ab944542b543453785720fe98b671656d}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00987}00987                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00988}00988                                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a04bfeb929b15a30d355f94eb7ff2a586}{frlengths}}[xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}}] -\/= \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00989}00989                         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00990}00990                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00991}00991                 \textcolor{comment}{/* Check for transfer error */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00992}00992                 \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structatmegadci__td_ab944542b543453785720fe98b671656d}{error}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00993}00993                         \textcolor{comment}{/* the transfer is finished */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00994}00994                         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00995}00995                         td = NULL;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00996}00996                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00997}00997                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00998}00998                 \textcolor{comment}{/* Check for short transfer */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l00999}00999                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} > 0) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01000}01000                         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a1023a81a83c7acfbe3134100363e7fde}{short\_frames\_ok}} ||}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01001}01001                             xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a5367e64daae30f55ec887872d577fa80}{isochronous\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01002}01002                                 \textcolor{comment}{/* follow alt next */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01003}01003                                 \textcolor{keywordflow}{if} (td-\/>\mbox{\hyperlink{structatmegadci__td_a9aa3fee5a878a1b65ab5b914a4cb9c80}{alt\_next}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01004}01004                                         td = td-\/>\mbox{\hyperlink{structatmegadci__td_af764916e1c905c07d91716073860021f}{obj\_next}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01005}01005                                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01006}01006                                         td = NULL;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01007}01007                                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01008}01008                         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01009}01009                                 \textcolor{comment}{/* the transfer is finished */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01010}01010                                 td = NULL;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01011}01011                         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01012}01012                         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01013}01013                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01014}01014                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01015}01015                 td = td-\/>\mbox{\hyperlink{structatmegadci__td_af764916e1c905c07d91716073860021f}{obj\_next}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01016}01016 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01017}01017                 \textcolor{comment}{/* this USB frame is complete */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01018}01018                 \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01019}01019                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01020}01020 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01021}01021         \} \textcolor{keywordflow}{while} (0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01022}01022 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01023}01023         \textcolor{comment}{/* update transfer cache */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01024}01024 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01025}01025         xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} = td;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01026}01026 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01027}01027         \textcolor{keywordflow}{return} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} ?}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01028}01028             \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a83258c6183686c303988db96e7f5713a}{USB\_ERR\_STALLED}} : \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a01e440e0629669433dd14bc477757c74}{USB\_ERR\_NORMAL\_COMPLETION}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01029}01029 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01030}01030 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01031}01031 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01032}\mbox{\hyperlink{atmegadci_8c_a87fd630fad0c899eacff699448abc88e}{01032}} \mbox{\hyperlink{atmegadci_8c_a87fd630fad0c899eacff699448abc88e}{atmegadci\_standard\_done}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01033}01033 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01034}01034         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01035}01035 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01036}01036         DPRINTFN(13, \textcolor{stringliteral}{"{}xfer=\%p endpoint=\%p transfer done\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01037}01037             xfer, xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01038}01038 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01039}01039         \textcolor{comment}{/* reset scanner */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01040}01040 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01041}01041         xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_ae7adef379254c2ca0c87f265c59f5f5c}{td\_transfer\_first}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01042}01042 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01043}01043         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01044}01044                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a0add2c86d09b768df5f354746b8fe16f}{control\_hdr}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01045}01045                         err = \mbox{\hyperlink{atmegadci_8c_aec8e82ca9d8b4b41deba516b66fdb2ef}{atmegadci\_standard\_done\_sub}}(xfer);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01046}01046                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01047}01047                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01048}01048 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01049}01049                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01050}01050                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01051}01051                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01052}01052         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01053}01053         \textcolor{keywordflow}{while} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}} != xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01054}01054                 err = \mbox{\hyperlink{atmegadci_8c_aec8e82ca9d8b4b41deba516b66fdb2ef}{atmegadci\_standard\_done\_sub}}(xfer);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01055}01055                 xfer-\/>\mbox{\hyperlink{structusb__xfer_a7f58fffa56cac11410055f785c4c5ffa}{aframes}}++;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01056}01056 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01057}01057                 \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_ab03dbdacd225824d88b55ea51d0434e1}{td\_transfer\_cache}} == NULL) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01058}01058                         \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01059}01059                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01060}01060         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01061}01061 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01062}01062         \textcolor{keywordflow}{if} (xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a777cf7dd18178f84b0d6e0a086f72a7a}{control\_xfr}} \&\&}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01063}01063             !xfer-\/>\mbox{\hyperlink{structusb__xfer_a8fb7b6b5dbf36063d9b7e5d54d9e15ae}{flags\_int}}.\mbox{\hyperlink{structusb__xfer__flags__int_a100da5a86a7ab85605683dc51d48ef86}{control\_act}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01064}01064                 err = \mbox{\hyperlink{atmegadci_8c_aec8e82ca9d8b4b41deba516b66fdb2ef}{atmegadci\_standard\_done\_sub}}(xfer);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01065}01065         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01066}01066 done:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01067}01067         \mbox{\hyperlink{atmegadci_8c_aead7f9a2fff27fcee562264b49fd20a3}{atmegadci\_device\_done}}(xfer, err);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01068}01068 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01069}01069 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01070}01070 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01071}01071 \textcolor{comment}{ *      atmegadci\_device\_done}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01072}01072 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01073}01073 \textcolor{comment}{ * NOTE: this function can be called more than one time on the}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01074}01074 \textcolor{comment}{ * same USB transfer!}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01075}01075 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01076}01076 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01077}\mbox{\hyperlink{atmegadci_8c_aead7f9a2fff27fcee562264b49fd20a3}{01077}} \mbox{\hyperlink{atmegadci_8c_aead7f9a2fff27fcee562264b49fd20a3}{atmegadci\_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{atmegadci_8c_source_l01078}01078 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01079}01079         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc = \mbox{\hyperlink{atmegadci_8c_a4ec0c34c8aa990c317e29a58e91ae4b9}{ATMEGA\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01080}01080         uint8\_t ep\_no;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01081}01081 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01082}01082         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01083}01083 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01084}01084         DPRINTFN(9, \textcolor{stringliteral}{"{}xfer=\%p, endpoint=\%p, error=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01085}01085             xfer, xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01086}01086 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01087}01087         \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{atmegadci_8c_source_l01088}01088                 ep\_no = (xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}} \& \mbox{\hyperlink{usb_8h_a227db1f194f105a22faae81401d3e18e}{UE\_ADDR}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01089}01089 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01090}01090                 \textcolor{comment}{/* select endpoint number */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01091}01091                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a52bcbb543c212e30e09e7fc1ffd652a4}{ATMEGA\_UENUM}}, ep\_no);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01092}01092 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01093}01093                 \textcolor{comment}{/* disable endpoint interrupt */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01094}01094                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_aff83b68d64fe1822f3ddb6025e5f8e9e}{ATMEGA\_UEIENX}}, 0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01095}01095 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01096}01096                 DPRINTFN(15, \textcolor{stringliteral}{"{}disabled interrupts!\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01097}01097         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01098}01098         \textcolor{comment}{/* dequeue transfer and start next transfer */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01099}01099         \mbox{\hyperlink{usb__transfer_8c_a3141421f88316987bbc9b10e36715faf}{usbd\_transfer\_done}}(xfer, \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01100}01100 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01101}01101 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01102}01102 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01103}\mbox{\hyperlink{atmegadci_8c_ace8d5f0058c5cadcaafecdf524013ae7}{01103}} \mbox{\hyperlink{atmegadci_8c_ace8d5f0058c5cadcaafecdf524013ae7}{atmegadci\_xfer\_stall}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01104}01104 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01105}01105         \mbox{\hyperlink{atmegadci_8c_aead7f9a2fff27fcee562264b49fd20a3}{atmegadci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a83258c6183686c303988db96e7f5713a}{USB\_ERR\_STALLED}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01106}01106 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01107}01107 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01108}01108 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01109}\mbox{\hyperlink{atmegadci_8c_a36436ac24ad1d54c11d4375cab3a30d1}{01109}} \mbox{\hyperlink{atmegadci_8c_a36436ac24ad1d54c11d4375cab3a30d1}{atmegadci\_set\_stall}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01110}01110     \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__endpoint}{usb\_endpoint}} *ep, uint8\_t *did\_stall)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01111}01111 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01112}01112         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01113}01113         uint8\_t ep\_no;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01114}01114 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01115}01115         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01116}01116 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01117}01117         DPRINTFN(5, \textcolor{stringliteral}{"{}endpoint=\%p\(\backslash\)n"{}}, ep);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01118}01118 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01119}01119         sc = \mbox{\hyperlink{atmegadci_8c_a4ec0c34c8aa990c317e29a58e91ae4b9}{ATMEGA\_BUS2SC}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01120}01120         \textcolor{comment}{/* get endpoint number */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01121}01121         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{atmegadci_8c_source_l01122}01122         \textcolor{comment}{/* select endpoint number */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01123}01123         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a52bcbb543c212e30e09e7fc1ffd652a4}{ATMEGA\_UENUM}}, ep\_no);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01124}01124         \textcolor{comment}{/* set stall */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01125}01125         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a9443e514c9ce62d48a8750b551d8a872}{ATMEGA\_UECONX}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01126}01126             \mbox{\hyperlink{atmegadci_8h_a59e68dadccb67f2bf0bc7eed785b2115}{ATMEGA\_UECONX\_EPEN}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01127}01127             \mbox{\hyperlink{atmegadci_8h_a6638e843e43e70ee26a8da054ca8358e}{ATMEGA\_UECONX\_STALLRQ}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01128}01128 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01129}01129 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01130}01130 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01131}\mbox{\hyperlink{atmegadci_8c_aa5870ad3f2d0a05e646a126c6b847dbb}{01131}} \mbox{\hyperlink{atmegadci_8c_aa5870ad3f2d0a05e646a126c6b847dbb}{atmegadci\_clear\_stall\_sub}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc, uint8\_t ep\_no,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01132}01132     uint8\_t ep\_type, uint8\_t ep\_dir)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01133}01133 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01134}01134         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01135}01135 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01136}01136         \textcolor{keywordflow}{if} (ep\_type == \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01137}01137                 \textcolor{comment}{/* clearing stall is not needed */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01138}01138                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01139}01139         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01140}01140         \textcolor{comment}{/* select endpoint number */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01141}01141         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a52bcbb543c212e30e09e7fc1ffd652a4}{ATMEGA\_UENUM}}, ep\_no);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01142}01142 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01143}01143         \textcolor{comment}{/* set endpoint reset */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01144}01144         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a26fc3884ef3c9c9550b1677b0210a7c0}{ATMEGA\_UERST}}, \mbox{\hyperlink{atmegadci_8h_a7162c2e6d890c94cc9f1ba3cf9ef37b5}{ATMEGA\_UERST\_MASK}}(ep\_no));}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01145}01145 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01146}01146         \textcolor{comment}{/* clear endpoint reset */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01147}01147         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a26fc3884ef3c9c9550b1677b0210a7c0}{ATMEGA\_UERST}}, 0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01148}01148 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01149}01149         \textcolor{comment}{/* set stall */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01150}01150         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a9443e514c9ce62d48a8750b551d8a872}{ATMEGA\_UECONX}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01151}01151             \mbox{\hyperlink{atmegadci_8h_a59e68dadccb67f2bf0bc7eed785b2115}{ATMEGA\_UECONX\_EPEN}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01152}01152             \mbox{\hyperlink{atmegadci_8h_a6638e843e43e70ee26a8da054ca8358e}{ATMEGA\_UECONX\_STALLRQ}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01153}01153 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01154}01154         \textcolor{comment}{/* reset data toggle */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01155}01155         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a9443e514c9ce62d48a8750b551d8a872}{ATMEGA\_UECONX}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01156}01156             \mbox{\hyperlink{atmegadci_8h_a59e68dadccb67f2bf0bc7eed785b2115}{ATMEGA\_UECONX\_EPEN}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01157}01157             \mbox{\hyperlink{atmegadci_8h_a1841f7c910c14f0a079cdded8bc8a2c8}{ATMEGA\_UECONX\_RSTDT}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01158}01158 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01159}01159         \textcolor{comment}{/* clear stall */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01160}01160         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a9443e514c9ce62d48a8750b551d8a872}{ATMEGA\_UECONX}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01161}01161             \mbox{\hyperlink{atmegadci_8h_a59e68dadccb67f2bf0bc7eed785b2115}{ATMEGA\_UECONX\_EPEN}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01162}01162             \mbox{\hyperlink{atmegadci_8h_ad3129b7cba1103e655c565f69f876031}{ATMEGA\_UECONX\_STALLRQC}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01163}01163 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01164}01164         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01165}01165                 \textcolor{keywordflow}{if} (ep\_type == \mbox{\hyperlink{usb_8h_a25240fc009aa67bb7a2b635d2e9401e4}{UE\_BULK}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01166}01166                         temp = \mbox{\hyperlink{atmegadci_8h_a3a0dfeacdd5ba1509dda839288e5c269}{ATMEGA\_UECFG0X\_EPTYPE2}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01167}01167                 \} \textcolor{keywordflow}{else} \textcolor{keywordflow}{if} (ep\_type == \mbox{\hyperlink{usb_8h_a01e28e87ad16f6dfffefc6ccab08baed}{UE\_INTERRUPT}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01168}01168                         temp = \mbox{\hyperlink{atmegadci_8h_a5c2945a8b32670a710f25fd37462d2a2}{ATMEGA\_UECFG0X\_EPTYPE3}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01169}01169                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01170}01170                         temp = \mbox{\hyperlink{atmegadci_8h_a77b1355efe1fe03156df664f6e4983ec}{ATMEGA\_UECFG0X\_EPTYPE1}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01171}01171                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01172}01172                 \textcolor{keywordflow}{if} (ep\_dir \& \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01173}01173                         temp |= \mbox{\hyperlink{atmegadci_8h_ab27b4d2df95963b90ba772ffe72b304a}{ATMEGA\_UECFG0X\_EPDIR}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01174}01174                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01175}01175                 \textcolor{comment}{/* two banks, 64-\/bytes wMaxPacket */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01176}01176                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a7c8bb390f07a8d4c5636b93b169ebfbf}{ATMEGA\_UECFG0X}}, temp);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01177}01177                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_ae18f7ed94422ca87ca2f5fcf701ebabe}{ATMEGA\_UECFG1X}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01178}01178                     \mbox{\hyperlink{atmegadci_8h_a9094825f757defc7bf89e4b79f3fc8b7}{ATMEGA\_UECFG1X\_ALLOC}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01179}01179                     \mbox{\hyperlink{atmegadci_8h_aef02f60d1a3abbce6a4bdeef5e61ff2f}{ATMEGA\_UECFG1X\_EPBK0}} |  \textcolor{comment}{/* one bank */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01180}01180                     \mbox{\hyperlink{atmegadci_8h_ae07e3c160023486cdb53714458f60d2f}{ATMEGA\_UECFG1X\_EPSIZE}}(3));}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01181}01181 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01182}01182                 temp = \mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_ab8e43d037844eca9122bdc0a918a329f}{ATMEGA\_UESTA0X}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01183}01183                 \textcolor{keywordflow}{if} (!(temp \& \mbox{\hyperlink{atmegadci_8h_a09779063b11402fdbff3d6dcf94de148}{ATMEGA\_UESTA0X\_CFGOK}})) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01184}01184                         device\_printf(sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01185}01185                             \textcolor{stringliteral}{"{}Chip rejected configuration\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01186}01186                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01187}01187         \} \textcolor{keywordflow}{while} (0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01188}01188 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01189}01189 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01190}01190 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01191}\mbox{\hyperlink{atmegadci_8c_a79aeb5cd8b4ff4487a8efebb475a5b31}{01191}} \mbox{\hyperlink{atmegadci_8c_a79aeb5cd8b4ff4487a8efebb475a5b31}{atmegadci\_clear\_stall}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev, \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__endpoint}{usb\_endpoint}} *ep)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01192}01192 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01193}01193         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01194}01194         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__endpoint__descriptor}{usb\_endpoint\_descriptor}} *ed;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01195}01195 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01196}01196         DPRINTFN(5, \textcolor{stringliteral}{"{}endpoint=\%p\(\backslash\)n"{}}, ep);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01197}01197 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01198}01198         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01199}01199 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01200}01200         \textcolor{comment}{/* check mode */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01201}01201         \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{atmegadci_8c_source_l01202}01202                 \textcolor{comment}{/* not supported */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01203}01203                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01204}01204         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01205}01205         \textcolor{comment}{/* get softc */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01206}01206         sc = \mbox{\hyperlink{atmegadci_8c_a4ec0c34c8aa990c317e29a58e91ae4b9}{ATMEGA\_BUS2SC}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01207}01207 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01208}01208         \textcolor{comment}{/* get endpoint descriptor */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01209}01209         ed = ep-\/>\mbox{\hyperlink{structusb__endpoint_af3b96b9fe1e612b303833c2e2d0365e1}{edesc}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01210}01210 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01211}01211         \textcolor{comment}{/* reset endpoint */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01212}01212         \mbox{\hyperlink{atmegadci_8c_aa5870ad3f2d0a05e646a126c6b847dbb}{atmegadci\_clear\_stall\_sub}}(sc,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01213}01213             (ed-\/>\mbox{\hyperlink{structusb__endpoint__descriptor_a3d0a0ab41c53023055a242d66a437a2d}{bEndpointAddress}} \& \mbox{\hyperlink{usb_8h_a227db1f194f105a22faae81401d3e18e}{UE\_ADDR}}),}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01214}01214             (ed-\/>\mbox{\hyperlink{structusb__endpoint__descriptor_aff28dcc97802a405b31baccd33c2bf8f}{bmAttributes}} \& \mbox{\hyperlink{usb_8h_a8badd3504359a0aed83ac575a46a67b4}{UE\_XFERTYPE}}),}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01215}01215             (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{atmegadci_8c_source_l01216}01216 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01217}01217 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01218}01218 \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01219}\mbox{\hyperlink{atmegadci_8c_a74f8ef185b3b2daed343982310014363}{01219}} \mbox{\hyperlink{atmegadci_8c_a74f8ef185b3b2daed343982310014363}{atmegadci\_init}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01220}01220 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01221}01221         uint8\_t \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01222}01222 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01223}01223         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}start\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01224}01224 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01225}01225         \textcolor{comment}{/* set up the bus structure */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01226}01226         sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a333d9234cb56ddeb93ac0625c3d48252}{usbrev}} = \mbox{\hyperlink{usb_8h_ad11f3f35a7768f59a4f69ad460a7661fae19468be699e848d31901be7456388e0}{USB\_REV\_1\_1}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01227}01227         sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a81450db76aab5d75bdc5a8a67b2d0939}{methods}} = \&\mbox{\hyperlink{atmegadci_8c_a72940840b9a037001efaf61acf92c3c0}{atmegadci\_bus\_methods}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01228}01228 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01229}01229         \mbox{\hyperlink{usb__core_8h_a21dab1de8f52baf9fbf7617c6b1ec033}{USB\_BUS\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01230}01230 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01231}01231         \textcolor{comment}{/* make sure USB is enabled */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01232}01232         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a4acbffcc30de819731409e4bf02f69c1}{ATMEGA\_USBCON}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01233}01233             \mbox{\hyperlink{atmegadci_8h_a37227c640b965834d81a04d447d55826}{ATMEGA\_USBCON\_USBE}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01234}01234             \mbox{\hyperlink{atmegadci_8h_a120529d0ba4cfbaa95cecf224c41c180}{ATMEGA\_USBCON\_FRZCLK}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01235}01235 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01236}01236         \textcolor{comment}{/* enable USB PAD regulator */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01237}01237         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a21b582f05a117835d266a72bc395d30e}{ATMEGA\_UHWCON}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01238}01238             \mbox{\hyperlink{atmegadci_8h_a0fa6755392c30eb016d9fc89f08ee5f1}{ATMEGA\_UHWCON\_UVREGE}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01239}01239             \mbox{\hyperlink{atmegadci_8h_a576a570facf3e01a281026461b42522f}{ATMEGA\_UHWCON\_UIMOD}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01240}01240 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01241}01241         \textcolor{comment}{/* the following register sets up the USB PLL, assuming 16MHz X-\/tal */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01242}01242         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, 0x49 \textcolor{comment}{/* PLLCSR */}, 0x14 | 0x02);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01243}01243 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01244}01244         \textcolor{comment}{/* wait for PLL to lock */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01245}01245         \textcolor{keywordflow}{for} (\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} = 0; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} != 20; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}++) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01246}01246                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, 0x49) \& 0x01)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01247}01247                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01248}01248                 \textcolor{comment}{/* wait a little bit for PLL to start */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01249}01249                 \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a7355d01a9b05ad01972eccabe5747edf}{bus\_mtx}}, hz / 100);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01250}01250         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01251}01251 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01252}01252         \textcolor{comment}{/* make sure USB is enabled */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01253}01253         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a4acbffcc30de819731409e4bf02f69c1}{ATMEGA\_USBCON}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01254}01254             \mbox{\hyperlink{atmegadci_8h_a37227c640b965834d81a04d447d55826}{ATMEGA\_USBCON\_USBE}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01255}01255             \mbox{\hyperlink{atmegadci_8h_ad78058db264e40f3ae75f4419f7450da}{ATMEGA\_USBCON\_OTGPADE}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01256}01256             \mbox{\hyperlink{atmegadci_8h_a50e0025f04832e0ab9cd6d5a99c4396b}{ATMEGA\_USBCON\_VBUSTE}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01257}01257 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01258}01258         \textcolor{comment}{/* turn on clocks */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01259}01259         (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a2e4ba3301b473d566f4230afdcf4c5d9}{sc\_clocks\_on}}) (\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01260}01260 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01261}01261         \textcolor{comment}{/* make sure device is re-\/enumerated */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01262}01262         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_abf29b5644559d3620f91cdeed8738837}{ATMEGA\_UDCON}}, \mbox{\hyperlink{atmegadci_8h_aa5a3f052ffffd21cf62c0ad11fbf5a01}{ATMEGA\_UDCON\_DETACH}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01263}01263 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01264}01264         \textcolor{comment}{/* wait a little for things to stabilise */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01265}01265         \mbox{\hyperlink{usb__util_8c_a7ad9fc3660f5ecf96d72e499cdfeb963}{usb\_pause\_mtx}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a7355d01a9b05ad01972eccabe5747edf}{bus\_mtx}}, hz / 20);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01266}01266 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01267}01267         \textcolor{comment}{/* enable interrupts */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01268}01268         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_acf447da2e83e37948a92a72f2ecb2e12}{ATMEGA\_UDIEN}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01269}01269             \mbox{\hyperlink{atmegadci_8h_ac039c732348212cb4a2b645fa54ccadc}{ATMEGA\_UDINT\_SUSPE}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01270}01270             \mbox{\hyperlink{atmegadci_8h_abaa1203667539aee23366453e0c709eb}{ATMEGA\_UDINT\_EORSTE}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01271}01271 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01272}01272         \textcolor{comment}{/* reset all endpoints */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01273}01273         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a26fc3884ef3c9c9550b1677b0210a7c0}{ATMEGA\_UERST}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01274}01274             (1 << \mbox{\hyperlink{atmegadci_8h_ab64acf9721f6a47204a4ba241daae6be}{ATMEGA\_EP\_MAX}}) -\/ 1);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01275}01275 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01276}01276         \textcolor{comment}{/* disable reset */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01277}01277         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a26fc3884ef3c9c9550b1677b0210a7c0}{ATMEGA\_UERST}}, 0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01278}01278 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01279}01279         \textcolor{comment}{/* disable all endpoints */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01280}01280         \textcolor{keywordflow}{for} (\mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} = 0; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} != \mbox{\hyperlink{atmegadci_8h_ab64acf9721f6a47204a4ba241daae6be}{ATMEGA\_EP\_MAX}}; \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}}++) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01281}01281                 \textcolor{comment}{/* select endpoint */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01282}01282                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a52bcbb543c212e30e09e7fc1ffd652a4}{ATMEGA\_UENUM}}, \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01283}01283 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01284}01284                 \textcolor{comment}{/* disable endpoint interrupt */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01285}01285                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_aff83b68d64fe1822f3ddb6025e5f8e9e}{ATMEGA\_UEIENX}}, 0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01286}01286 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01287}01287                 \textcolor{comment}{/* disable endpoint */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01288}01288                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a9443e514c9ce62d48a8750b551d8a872}{ATMEGA\_UECONX}}, 0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01289}01289         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01290}01290 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01291}01291         \textcolor{comment}{/* turn off clocks */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01292}01292 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01293}01293         \mbox{\hyperlink{atmegadci_8c_a5876c2b37c2599fc774556a7e89cc467}{atmegadci\_clocks\_off}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01294}01294 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01295}01295         \textcolor{comment}{/* read initial VBUS state */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01296}01296 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01297}01297         \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} = \mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a158a011ffc65e62a5d2c523b9a809b01}{ATMEGA\_USBSTA}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01298}01298         \mbox{\hyperlink{atmegadci_8c_af895042a26ea7cc879a2d61ccfecddb3}{atmegadci\_vbus\_interrupt}}(sc, \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}} \& \mbox{\hyperlink{atmegadci_8h_ae1584367c935546201e6347341511388}{ATMEGA\_USBSTA\_VBUS}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01299}01299 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01300}01300         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01301}01301 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01302}01302         \textcolor{comment}{/* catch any lost interrupts */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01303}01303 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01304}01304         \mbox{\hyperlink{atmegadci_8c_ab515c07746e43584b0fa5367ceae3400}{atmegadci\_do\_poll}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01305}01305 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01306}01306         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01307}01307 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01308}01308 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01309}01309 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01310}\mbox{\hyperlink{atmegadci_8c_a2ebbd71e1d028d896b69705358db6c29}{01310}} \mbox{\hyperlink{atmegadci_8c_a2ebbd71e1d028d896b69705358db6c29}{atmegadci\_uninit}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01311}01311 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01312}01312         \mbox{\hyperlink{usb__core_8h_a21dab1de8f52baf9fbf7617c6b1ec033}{USB\_BUS\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01313}01313 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01314}01314         \textcolor{comment}{/* turn on clocks */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01315}01315         (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a2e4ba3301b473d566f4230afdcf4c5d9}{sc\_clocks\_on}}) (\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01316}01316 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01317}01317         \textcolor{comment}{/* disable interrupts */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01318}01318         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_acf447da2e83e37948a92a72f2ecb2e12}{ATMEGA\_UDIEN}}, 0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01319}01319 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01320}01320         \textcolor{comment}{/* reset all endpoints */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01321}01321         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a26fc3884ef3c9c9550b1677b0210a7c0}{ATMEGA\_UERST}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01322}01322             (1 << \mbox{\hyperlink{atmegadci_8h_ab64acf9721f6a47204a4ba241daae6be}{ATMEGA\_EP\_MAX}}) -\/ 1);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01323}01323 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01324}01324         \textcolor{comment}{/* disable reset */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01325}01325         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a26fc3884ef3c9c9550b1677b0210a7c0}{ATMEGA\_UERST}}, 0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01326}01326 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01327}01327         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a9e88e81a993a9ef8ab1d04f7338758bd}{port\_powered}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01328}01328         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a9f76fc77a39d63eb9abe227c619115d4}{status\_vbus}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01329}01329         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a40170bb08e65486444daf167f313fd58}{status\_bus\_reset}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01330}01330         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_ae8096abd5d44a92e25e9204ecb7c4415}{status\_suspend}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01331}01331         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a814ac303c9fc29823f328665be7ae7e8}{change\_suspend}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01332}01332         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_aa3182d5dd2f69694b3abc8068df783da}{change\_connect}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01333}01333 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01334}01334         \mbox{\hyperlink{atmegadci_8c_adb9a956a838d2c30b422609bc7ebaaf3}{atmegadci\_pull\_down}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01335}01335         \mbox{\hyperlink{atmegadci_8c_a5876c2b37c2599fc774556a7e89cc467}{atmegadci\_clocks\_off}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01336}01336 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01337}01337         \textcolor{comment}{/* disable USB PAD regulator */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01338}01338         \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a21b582f05a117835d266a72bc395d30e}{ATMEGA\_UHWCON}}, 0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01339}01339 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01340}01340         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01341}01341 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01342}01342 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01343}01343 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01344}\mbox{\hyperlink{atmegadci_8c_ac67c8f4b91fdf859087d03b4dcdca89c}{01344}} \mbox{\hyperlink{atmegadci_8c_ac67c8f4b91fdf859087d03b4dcdca89c}{atmegadci\_suspend}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01345}01345 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01346}01346         \textcolor{comment}{/* TODO */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01347}01347 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01348}01348 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01349}01349 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01350}\mbox{\hyperlink{atmegadci_8c_a09eb192d290e9bcfb5730b2cb397934c}{01350}} \mbox{\hyperlink{atmegadci_8c_a09eb192d290e9bcfb5730b2cb397934c}{atmegadci\_resume}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01351}01351 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01352}01352         \textcolor{comment}{/* TODO */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01353}01353 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01354}01354 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01355}01355 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01356}\mbox{\hyperlink{atmegadci_8c_ab515c07746e43584b0fa5367ceae3400}{01356}} \mbox{\hyperlink{atmegadci_8c_ab515c07746e43584b0fa5367ceae3400}{atmegadci\_do\_poll}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__bus}{usb\_bus}} *bus)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01357}01357 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01358}01358         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc = \mbox{\hyperlink{atmegadci_8c_a4ec0c34c8aa990c317e29a58e91ae4b9}{ATMEGA\_BUS2SC}}(bus);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01359}01359 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01360}01360         \mbox{\hyperlink{usb__core_8h_a21dab1de8f52baf9fbf7617c6b1ec033}{USB\_BUS\_LOCK}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01361}01361         \mbox{\hyperlink{atmegadci_8c_a568389a02c13aa71e5a7f1f550e07838}{atmegadci\_interrupt\_poll}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01362}01362         \mbox{\hyperlink{usb__core_8h_aadb0c32f6333b8a0715929ace5f550b2}{USB\_BUS\_UNLOCK}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01363}01363 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01364}01364 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01365}01365 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01366}01366 \textcolor{comment}{ * atmegadci bulk support}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01367}01367 \textcolor{comment}{ * atmegadci control support}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01368}01368 \textcolor{comment}{ * atmegadci interrupt support}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01369}01369 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01370}01370 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01371}\mbox{\hyperlink{atmegadci_8c_ab9c790e96ffd27d303bded2f2b036409}{01371}} \mbox{\hyperlink{atmegadci_8c_ab9c790e96ffd27d303bded2f2b036409}{atmegadci\_device\_non\_isoc\_open}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01372}01372 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01373}01373         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01374}01374 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01375}01375 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01376}01376 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01377}\mbox{\hyperlink{atmegadci_8c_a668e58d80a48be27d6ef11651c63920e}{01377}} \mbox{\hyperlink{atmegadci_8c_a668e58d80a48be27d6ef11651c63920e}{atmegadci\_device\_non\_isoc\_close}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01378}01378 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01379}01379         \mbox{\hyperlink{atmegadci_8c_aead7f9a2fff27fcee562264b49fd20a3}{atmegadci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01380}01380 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01381}01381 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01382}01382 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01383}\mbox{\hyperlink{atmegadci_8c_a2324cdcdd2e24b8359bf2d594ec67391}{01383}} \mbox{\hyperlink{atmegadci_8c_a2324cdcdd2e24b8359bf2d594ec67391}{atmegadci\_device\_non\_isoc\_enter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01384}01384 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01385}01385         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01386}01386 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01387}01387 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01388}01388 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01389}\mbox{\hyperlink{atmegadci_8c_a70a29ca9adf0f4d68f359a891dd04adc}{01389}} \mbox{\hyperlink{atmegadci_8c_a70a29ca9adf0f4d68f359a891dd04adc}{atmegadci\_device\_non\_isoc\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01390}01390 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01391}01391         \textcolor{comment}{/* setup TDs */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01392}01392         \mbox{\hyperlink{atmegadci_8c_a5113301d01f739481786b90b45bf7b4b}{atmegadci\_setup\_standard\_chain}}(xfer);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01393}01393         \mbox{\hyperlink{atmegadci_8c_acbc307829cd642343ad5ea72d92cd70a}{atmegadci\_start\_standard\_chain}}(xfer);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01394}01394 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01395}01395 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01396}01396 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{atmegadci_8c_a1339815657b83494c0c1ebef93d5b7b9}{atmegadci\_device\_non\_isoc\_methods}} =}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01397}01397 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01398}01398         .\mbox{\hyperlink{structusb__pipe__methods_a9745134b3e58cdaff56836b57ac15d52}{open}} = \mbox{\hyperlink{atmegadci_8c_ab9c790e96ffd27d303bded2f2b036409}{atmegadci\_device\_non\_isoc\_open}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01399}01399         .close = \mbox{\hyperlink{atmegadci_8c_a668e58d80a48be27d6ef11651c63920e}{atmegadci\_device\_non\_isoc\_close}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01400}01400         .enter = \mbox{\hyperlink{atmegadci_8c_a2324cdcdd2e24b8359bf2d594ec67391}{atmegadci\_device\_non\_isoc\_enter}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01401}01401         .start = \mbox{\hyperlink{atmegadci_8c_a70a29ca9adf0f4d68f359a891dd04adc}{atmegadci\_device\_non\_isoc\_start}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01402}01402 \};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01403}01403 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01404}01404 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01405}01405 \textcolor{comment}{ * atmegadci full speed isochronous support}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01406}01406 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01407}01407 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01408}\mbox{\hyperlink{atmegadci_8c_ac4670ff917d5b89abaa91c8352b2e49f}{01408}} \mbox{\hyperlink{atmegadci_8c_ac4670ff917d5b89abaa91c8352b2e49f}{atmegadci\_device\_isoc\_fs\_open}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01409}01409 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01410}01410         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01411}01411 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01412}01412 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01413}01413 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01414}\mbox{\hyperlink{atmegadci_8c_a014b4839e31dd6caa5fc154ccc49ae0b}{01414}} \mbox{\hyperlink{atmegadci_8c_a014b4839e31dd6caa5fc154ccc49ae0b}{atmegadci\_device\_isoc\_fs\_close}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01415}01415 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01416}01416         \mbox{\hyperlink{atmegadci_8c_aead7f9a2fff27fcee562264b49fd20a3}{atmegadci\_device\_done}}(xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01417}01417 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01418}01418 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01419}01419 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01420}\mbox{\hyperlink{atmegadci_8c_ade55ab35aa16d5e23836e1e424345535}{01420}} \mbox{\hyperlink{atmegadci_8c_ade55ab35aa16d5e23836e1e424345535}{atmegadci\_device\_isoc\_fs\_enter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01421}01421 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01422}01422         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc = \mbox{\hyperlink{atmegadci_8c_a4ec0c34c8aa990c317e29a58e91ae4b9}{ATMEGA\_BUS2SC}}(xfer-\/>\mbox{\hyperlink{structusb__xfer_ad188b4cd79900e1cd04aba6c140e9ab3}{xroot}}-\/>\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01423}01423         uint32\_t nframes;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01424}01424 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01425}01425         DPRINTFN(6, \textcolor{stringliteral}{"{}xfer=\%p next=\%d nframes=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01426}01426             xfer, xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_a6a4a923c46e82cd1298d7832e169d7d1}{isoc\_next}}, xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01427}01427 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01428}01428         \textcolor{comment}{/* get the current frame index */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01429}01429 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01430}01430         nframes =}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01431}01431             (\mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a30e986751de75c0a9e20fb4052b31633}{ATMEGA\_UDFNUMH}}) << 8) |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01432}01432             (\mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a05fb7d9cae630d0ac0d5f4db6b3a1a08}{ATMEGA\_UDFNUML}}));}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01433}01433 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01434}01434         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__transfer_8c_ac7c1dd004c5c80fdda721a68ad16504d}{usbd\_xfer\_get\_isochronous\_start\_frame}}(}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01435}01435             xfer, nframes, 0, 1, \mbox{\hyperlink{atmegadci_8h_a8b0fe249b43338c59adc1c121c4dac2a}{ATMEGA\_FRAME\_MASK}}, NULL))}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01436}01436                 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{atmegadci_8c_source_l01437}01437 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01438}01438         \textcolor{comment}{/* setup TDs */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01439}01439         \mbox{\hyperlink{atmegadci_8c_a5113301d01f739481786b90b45bf7b4b}{atmegadci\_setup\_standard\_chain}}(xfer);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01440}01440 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01441}01441 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01442}01442 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01443}\mbox{\hyperlink{atmegadci_8c_a18563af9844420b5d828617a0a3ee44b}{01443}} \mbox{\hyperlink{atmegadci_8c_a18563af9844420b5d828617a0a3ee44b}{atmegadci\_device\_isoc\_fs\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01444}01444 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01445}01445         \textcolor{comment}{/* start TD chain */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01446}01446         \mbox{\hyperlink{atmegadci_8c_acbc307829cd642343ad5ea72d92cd70a}{atmegadci\_start\_standard\_chain}}(xfer);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01447}01447 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01448}01448 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01449}01449 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} \mbox{\hyperlink{atmegadci_8c_a7013f016e82046a3681eedcbb604f080}{atmegadci\_device\_isoc\_fs\_methods}} =}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01450}01450 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01451}01451         .\mbox{\hyperlink{structusb__pipe__methods_a9745134b3e58cdaff56836b57ac15d52}{open}} = \mbox{\hyperlink{atmegadci_8c_ac4670ff917d5b89abaa91c8352b2e49f}{atmegadci\_device\_isoc\_fs\_open}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01452}01452         .close = \mbox{\hyperlink{atmegadci_8c_a014b4839e31dd6caa5fc154ccc49ae0b}{atmegadci\_device\_isoc\_fs\_close}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01453}01453         .enter = \mbox{\hyperlink{atmegadci_8c_ade55ab35aa16d5e23836e1e424345535}{atmegadci\_device\_isoc\_fs\_enter}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01454}01454         .start = \mbox{\hyperlink{atmegadci_8c_a18563af9844420b5d828617a0a3ee44b}{atmegadci\_device\_isoc\_fs\_start}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01455}01455 \};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01456}01456 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01457}01457 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01458}01458 \textcolor{comment}{ * atmegadci root control support}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01459}01459 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01460}01460 \textcolor{comment}{ * Simulate a hardware HUB by handling all the necessary requests.}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01461}01461 \textcolor{comment}{ *-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/*/}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01462}01462 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01463}\mbox{\hyperlink{atmegadci_8c_a1176123bed0f80f4a501fa923ab0d8cf}{01463}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__descriptor}{usb\_device\_descriptor}} \mbox{\hyperlink{atmegadci_8c_a1176123bed0f80f4a501fa923ab0d8cf}{atmegadci\_devd}} = \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01464}01464         .\mbox{\hyperlink{structusb__device__descriptor_a5123036bdc67e99a87a1f5dbf13975be}{bLength}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__descriptor}{usb\_device\_descriptor}}),}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01465}01465         .\mbox{\hyperlink{structusb__device__descriptor_a5335f6d2de0050e61da6f979d71e2f67}{bDescriptorType}} = \mbox{\hyperlink{usb_8h_a91e8696a051fcdd76cd797fa128938a2}{UDESC\_DEVICE}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01466}01466         .bcdUSB = \{0x00, 0x02\},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01467}01467         .bDeviceClass = \mbox{\hyperlink{usb_8h_a3c5e5fca25f06d3b8ddc5ec932116178}{UDCLASS\_HUB}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01468}01468         .bDeviceSubClass = \mbox{\hyperlink{usb_8h_a0ce87986a681a89bcb413e066e007785}{UDSUBCLASS\_HUB}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01469}01469         .bDeviceProtocol = \mbox{\hyperlink{usb_8h_ab80f5dc89606b21b68c1081e55c7d373}{UDPROTO\_FSHUB}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01470}01470         .bMaxPacketSize = 64,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01471}01471         .bcdDevice = \{0x00, 0x01\},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01472}01472         .iManufacturer = 1,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01473}01473         .iProduct = 2,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01474}01474         .bNumConfigurations = 1,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01475}01475 \};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01476}01476 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01477}\mbox{\hyperlink{atmegadci_8c_a4961dec98ca27761918965f802e693c8}{01477}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__config__desc}{atmegadci\_config\_desc}} \mbox{\hyperlink{atmegadci_8c_a4961dec98ca27761918965f802e693c8}{atmegadci\_confd}} = \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01478}01478         .\mbox{\hyperlink{structatmegadci__config__desc_aa4df2df6f8406de2011ec6705accd204}{confd}} = \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01479}01479                 .\mbox{\hyperlink{structusb__config__descriptor_ab93f48211c037d6431326d0d46db44b3}{bLength}} = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config__descriptor}{usb\_config\_descriptor}}),}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01480}01480                 .\mbox{\hyperlink{structusb__config__descriptor_a5fe7b158ddf2b2c752a0e9d5540ccb30}{bDescriptorType}} = \mbox{\hyperlink{usb_8h_a35d8259be2f4b9d3b278e889898a697a}{UDESC\_CONFIG}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01481}01481                 .wTotalLength[0] = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{atmegadci_8c_a4961dec98ca27761918965f802e693c8}{atmegadci\_confd}}),}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01482}01482                 .\mbox{\hyperlink{structusb__config__descriptor_a60b87e4669815bc7e5728c897dae77fb}{bNumInterface}} = 1,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01483}01483                 .\mbox{\hyperlink{structusb__config__descriptor_affc7816579932817c36478f630b7b7a1}{bConfigurationValue}} = 1,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01484}01484                 .\mbox{\hyperlink{structusb__config__descriptor_af2e38326d498da74125894ea7482bed8}{iConfiguration}} = 0,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01485}01485                 .\mbox{\hyperlink{structusb__config__descriptor_a8f3926a6e43bcd315b7b2f770cdfed7e}{bmAttributes}} = \mbox{\hyperlink{usb_8h_a1a9a7ef4724e86785942f8ca612cd661}{UC\_SELF\_POWERED}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01486}01486                 .\mbox{\hyperlink{structusb__config__descriptor_aeac4fc9cf1261c3db5e17e28b48f873c}{bMaxPower}} = 0,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01487}01487         \},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01488}01488         .ifcd = \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01489}01489                 .bLength = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__interface__descriptor}{usb\_interface\_descriptor}}),}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01490}01490                 .\mbox{\hyperlink{structusb__interface__descriptor_ad4f7914ce2bc3d8830d6463a7f2989d6}{bDescriptorType}} = \mbox{\hyperlink{usb_8h_a93c15218c1fed26b097fb0b53a3ce4f7}{UDESC\_INTERFACE}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01491}01491                 .bNumEndpoints = 1,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01492}01492                 .bInterfaceClass = \mbox{\hyperlink{usb_8h_a9087453dd0a77bb9091c9ee62a3c87cc}{UICLASS\_HUB}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01493}01493                 .bInterfaceSubClass = \mbox{\hyperlink{usb_8h_a2b2ea572877c6b2bb5d2238be6554fa0}{UISUBCLASS\_HUB}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01494}01494                 .bInterfaceProtocol = 0,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01495}01495         \},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01496}01496         .endpd = \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01497}01497                 .bLength = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__endpoint__descriptor}{usb\_endpoint\_descriptor}}),}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01498}01498                 .\mbox{\hyperlink{structusb__endpoint__descriptor_a82be4599246c494022ea964cfddfb121}{bDescriptorType}} = \mbox{\hyperlink{usb_8h_a4b8e0317b094aec02ff237d9b4f7a202}{UDESC\_ENDPOINT}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01499}01499                 .bEndpointAddress = (\mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}} | \mbox{\hyperlink{atmegadci_8c_a7b3c1042d4fca1e6122e7b6cfd193f63}{ATMEGA\_INTR\_ENDPT}}),}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01500}01500                 .\mbox{\hyperlink{structusb__endpoint__descriptor_aff28dcc97802a405b31baccd33c2bf8f}{bmAttributes}} = \mbox{\hyperlink{usb_8h_a01e28e87ad16f6dfffefc6ccab08baed}{UE\_INTERRUPT}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01501}01501                 .\mbox{\hyperlink{structusb__endpoint__descriptor_af5ba49fb2ee7353335dc33e38d89aed5}{wMaxPacketSize}}[0] = 8,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01502}01502                 .\mbox{\hyperlink{structusb__endpoint__descriptor_a1b46a434989cbf5dd1a7637aebca9f45}{bInterval}} = 255,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01503}01503         \},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01504}01504 \};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01505}\mbox{\hyperlink{atmegadci_8c_ac65fb39fbba36a16524a7f501cd169a3}{01505}} \textcolor{preprocessor}{\#define HSETW(ptr, val) ptr = \{ (uint8\_t)(val), (uint8\_t)((val) >> 8) \}}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01506}01506 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01507}\mbox{\hyperlink{atmegadci_8c_a3a46dbf8ffb5fe3109f6f2c99bca9e6b}{01507}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__hub__descriptor__min}{usb\_hub\_descriptor\_min}} \mbox{\hyperlink{atmegadci_8c_a3a46dbf8ffb5fe3109f6f2c99bca9e6b}{atmegadci\_hubd}} = \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01508}01508         .\mbox{\hyperlink{structusb__hub__descriptor__min_a5db444dc404b953cf37504781de07fb8}{bDescLength}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{atmegadci_8c_a3a46dbf8ffb5fe3109f6f2c99bca9e6b}{atmegadci\_hubd}}),}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01509}01509         .\mbox{\hyperlink{structusb__hub__descriptor__min_aee2a1efbc9b628995a29f9f0fb4d2b42}{bDescriptorType}} = \mbox{\hyperlink{usb_8h_a61e1d91f3367e2a9928acbd3a33b1385}{UDESC\_HUB}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01510}01510         .\mbox{\hyperlink{structusb__hub__descriptor__min_a09ac3e727ad5dabdb449db4e6e44124c}{bNbrPorts}} = 1,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01511}01511         \mbox{\hyperlink{atmegadci_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{atmegadci_8c_source_l01512}01512         .\mbox{\hyperlink{structusb__hub__descriptor__min_a1f75abf2b49096987dd01423a83b6be9}{bPwrOn2PwrGood}} = 50,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01513}01513         .\mbox{\hyperlink{structusb__hub__descriptor__min_a34f984192b2b98c83152607ffac1c7da}{bHubContrCurrent}} = 0,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01514}01514         .\mbox{\hyperlink{structusb__hub__descriptor__min_aad9df054d2dd5e5981552388797aaaa9}{DeviceRemovable}} = \{0\},          \textcolor{comment}{/* port is removable */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01515}01515 \};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01516}01516 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01517}\mbox{\hyperlink{atmegadci_8c_a265c7a0fcb3a015f0e30e8ff1de8b618}{01517}} \textcolor{preprocessor}{\#define STRING\_VENDOR \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01518}01518 \textcolor{preprocessor}{  "{}A\(\backslash\)0T\(\backslash\)0M\(\backslash\)0E\(\backslash\)0G\(\backslash\)0A"{}}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01519}01519 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01520}\mbox{\hyperlink{atmegadci_8c_ab7717822bc6abda59578615741ee2223}{01520}} \textcolor{preprocessor}{\#define STRING\_PRODUCT \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01521}01521 \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{atmegadci_8c_source_l01522}01522 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01523}\mbox{\hyperlink{atmegadci_8c_ac04da6eeba89177991f54b6cdde21d47}{01523}} \mbox{\hyperlink{atmegadci_8c_ac04da6eeba89177991f54b6cdde21d47}{USB\_MAKE\_STRING\_DESC}}(\mbox{\hyperlink{atmegadci_8c_a265c7a0fcb3a015f0e30e8ff1de8b618}{STRING\_VENDOR}}, atmegadci\_vendor);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01524}\mbox{\hyperlink{atmegadci_8c_a676d6688c85f4ac6e98c46c8e2786f32}{01524}} \mbox{\hyperlink{atmegadci_8c_ac04da6eeba89177991f54b6cdde21d47}{USB\_MAKE\_STRING\_DESC}}(\mbox{\hyperlink{atmegadci_8c_ab7717822bc6abda59578615741ee2223}{STRING\_PRODUCT}}, atmegadci\_product);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01525}01525 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01526}01526 \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01527}\mbox{\hyperlink{atmegadci_8c_a64a437158e28a4e9d59b5c5c9f42d15b}{01527}} \mbox{\hyperlink{atmegadci_8c_a64a437158e28a4e9d59b5c5c9f42d15b}{atmegadci\_roothub\_exec}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev,}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01528}01528     \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{atmegadci_8c_source_l01529}01529 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01530}01530         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc = \mbox{\hyperlink{atmegadci_8c_a4ec0c34c8aa990c317e29a58e91ae4b9}{ATMEGA\_BUS2SC}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01531}01531         \textcolor{keyword}{const} \textcolor{keywordtype}{void} *ptr;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01532}01532         uint16\_t \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01533}01533         uint16\_t value;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01534}01534         uint16\_t index;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01535}01535         uint8\_t temp;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01536}01536         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01537}01537 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01538}01538         \mbox{\hyperlink{usb__core_8h_adf78e1178dd30ec4a8a53087fe6c7e02}{USB\_BUS\_LOCK\_ASSERT}}(\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}}, MA\_OWNED);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01539}01539 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01540}01540         \textcolor{comment}{/* buffer reset */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01541}01541         ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&sc-\/>\mbox{\hyperlink{structatmegadci__softc_a0217198fbe03dd1ae3202e7ab925696a}{sc\_hub\_temp}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01542}01542         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01543}01543         err = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01544}01544 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01545}01545         value = \mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>wValue);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01546}01546         index = \mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>wIndex);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01547}01547 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01548}01548         \textcolor{comment}{/* demultiplex the control request */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01549}01549 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01550}01550         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bmRequestType) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01551}01551         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a760afaa5e388cb04e742b564e4c509f3}{UT\_READ\_DEVICE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01552}01552                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01553}01553                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_afe0147b1f88f094b26142d372647bd01}{UR\_GET\_DESCRIPTOR}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01554}01554                         \textcolor{keywordflow}{goto} tr\_handle\_get\_descriptor;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01555}01555                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a27856773c79338192e9fc272942ffb2a}{UR\_GET\_CONFIG}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01556}01556                         \textcolor{keywordflow}{goto} tr\_handle\_get\_config;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01557}01557                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01558}01558                         \textcolor{keywordflow}{goto} tr\_handle\_get\_status;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01559}01559                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01560}01560                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01561}01561                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01562}01562                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01563}01563 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01564}01564         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a33c2db425d10f85e7b405035bc015d32}{UT\_WRITE\_DEVICE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01565}01565                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01566}01566                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a2e5fb48757cb795a44b99af832d6cd7d}{UR\_SET\_ADDRESS}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01567}01567                         \textcolor{keywordflow}{goto} tr\_handle\_set\_address;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01568}01568                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a03842765b1d21adb3eb41b3d706ec1aa}{UR\_SET\_CONFIG}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01569}01569                         \textcolor{keywordflow}{goto} tr\_handle\_set\_config;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01570}01570                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01571}01571                         \textcolor{keywordflow}{goto} tr\_valid;  \textcolor{comment}{/* nop */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01572}01572                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a1e9409609a7c66d1d575c53d5b2b39d9}{UR\_SET\_DESCRIPTOR}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01573}01573                         \textcolor{keywordflow}{goto} tr\_valid;  \textcolor{comment}{/* nop */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01574}01574                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01575}01575                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01576}01576                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01577}01577                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01578}01578                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01579}01579 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01580}01580         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ab592eead7baaa45331e0e4768c0259dd}{UT\_WRITE\_ENDPOINT}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01581}01581                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01582}01582                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01583}01583                         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>wValue)) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01584}01584                         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a26900a08e106a6bcb220fac754e1b815}{UF\_ENDPOINT\_HALT}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01585}01585                                 \textcolor{keywordflow}{goto} tr\_handle\_clear\_halt;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01586}01586                         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a62760efb62faf9c62861dd006121cde7}{UF\_DEVICE\_REMOTE\_WAKEUP}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01587}01587                                 \textcolor{keywordflow}{goto} tr\_handle\_clear\_wakeup;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01588}01588                         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01589}01589                                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01590}01590                         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01591}01591                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01592}01592                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01593}01593                         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__endian_8h_aa3860f9452db3a5d865cc943e2f01829}{UGETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>wValue)) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01594}01594                         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a26900a08e106a6bcb220fac754e1b815}{UF\_ENDPOINT\_HALT}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01595}01595                                 \textcolor{keywordflow}{goto} tr\_handle\_set\_halt;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01596}01596                         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a62760efb62faf9c62861dd006121cde7}{UF\_DEVICE\_REMOTE\_WAKEUP}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01597}01597                                 \textcolor{keywordflow}{goto} tr\_handle\_set\_wakeup;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01598}01598                         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01599}01599                                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01600}01600                         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01601}01601                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01602}01602                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a744ab8acdd49be39deee38a2e4c61fae}{UR\_SYNCH\_FRAME}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01603}01603                         \textcolor{keywordflow}{goto} tr\_valid;  \textcolor{comment}{/* nop */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01604}01604                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01605}01605                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01606}01606                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01607}01607                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01608}01608 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01609}01609         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_acfdcbf0400459ac3c17c15f1ccc3794d}{UT\_READ\_ENDPOINT}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01610}01610                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01611}01611                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01612}01612                         \textcolor{keywordflow}{goto} tr\_handle\_get\_ep\_status;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01613}01613                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01614}01614                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01615}01615                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01616}01616                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01617}01617 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01618}01618         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a1c18aa69d1e986a87fcdbfbb624c954f}{UT\_WRITE\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01619}01619                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01620}01620                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ac158866f6b7f31946ace0216225b79cb}{UR\_SET\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01621}01621                         \textcolor{keywordflow}{goto} tr\_handle\_set\_interface;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01622}01622                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01623}01623                         \textcolor{keywordflow}{goto} tr\_valid;  \textcolor{comment}{/* nop */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01624}01624                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01625}01625                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01626}01626                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01627}01627                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01628}01628                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01629}01629 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01630}01630         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_afc6a17fce8bdb62291274b83223eea65}{UT\_READ\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01631}01631                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01632}01632                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a3654eeeab796d0863e7527e3aac772fe}{UR\_GET\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01633}01633                         \textcolor{keywordflow}{goto} tr\_handle\_get\_interface;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01634}01634                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01635}01635                         \textcolor{keywordflow}{goto} tr\_handle\_get\_iface\_status;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01636}01636                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01637}01637                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01638}01638                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01639}01639                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01640}01640 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01641}01641         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ac338c3af82b085859b50582e10fa7cb7}{UT\_WRITE\_CLASS\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01642}01642         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_aedd6820dd0e6fc1afd8346402bfd7990}{UT\_WRITE\_VENDOR\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01643}01643                 \textcolor{comment}{/* XXX forward */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01644}01644                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01645}01645 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01646}01646         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a4f2e0216ffe1d8145cd1385e42c9a707}{UT\_READ\_CLASS\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01647}01647         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a64932f42cb743ef1af70fe9434f0e71f}{UT\_READ\_VENDOR\_INTERFACE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01648}01648                 \textcolor{comment}{/* XXX forward */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01649}01649                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01650}01650 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01651}01651         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a2e2f4f55979f2bd987385ecca0deb448}{UT\_WRITE\_CLASS\_DEVICE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01652}01652                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01653}01653                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01654}01654                         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01655}01655                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a1e9409609a7c66d1d575c53d5b2b39d9}{UR\_SET\_DESCRIPTOR}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01656}01656                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01657}01657                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01658}01658                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01659}01659                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01660}01660                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01661}01661                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01662}01662 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01663}01663         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a2b0da1f1f369841fec9c55cf4df6888b}{UT\_WRITE\_CLASS\_OTHER}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01664}01664                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01665}01665                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a49bd676481c413d1ec4a527664ac02a9}{UR\_CLEAR\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01666}01666                         \textcolor{keywordflow}{goto} tr\_handle\_clear\_port\_feature;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01667}01667                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_af3188459f8546e34ce2d89aa28bc85f1}{UR\_SET\_FEATURE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01668}01668                         \textcolor{keywordflow}{goto} tr\_handle\_set\_port\_feature;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01669}01669                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a44d4b0ff5d9dfa1f511a77a5c02d3d45}{UR\_CLEAR\_TT\_BUFFER}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01670}01670                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a98706aa73be778406ec64d7a2c3f2c68}{UR\_RESET\_TT}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01671}01671                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6e4e96fd45ca7b0afd0ea2ea63daae2c}{UR\_STOP\_TT}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01672}01672                         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01673}01673 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01674}01674                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01675}01675                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01676}01676                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01677}01677                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01678}01678 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01679}01679         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ac619fe4cc188166d4001c4b75365154c}{UT\_READ\_CLASS\_OTHER}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01680}01680                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01681}01681                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a82661d7f0b0812c9668c22cf1905b940}{UR\_GET\_TT\_STATE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01682}01682                         \textcolor{keywordflow}{goto} tr\_handle\_get\_tt\_state;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01683}01683                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01684}01684                         \textcolor{keywordflow}{goto} tr\_handle\_get\_port\_status;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01685}01685                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01686}01686                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01687}01687                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01688}01688                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01689}01689 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01690}01690         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ab6456f1ff04af01cc72ae7aa754cd45f}{UT\_READ\_CLASS\_DEVICE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01691}01691                 \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}-\/>bRequest) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01692}01692                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_afe0147b1f88f094b26142d372647bd01}{UR\_GET\_DESCRIPTOR}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01693}01693                         \textcolor{keywordflow}{goto} tr\_handle\_get\_class\_descriptor;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01694}01694                 \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a473195030530e26d522d795311db634d}{UR\_GET\_STATUS}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01695}01695                         \textcolor{keywordflow}{goto} tr\_handle\_get\_class\_status;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01696}01696 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01697}01697                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01698}01698                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01699}01699                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01700}01700                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01701}01701         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01702}01702                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01703}01703         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01704}01704         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01705}01705 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01706}01706 tr\_handle\_get\_descriptor:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01707}01707         \textcolor{keywordflow}{switch} (value >> 8) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01708}01708         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a91e8696a051fcdd76cd797fa128938a2}{UDESC\_DEVICE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01709}01709                 \textcolor{keywordflow}{if} (value \& 0xff) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01710}01710                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01711}01711                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01712}01712                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{atmegadci_8c_a1176123bed0f80f4a501fa923ab0d8cf}{atmegadci\_devd}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01713}01713                 ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{atmegadci_8c_a1176123bed0f80f4a501fa923ab0d8cf}{atmegadci\_devd}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01714}01714                 \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01715}01715         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a35d8259be2f4b9d3b278e889898a697a}{UDESC\_CONFIG}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01716}01716                 \textcolor{keywordflow}{if} (value \& 0xff) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01717}01717                         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01718}01718                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01719}01719                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{atmegadci_8c_a4961dec98ca27761918965f802e693c8}{atmegadci\_confd}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01720}01720                 ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{atmegadci_8c_a4961dec98ca27761918965f802e693c8}{atmegadci\_confd}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01721}01721                 \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01722}01722         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6b58bb576493debe416ae239bb38267c}{UDESC\_STRING}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01723}01723                 \textcolor{keywordflow}{switch} (value \& 0xff) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01724}01724                 \textcolor{keywordflow}{case} 0:         \textcolor{comment}{/* Language table */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01725}01725                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__core_8c_ae7a7499adfcbdfc7011bb2f90217b482}{usb\_string\_lang\_en}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01726}01726                         ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{usb__core_8c_ae7a7499adfcbdfc7011bb2f90217b482}{usb\_string\_lang\_en}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01727}01727                         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01728}01728 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01729}01729                 \textcolor{keywordflow}{case} 1:         \textcolor{comment}{/* Vendor */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01730}01730                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(atmegadci\_vendor);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01731}01731                         ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&atmegadci\_vendor;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01732}01732                         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01733}01733 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01734}01734                 \textcolor{keywordflow}{case} 2:         \textcolor{comment}{/* Product */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01735}01735                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(atmegadci\_product);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01736}01736                         ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&atmegadci\_product;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01737}01737                         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01738}01738                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01739}01739                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01740}01740                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01741}01741                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01742}01742         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01743}01743                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01744}01744         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01745}01745         \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01746}01746 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01747}01747 tr\_handle\_get\_config:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01748}01748         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01749}01749         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a0217198fbe03dd1ae3202e7ab925696a}{sc\_hub\_temp}}.\mbox{\hyperlink{unionatmegadci__hub__temp_ae2033802d6fd3170726d625ad8415753}{wValue}}[0] = sc-\/>\mbox{\hyperlink{structatmegadci__softc_aa94431a842385d0fe1334add867f7cd9}{sc\_conf}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01750}01750         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01751}01751 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01752}01752 tr\_handle\_get\_status:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01753}01753         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 2;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01754}01754         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structatmegadci__softc_a0217198fbe03dd1ae3202e7ab925696a}{sc\_hub\_temp}}.\mbox{\hyperlink{unionatmegadci__hub__temp_ae2033802d6fd3170726d625ad8415753}{wValue}}, \mbox{\hyperlink{usb_8h_a5df434c22d261f2fcdf9c54080ad0f48}{UDS\_SELF\_POWERED}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01755}01755         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01756}01756 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01757}01757 tr\_handle\_set\_address:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01758}01758         \textcolor{keywordflow}{if} (value \& 0xFF00) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01759}01759                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01760}01760         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01761}01761         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a7f602789225f06d04456f13cf6e6887f}{sc\_rt\_addr}} = value;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01762}01762         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01763}01763 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01764}01764 tr\_handle\_set\_config:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01765}01765         \textcolor{keywordflow}{if} (value >= 2) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01766}01766                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01767}01767         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01768}01768         sc-\/>\mbox{\hyperlink{structatmegadci__softc_aa94431a842385d0fe1334add867f7cd9}{sc\_conf}} = value;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01769}01769         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01770}01770 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01771}01771 tr\_handle\_get\_interface:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01772}01772         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01773}01773         sc-\/>\mbox{\hyperlink{structatmegadci__softc_a0217198fbe03dd1ae3202e7ab925696a}{sc\_hub\_temp}}.\mbox{\hyperlink{unionatmegadci__hub__temp_ae2033802d6fd3170726d625ad8415753}{wValue}}[0] = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01774}01774         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01775}01775 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01776}01776 tr\_handle\_get\_tt\_state:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01777}01777 tr\_handle\_get\_class\_status:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01778}01778 tr\_handle\_get\_iface\_status:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01779}01779 tr\_handle\_get\_ep\_status:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01780}01780         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = 2;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01781}01781         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structatmegadci__softc_a0217198fbe03dd1ae3202e7ab925696a}{sc\_hub\_temp}}.\mbox{\hyperlink{unionatmegadci__hub__temp_ae2033802d6fd3170726d625ad8415753}{wValue}}, 0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01782}01782         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01783}01783 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01784}01784 tr\_handle\_set\_halt:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01785}01785 tr\_handle\_set\_interface:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01786}01786 tr\_handle\_set\_wakeup:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01787}01787 tr\_handle\_clear\_wakeup:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01788}01788 tr\_handle\_clear\_halt:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01789}01789         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01790}01790 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01791}01791 tr\_handle\_clear\_port\_feature:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01792}01792         \textcolor{keywordflow}{if} (index != 1) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01793}01793                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01794}01794         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01795}01795         DPRINTFN(9, \textcolor{stringliteral}{"{}UR\_CLEAR\_PORT\_FEATURE on port \%d\(\backslash\)n"{}}, index);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01796}01796 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01797}01797         \textcolor{keywordflow}{switch} (value) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01798}01798         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6df9599557522c7163bdcb13c9f4095c}{UHF\_PORT\_SUSPEND}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01799}01799                 \mbox{\hyperlink{atmegadci_8c_a02b27b73c20a70a2e920bf7337d2eab3}{atmegadci\_wakeup\_peer}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01800}01800                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01801}01801 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01802}01802         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a8fa7a9a0c538b3c5c683f530f58d7b11}{UHF\_PORT\_ENABLE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01803}01803                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_acd28c9613a38046adbb43d858ee86843}{port\_enabled}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01804}01804                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01805}01805 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01806}01806         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6027a0c92cd4a7619825f6924b44b3fd}{UHF\_PORT\_TEST}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01807}01807         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_acef0673348b3a416db2e1c3c514b79cb}{UHF\_PORT\_INDICATOR}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01808}01808         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_aed1a43dc5a9b1f893ef9b7a4ce0ed279}{UHF\_C\_PORT\_ENABLE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01809}01809         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6df63ab5c3f9e5715c428f42e7309595}{UHF\_C\_PORT\_OVER\_CURRENT}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01810}01810         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ad0f9e88acdd8f7a6e466e9d3ede9b392}{UHF\_C\_PORT\_RESET}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01811}01811                 \textcolor{comment}{/* nops */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01812}01812                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01813}01813         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a25f7d33df63b7439eb79041effad57f8}{UHF\_PORT\_POWER}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01814}01814                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a9e88e81a993a9ef8ab1d04f7338758bd}{port\_powered}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01815}01815                 \mbox{\hyperlink{atmegadci_8c_adb9a956a838d2c30b422609bc7ebaaf3}{atmegadci\_pull\_down}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01816}01816                 \mbox{\hyperlink{atmegadci_8c_a5876c2b37c2599fc774556a7e89cc467}{atmegadci\_clocks\_off}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01817}01817                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01818}01818         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_afe4efdc37762fbdffef921a8ae17e975}{UHF\_C\_PORT\_CONNECTION}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01819}01819                 \textcolor{comment}{/* clear connect change flag */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01820}01820                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_aa3182d5dd2f69694b3abc8068df783da}{change\_connect}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01821}01821 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01822}01822                 \textcolor{keywordflow}{if} (!sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a40170bb08e65486444daf167f313fd58}{status\_bus\_reset}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01823}01823                         \textcolor{comment}{/* we are not connected */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01824}01824                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01825}01825                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01826}01826 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01827}01827                 \textcolor{comment}{/* configure the control endpoint */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01828}01828 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01829}01829                 \textcolor{comment}{/* select endpoint number */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01830}01830                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a52bcbb543c212e30e09e7fc1ffd652a4}{ATMEGA\_UENUM}}, 0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01831}01831 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01832}01832                 \textcolor{comment}{/* set endpoint reset */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01833}01833                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a26fc3884ef3c9c9550b1677b0210a7c0}{ATMEGA\_UERST}}, \mbox{\hyperlink{atmegadci_8h_a7162c2e6d890c94cc9f1ba3cf9ef37b5}{ATMEGA\_UERST\_MASK}}(0));}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01834}01834 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01835}01835                 \textcolor{comment}{/* clear endpoint reset */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01836}01836                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a26fc3884ef3c9c9550b1677b0210a7c0}{ATMEGA\_UERST}}, 0);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01837}01837 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01838}01838                 \textcolor{comment}{/* enable and stall endpoint */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01839}01839                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a9443e514c9ce62d48a8750b551d8a872}{ATMEGA\_UECONX}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01840}01840                     \mbox{\hyperlink{atmegadci_8h_a59e68dadccb67f2bf0bc7eed785b2115}{ATMEGA\_UECONX\_EPEN}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01841}01841                     \mbox{\hyperlink{atmegadci_8h_a6638e843e43e70ee26a8da054ca8358e}{ATMEGA\_UECONX\_STALLRQ}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01842}01842 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01843}01843                 \textcolor{comment}{/* one bank, 64-\/bytes wMaxPacket */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01844}01844                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_a7c8bb390f07a8d4c5636b93b169ebfbf}{ATMEGA\_UECFG0X}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01845}01845                     \mbox{\hyperlink{atmegadci_8h_afef02eaceee62c13f08d9ad1cc0946dc}{ATMEGA\_UECFG0X\_EPTYPE0}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01846}01846                 \mbox{\hyperlink{atmegadci_8h_a1073e5bc060b369c0bd094d6cc151395}{ATMEGA\_WRITE\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_ae18f7ed94422ca87ca2f5fcf701ebabe}{ATMEGA\_UECFG1X}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01847}01847                     \mbox{\hyperlink{atmegadci_8h_a9094825f757defc7bf89e4b79f3fc8b7}{ATMEGA\_UECFG1X\_ALLOC}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01848}01848                     \mbox{\hyperlink{atmegadci_8h_aef02f60d1a3abbce6a4bdeef5e61ff2f}{ATMEGA\_UECFG1X\_EPBK0}} |}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01849}01849                     \mbox{\hyperlink{atmegadci_8h_ae07e3c160023486cdb53714458f60d2f}{ATMEGA\_UECFG1X\_EPSIZE}}(3));}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01850}01850 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01851}01851                 \textcolor{comment}{/* check valid config */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01852}01852                 temp = \mbox{\hyperlink{atmegadci_8h_a15cc9bc5da45b64b514d03964f5afd7b}{ATMEGA\_READ\_1}}(sc, \mbox{\hyperlink{atmegadci_8h_ab8e43d037844eca9122bdc0a918a329f}{ATMEGA\_UESTA0X}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01853}01853                 \textcolor{keywordflow}{if} (!(temp \& \mbox{\hyperlink{atmegadci_8h_a09779063b11402fdbff3d6dcf94de148}{ATMEGA\_UESTA0X\_CFGOK}})) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01854}01854                         device\_printf(sc-\/>\mbox{\hyperlink{structatmegadci__softc_ac9915bd38bd892f40d23d0223929b621}{sc\_bus}}.\mbox{\hyperlink{structusb__bus_a50629655e638e1f775df1ed160d3c533}{bdev}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01855}01855                             \textcolor{stringliteral}{"{}Chip rejected EP0 configuration\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01856}01856                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01857}01857                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01858}01858         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a495feecc17b28cb813521e342360d414}{UHF\_C\_PORT\_SUSPEND}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01859}01859                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a814ac303c9fc29823f328665be7ae7e8}{change\_suspend}} = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01860}01860                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01861}01861         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01862}01862                 err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01863}01863                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01864}01864         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01865}01865         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01866}01866 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01867}01867 tr\_handle\_set\_port\_feature:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01868}01868         \textcolor{keywordflow}{if} (index != 1) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01869}01869                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01870}01870         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01871}01871         DPRINTFN(9, \textcolor{stringliteral}{"{}UR\_SET\_PORT\_FEATURE\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01872}01872 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01873}01873         \textcolor{keywordflow}{switch} (value) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01874}01874         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a8fa7a9a0c538b3c5c683f530f58d7b11}{UHF\_PORT\_ENABLE}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01875}01875                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_acd28c9613a38046adbb43d858ee86843}{port\_enabled}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01876}01876                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01877}01877         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6df9599557522c7163bdcb13c9f4095c}{UHF\_PORT\_SUSPEND}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01878}01878         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_ab7d2ba22c960f8009974c75a79739380}{UHF\_PORT\_RESET}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01879}01879         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a6027a0c92cd4a7619825f6924b44b3fd}{UHF\_PORT\_TEST}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01880}01880         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_acef0673348b3a416db2e1c3c514b79cb}{UHF\_PORT\_INDICATOR}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01881}01881                 \textcolor{comment}{/* nops */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01882}01882                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01883}01883         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb_8h_a25f7d33df63b7439eb79041effad57f8}{UHF\_PORT\_POWER}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01884}01884                 sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a9e88e81a993a9ef8ab1d04f7338758bd}{port\_powered}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01885}01885                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01886}01886         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01887}01887                 err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a91e19b8efd2de831078be0a8d2a030ed}{USB\_ERR\_IOERROR}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01888}01888                 \textcolor{keywordflow}{goto} done;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01889}01889         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01890}01890         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01891}01891 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01892}01892 tr\_handle\_get\_port\_status:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01893}01893 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01894}01894         DPRINTFN(9, \textcolor{stringliteral}{"{}UR\_GET\_PORT\_STATUS\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01895}01895 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01896}01896         \textcolor{keywordflow}{if} (index != 1) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01897}01897                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01898}01898         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01899}01899         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a9f76fc77a39d63eb9abe227c619115d4}{status\_vbus}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01900}01900                 \mbox{\hyperlink{atmegadci_8c_af35160c10228534e4c5beeedeb64bcd3}{atmegadci\_clocks\_on}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01901}01901                 \mbox{\hyperlink{atmegadci_8c_a5d5c430b6c7108410079b5e7d53e41ba}{atmegadci\_pull\_up}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01902}01902         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01903}01903                 \mbox{\hyperlink{atmegadci_8c_adb9a956a838d2c30b422609bc7ebaaf3}{atmegadci\_pull\_down}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01904}01904                 \mbox{\hyperlink{atmegadci_8c_a5876c2b37c2599fc774556a7e89cc467}{atmegadci\_clocks\_off}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01905}01905         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01906}01906 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01907}01907         \textcolor{comment}{/* Select FULL-\/speed and Device Side Mode */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01908}01908 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01909}01909         value = \mbox{\hyperlink{usb_8h_a83113706c3590af2f9b0a00b89a05f76}{UPS\_PORT\_MODE\_DEVICE}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01910}01910 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01911}01911         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a9e88e81a993a9ef8ab1d04f7338758bd}{port\_powered}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01912}01912                 value |= \mbox{\hyperlink{usb_8h_a615d6c17b8159bf4e146f69a1aa36bbc}{UPS\_PORT\_POWER}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01913}01913         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01914}01914         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_acd28c9613a38046adbb43d858ee86843}{port\_enabled}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01915}01915                 value |= \mbox{\hyperlink{usb_8h_aade8d9406d7a4acd137a942f3c830a23}{UPS\_PORT\_ENABLED}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01916}01916         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01917}01917         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a9f76fc77a39d63eb9abe227c619115d4}{status\_vbus}} \&\&}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01918}01918             sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a40170bb08e65486444daf167f313fd58}{status\_bus\_reset}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01919}01919                 value |= \mbox{\hyperlink{usb_8h_ae763504258270b68d4bfe033088208a5}{UPS\_CURRENT\_CONNECT\_STATUS}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01920}01920         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01921}01921         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_ae8096abd5d44a92e25e9204ecb7c4415}{status\_suspend}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01922}01922                 value |= \mbox{\hyperlink{usb_8h_afbcf31f5c8d04b7ea8da8a819675eeef}{UPS\_SUSPEND}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01923}01923         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01924}01924         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structatmegadci__softc_a0217198fbe03dd1ae3202e7ab925696a}{sc\_hub\_temp}}.\mbox{\hyperlink{unionatmegadci__hub__temp_aeea4782b2a603bcb483ed413da8b4dc7}{ps}}.\mbox{\hyperlink{structusb__port__status_a2b6feb27a59da0abd9e91a4ca8f55866}{wPortStatus}}, value);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01925}01925 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01926}01926         value = 0;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01927}01927 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01928}01928         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_aa3182d5dd2f69694b3abc8068df783da}{change\_connect}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01929}01929                 value |= \mbox{\hyperlink{usb_8h_ae67d894f69d3af508dc6696e73b980ee}{UPS\_C\_CONNECT\_STATUS}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01930}01930         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01931}01931         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structatmegadci__softc_a4cc6aef39e815ccaa5f495841f7369b7}{sc\_flags}}.\mbox{\hyperlink{structatmegadci__flags_a814ac303c9fc29823f328665be7ae7e8}{change\_suspend}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01932}01932                 value |= \mbox{\hyperlink{usb_8h_ae2b5e8f919ad7ab52144bbc76128fbc3}{UPS\_C\_SUSPEND}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01933}01933         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01934}01934         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(sc-\/>\mbox{\hyperlink{structatmegadci__softc_a0217198fbe03dd1ae3202e7ab925696a}{sc\_hub\_temp}}.\mbox{\hyperlink{unionatmegadci__hub__temp_aeea4782b2a603bcb483ed413da8b4dc7}{ps}}.\mbox{\hyperlink{structusb__port__status_a5651385a11bdb3346496b276d1053de8}{wPortChange}}, value);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01935}01935         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structatmegadci__softc_a0217198fbe03dd1ae3202e7ab925696a}{sc\_hub\_temp}}.\mbox{\hyperlink{unionatmegadci__hub__temp_aeea4782b2a603bcb483ed413da8b4dc7}{ps}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01936}01936         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01937}01937 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01938}01938 tr\_handle\_get\_class\_descriptor:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01939}01939         \textcolor{keywordflow}{if} (value \& 0xFF) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01940}01940                 \textcolor{keywordflow}{goto} tr\_stalled;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01941}01941         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01942}01942         ptr = (\textcolor{keyword}{const} \textcolor{keywordtype}{void} *)\&\mbox{\hyperlink{atmegadci_8c_a3a46dbf8ffb5fe3109f6f2c99bca9e6b}{atmegadci\_hubd}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01943}01943         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(\mbox{\hyperlink{atmegadci_8c_a3a46dbf8ffb5fe3109f6f2c99bca9e6b}{atmegadci\_hubd}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01944}01944         \textcolor{keywordflow}{goto} tr\_valid;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01945}01945 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01946}01946 tr\_stalled:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01947}01947         err = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945a83258c6183686c303988db96e7f5713a}{USB\_ERR\_STALLED}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01948}01948 tr\_valid:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01949}01949 done:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01950}01950         *plength = \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01951}01951         *\mbox{\hyperlink{usb__if_8m_a074c17a419327b41805af2dd7cb152e7}{pptr}} = ptr;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01952}01952         \textcolor{keywordflow}{return} (err);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01953}01953 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01954}01954 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01955}01955 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01956}\mbox{\hyperlink{atmegadci_8c_a19ab368c27815f0d3c29481d672ea196}{01956}} \mbox{\hyperlink{atmegadci_8c_a19ab368c27815f0d3c29481d672ea196}{atmegadci\_xfer\_setup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__setup__params}{usb\_setup\_params}} *parm)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01957}01957 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01958}01958         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__hw__ep__profile}{usb\_hw\_ep\_profile}} *pf;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01959}01959         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01960}01960         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01961}01961         \textcolor{keywordtype}{void} *last\_obj;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01962}01962         uint32\_t ntd;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01963}01963         uint32\_t \mbox{\hyperlink{if__run_8c_a5a648f5ec00c526b0dfa2df7a272c6c0}{n}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01964}01964         uint8\_t ep\_no;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01965}01965 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01966}01966         sc = \mbox{\hyperlink{atmegadci_8c_a4ec0c34c8aa990c317e29a58e91ae4b9}{ATMEGA\_BUS2SC}}(parm-\/>\mbox{\hyperlink{structusb__setup__params_a9f1d602d76af2261a9f113b707bc56f7}{udev}}-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01967}01967         xfer = parm-\/>\mbox{\hyperlink{structusb__setup__params_aa8ed6ed21704b223bdfa97a3ab0d4c0a}{curr\_xfer}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01968}01968 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01969}01969         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01970}01970 \textcolor{comment}{         * NOTE: This driver does not use any of the parameters that}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01971}01971 \textcolor{comment}{         * are computed from the following values. Just set some}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01972}01972 \textcolor{comment}{         * reasonable dummies:}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01973}01973 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01974}01974         parm-\/>\mbox{\hyperlink{structusb__setup__params_acc9d7b0e32de80b152fb807fba90257c}{hc\_max\_packet\_size}} = 0x500;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01975}01975         parm-\/>\mbox{\hyperlink{structusb__setup__params_a82adfb05fee2d6583bce27791144139d}{hc\_max\_packet\_count}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01976}01976         parm-\/>\mbox{\hyperlink{structusb__setup__params_a1a5b54ff6d8638ae7a0acb0b10020155}{hc\_max\_frame\_size}} = 0x500;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01977}01977 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01978}01978         \mbox{\hyperlink{usb__transfer_8c_a26ac79fd0805b2add1b1dac2cf327a4e}{usbd\_transfer\_setup\_sub}}(parm);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01979}01979 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01980}01980         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01981}01981 \textcolor{comment}{         * compute maximum number of TDs}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01982}01982 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01983}01983         \textcolor{keywordflow}{if} ((xfer-\/>\mbox{\hyperlink{structusb__xfer_a8de3fd948d496c7901b307b13a1c6e99}{endpoint}}-\/>\mbox{\hyperlink{structusb__endpoint_af3b96b9fe1e612b303833c2e2d0365e1}{edesc}}-\/>\mbox{\hyperlink{structusb__endpoint__descriptor_aff28dcc97802a405b31baccd33c2bf8f}{bmAttributes}} \& \mbox{\hyperlink{usb_8h_a8badd3504359a0aed83ac575a46a67b4}{UE\_XFERTYPE}}) == \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01984}01984                 ntd = xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}} + 1 \textcolor{comment}{/* STATUS */} + 1 \textcolor{comment}{/* SYNC 1 */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01985}01985                     + 1 \textcolor{comment}{/* SYNC 2 */} ;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01986}01986         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01987}01987                 ntd = xfer-\/>\mbox{\hyperlink{structusb__xfer_a0d60b7394e3ea099dc1c466efe87c6e2}{nframes}} + 1 \textcolor{comment}{/* SYNC */} ;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01988}01988         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01989}01989 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01990}01990         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01991}01991 \textcolor{comment}{         * check if "{}usbd\_transfer\_setup\_sub"{} set an error}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01992}01992 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01993}01993         \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_ad2543ebaa3709e178a7ad9e56de498e0}{err}})}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01994}01994                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01995}01995 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01996}01996         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01997}01997 \textcolor{comment}{         * allocate transfer descriptors}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01998}01998 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l01999}01999         last\_obj = NULL;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02000}02000 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02001}02001         \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02002}02002 \textcolor{comment}{         * get profile stuff}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02003}02003 \textcolor{comment}{         */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02004}02004         ep\_no = xfer-\/>\mbox{\hyperlink{structusb__xfer_afe9addf10f35e5301cce41ebf42b5db2}{endpointno}} \& \mbox{\hyperlink{usb_8h_a227db1f194f105a22faae81401d3e18e}{UE\_ADDR}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02005}02005         \mbox{\hyperlink{atmegadci_8c_ab00f1df4e7493e60301308aa84b0c6ba}{atmegadci\_get\_hw\_ep\_profile}}(parm-\/>\mbox{\hyperlink{structusb__setup__params_a9f1d602d76af2261a9f113b707bc56f7}{udev}}, \&pf, ep\_no);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02006}02006 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02007}02007         \textcolor{keywordflow}{if} (pf == NULL) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02008}02008                 \textcolor{comment}{/* should not happen */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02009}02009                 parm-\/>\mbox{\hyperlink{structusb__setup__params_ad2543ebaa3709e178a7ad9e56de498e0}{err}} = \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945ac568d752239d287fca75588222df1bdf}{USB\_ERR\_INVAL}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02010}02010                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02011}02011         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02012}02012 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02013}02013         \textcolor{comment}{/* align data */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02014}02014         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{atmegadci_8c_source_l02015}02015 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02016}02016         \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{atmegadci_8c_source_l02017}02017                 \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__td}{atmegadci\_td}} *td;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02018}02018 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02019}02019                 \textcolor{keywordflow}{if} (parm-\/>\mbox{\hyperlink{structusb__setup__params_a3a54a1ffd5caf3ab8718c91cbe78b639}{buf}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02020}02020                         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{atmegadci_8c_source_l02021}02021 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02022}02022                         \textcolor{comment}{/* init TD */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02023}02023                         td-\/>\mbox{\hyperlink{structatmegadci__td_a9ece031e9648bc06d5dc1de71100fc84}{max\_packet\_size}} = xfer-\/>\mbox{\hyperlink{structusb__xfer_aefcde8a630b7adefe68cc72e7e7a5bb5}{max\_packet\_size}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02024}02024                         td-\/>\mbox{\hyperlink{structatmegadci__td_a32e0f8e743b6f949c336e4248b8c3d11}{ep\_no}} = \mbox{\hyperlink{structatmegadci__td_a32e0f8e743b6f949c336e4248b8c3d11}{ep\_no}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02025}02025                         \textcolor{keywordflow}{if} (pf-\/>support\_multi\_buffer) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02026}02026                                 td-\/>\mbox{\hyperlink{structatmegadci__td_a13ba93bcb775849a798c358c7553e4da}{support\_multi\_buffer}} = 1;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02027}02027                         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02028}02028                         td-\/>\mbox{\hyperlink{structatmegadci__td_af764916e1c905c07d91716073860021f}{obj\_next}} = last\_obj;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02029}02029 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02030}02030                         last\_obj = td;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02031}02031                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02032}02032                 parm-\/>\mbox{\hyperlink{structusb__setup__params_a787abf638db3b00e32f70c2d33b41e27}{size}}[0] += \textcolor{keyword}{sizeof}(*td);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02033}02033         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02034}02034 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02035}02035         xfer-\/>\mbox{\hyperlink{structusb__xfer_a68f3cea7860d801fe4e03b3301c9381d}{td\_start}}[0] = last\_obj;}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02036}02036 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02037}02037 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02038}02038 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02039}\mbox{\hyperlink{atmegadci_8c_a02bd217ca377d4ca70ed29585bb5bf13}{02039}} \mbox{\hyperlink{atmegadci_8c_a02bd217ca377d4ca70ed29585bb5bf13}{atmegadci\_xfer\_unsetup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02040}02040 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02041}02041         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02042}02042 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02043}02043 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02044}02044 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02045}\mbox{\hyperlink{atmegadci_8c_ae05fd8b4a7621ff8b536778a38e6bcd4}{02045}} \mbox{\hyperlink{atmegadci_8c_ae05fd8b4a7621ff8b536778a38e6bcd4}{atmegadci\_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{atmegadci_8c_source_l02046}02046     \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__endpoint}{usb\_endpoint}} *ep)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02047}02047 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02048}02048         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc = \mbox{\hyperlink{atmegadci_8c_a4ec0c34c8aa990c317e29a58e91ae4b9}{ATMEGA\_BUS2SC}}(udev-\/>\mbox{\hyperlink{structusb__device_a532e474ebc2a6bfa9512e6fa1aaedf3c}{bus}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02049}02049 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02050}02050         DPRINTFN(2, \textcolor{stringliteral}{"{}endpoint=\%p, addr=\%d, endpt=\%d, mode=\%d (\%d,\%d)\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02051}02051             ep, udev-\/>\mbox{\hyperlink{structusb__device_ab9873df4422a53f4fa2d7c17460b11a1}{address}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02052}02052             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{atmegadci_8c_source_l02053}02053             sc-\/>\mbox{\hyperlink{structatmegadci__softc_a7f602789225f06d04456f13cf6e6887f}{sc\_rt\_addr}}, udev-\/>\mbox{\hyperlink{structusb__device_a5671e9a7365d48bd470879e2b95ea2e5}{device\_index}});}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02054}02054 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02055}02055         \textcolor{keywordflow}{if} (udev-\/>\mbox{\hyperlink{structusb__device_a5671e9a7365d48bd470879e2b95ea2e5}{device\_index}} != sc-\/>\mbox{\hyperlink{structatmegadci__softc_a7f602789225f06d04456f13cf6e6887f}{sc\_rt\_addr}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02056}02056                 \textcolor{keywordflow}{if} (udev-\/>\mbox{\hyperlink{structusb__device_a1fc02abd43bd33f295493ed23debd852}{speed}} != \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ffa0f17d0b9928086c6114fea73e08f1780}{USB\_SPEED\_FULL}}) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02057}02057                         \textcolor{comment}{/* not supported */}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02058}02058                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02059}02059                 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02060}02060                 \textcolor{keywordflow}{if} ((edesc-\/>\mbox{\hyperlink{structusb__endpoint__descriptor_aff28dcc97802a405b31baccd33c2bf8f}{bmAttributes}} \& \mbox{\hyperlink{usb_8h_a8badd3504359a0aed83ac575a46a67b4}{UE\_XFERTYPE}}) == \mbox{\hyperlink{usb_8h_aecbab40f64cd5ffe365b73f7360ea2a3}{UE\_ISOCHRONOUS}})}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02061}02061                         ep-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}} = \&\mbox{\hyperlink{atmegadci_8c_a7013f016e82046a3681eedcbb604f080}{atmegadci\_device\_isoc\_fs\_methods}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02062}02062                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02063}02063                         ep-\/>\mbox{\hyperlink{structusb__endpoint_ab31775284691ffc7392330fea7924f18}{methods}} = \&\mbox{\hyperlink{atmegadci_8c_a1339815657b83494c0c1ebef93d5b7b9}{atmegadci\_device\_non\_isoc\_methods}};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02064}02064         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02065}02065 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02066}02066 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02067}02067 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02068}\mbox{\hyperlink{atmegadci_8c_a40ec37c897a3997b2d1520270daef290}{02068}} \mbox{\hyperlink{atmegadci_8c_a40ec37c897a3997b2d1520270daef290}{atmegadci\_set\_hw\_power\_sleep}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__bus}{usb\_bus}} *bus, uint32\_t state)}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02069}02069 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02070}02070         \textcolor{keyword}{struct }\mbox{\hyperlink{structatmegadci__softc}{atmegadci\_softc}} *sc = \mbox{\hyperlink{atmegadci_8c_a4ec0c34c8aa990c317e29a58e91ae4b9}{ATMEGA\_BUS2SC}}(bus);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02071}02071 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02072}02072         \textcolor{keywordflow}{switch} (state) \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02073}02073         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb__controller_8h_a7059f3b2b6c2ad966a4c72fc57b72de1}{USB\_HW\_POWER\_SUSPEND}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02074}02074                 \mbox{\hyperlink{atmegadci_8c_ac67c8f4b91fdf859087d03b4dcdca89c}{atmegadci\_suspend}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02075}02075                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02076}02076         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb__controller_8h_a9bf3bc2863030915ae241b50188c8f21}{USB\_HW\_POWER\_SHUTDOWN}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02077}02077                 \mbox{\hyperlink{atmegadci_8c_a2ebbd71e1d028d896b69705358db6c29}{atmegadci\_uninit}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02078}02078                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02079}02079         \textcolor{keywordflow}{case} \mbox{\hyperlink{usb__controller_8h_a13be95e61855e5fddce8004288a740ca}{USB\_HW\_POWER\_RESUME}}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02080}02080                 \mbox{\hyperlink{atmegadci_8c_a09eb192d290e9bcfb5730b2cb397934c}{atmegadci\_resume}}(sc);}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02081}02081                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02082}02082         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02083}02083                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02084}02084         \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02085}02085 \}}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02086}02086 }
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02087}02087 \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__bus__methods}{usb\_bus\_methods}} \mbox{\hyperlink{atmegadci_8c_a72940840b9a037001efaf61acf92c3c0}{atmegadci\_bus\_methods}} =}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02088}02088 \{}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02089}02089         .\mbox{\hyperlink{structusb__bus__methods_ae9169cdc4fe46a61286ad14aa59c3a31}{endpoint\_init}} = \&\mbox{\hyperlink{atmegadci_8c_ae05fd8b4a7621ff8b536778a38e6bcd4}{atmegadci\_ep\_init}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02090}02090         .xfer\_setup = \&\mbox{\hyperlink{atmegadci_8c_a19ab368c27815f0d3c29481d672ea196}{atmegadci\_xfer\_setup}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02091}02091         .xfer\_unsetup = \&\mbox{\hyperlink{atmegadci_8c_a02bd217ca377d4ca70ed29585bb5bf13}{atmegadci\_xfer\_unsetup}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02092}02092         .get\_hw\_ep\_profile = \&\mbox{\hyperlink{atmegadci_8c_ab00f1df4e7493e60301308aa84b0c6ba}{atmegadci\_get\_hw\_ep\_profile}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02093}02093         .xfer\_stall = \&\mbox{\hyperlink{atmegadci_8c_ace8d5f0058c5cadcaafecdf524013ae7}{atmegadci\_xfer\_stall}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02094}02094         .set\_stall = \&\mbox{\hyperlink{atmegadci_8c_a36436ac24ad1d54c11d4375cab3a30d1}{atmegadci\_set\_stall}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02095}02095         .clear\_stall = \&\mbox{\hyperlink{atmegadci_8c_a79aeb5cd8b4ff4487a8efebb475a5b31}{atmegadci\_clear\_stall}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02096}02096         .roothub\_exec = \&\mbox{\hyperlink{atmegadci_8c_a64a437158e28a4e9d59b5c5c9f42d15b}{atmegadci\_roothub\_exec}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02097}02097         .xfer\_poll = \&\mbox{\hyperlink{atmegadci_8c_ab515c07746e43584b0fa5367ceae3400}{atmegadci\_do\_poll}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02098}02098         .set\_hw\_power\_sleep = \&\mbox{\hyperlink{atmegadci_8c_a40ec37c897a3997b2d1520270daef290}{atmegadci\_set\_hw\_power\_sleep}},}
\DoxyCodeLine{\Hypertarget{atmegadci_8c_source_l02099}02099 \};}

\end{DoxyCode}
