\hypertarget{usb__transfer_8h_source}{}\doxysection{usb\+\_\+transfer.\+h}
\label{usb__transfer_8h_source}\index{dev/usb/usb\_transfer.h@{dev/usb/usb\_transfer.h}}
\mbox{\hyperlink{usb__transfer_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00001}00001 \textcolor{comment}{/* \$FreeBSD\$ */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00002}00002 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00003}00003 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00004}00004 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00005}00005 \textcolor{comment}{ * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00027}00027 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00028}00028 }
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00029}00029 \textcolor{preprocessor}{\#ifndef \_USB\_TRANSFER\_H\_}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00030}00030 \textcolor{preprocessor}{\#define \_USB\_TRANSFER\_H\_}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00031}00031 }
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00032}00032 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00033}00033 \textcolor{comment}{ * A few words about USB transfer states:}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00034}00034 \textcolor{comment}{ * ======================================}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00035}00035 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00036}00036 \textcolor{comment}{ * USB transfers can have multiple states, because they can be}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00037}00037 \textcolor{comment}{ * cancelled and started again and this cannot always be done}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00038}00038 \textcolor{comment}{ * atomically under a mutex. One reason for this is that the USB}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00039}00039 \textcolor{comment}{ * hardware sometimes needs to wait for DMA controllers to finish}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00040}00040 \textcolor{comment}{ * which is done asynchronously and grows the statemachine.}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00041}00041 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00043}00043 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00044}00044 \textcolor{comment}{ * The following structure defines the messages that is used to signal}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00045}00045 \textcolor{comment}{ * the "{}done\_p"{} USB process.}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00046}00046 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00047}\mbox{\hyperlink{structusb__done__msg}{00047}} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__done__msg}{usb\_done\_msg}} \{}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00048}\mbox{\hyperlink{structusb__done__msg_a993a3ec86d04b02078dee26909cf8264}{00048}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__proc__msg}{usb\_proc\_msg}} \mbox{\hyperlink{structusb__done__msg_a993a3ec86d04b02078dee26909cf8264}{hdr}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00049}\mbox{\hyperlink{structusb__done__msg_ade7e5302f1a8f24aaea2d92d48b3c56e}{00049}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer__root}{usb\_xfer\_root}} *\mbox{\hyperlink{structusb__done__msg_ade7e5302f1a8f24aaea2d92d48b3c56e}{xroot}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00050}00050 \};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00052}\mbox{\hyperlink{usb__transfer_8h_a93bca45b3152750a7652f9df1094990d}{00052}} \textcolor{preprocessor}{\#define USB\_DMATAG\_TO\_XROOT(dpt)                                \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00053}00053 \textcolor{preprocessor}{        \_\_containerof(dpt, struct usb\_xfer\_root, dma\_parent\_tag)}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00054}00054 }
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00055}00055 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00056}00056 \textcolor{comment}{ * The following structure is used to keep information about memory}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00057}00057 \textcolor{comment}{ * that should be automatically freed at the moment all USB transfers}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00058}00058 \textcolor{comment}{ * have been freed.}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00059}00059 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00060}\mbox{\hyperlink{structusb__xfer__root}{00060}} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer__root}{usb\_xfer\_root}} \{}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00061}\mbox{\hyperlink{structusb__xfer__root_a0661f300cc267581c7b75bd7b2d674a3}{00061}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__dma__parent__tag}{usb\_dma\_parent\_tag}} \mbox{\hyperlink{structusb__xfer__root_a0661f300cc267581c7b75bd7b2d674a3}{dma\_parent\_tag}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00062}00062 \textcolor{preprocessor}{\#if USB\_HAVE\_BUSDMA}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00063}00063         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer__queue}{usb\_xfer\_queue}} dma\_q;}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00064}00064 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00065}\mbox{\hyperlink{structusb__xfer__root_a345eba597fa8b44e93bea4c9518a23ae}{00065}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer__queue}{usb\_xfer\_queue}} \mbox{\hyperlink{structusb__xfer__root_a345eba597fa8b44e93bea4c9518a23ae}{done\_q}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00066}\mbox{\hyperlink{structusb__xfer__root_a318a3fc48093802a8df986b562ff980f}{00066}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__done__msg}{usb\_done\_msg}} \mbox{\hyperlink{structusb__xfer__root_a318a3fc48093802a8df986b562ff980f}{done\_m}}[2];}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00067}\mbox{\hyperlink{structusb__xfer__root_a47c3b1799459f7e1cd7cbbe4d749f36b}{00067}}         \textcolor{keyword}{struct }cv \mbox{\hyperlink{structusb__xfer__root_a47c3b1799459f7e1cd7cbbe4d749f36b}{cv\_drain}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00068}00068 }
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00069}\mbox{\hyperlink{structusb__xfer__root_a4265442b0e4b34aa95f6fe0be17cffda}{00069}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__process}{usb\_process}} *\mbox{\hyperlink{structusb__xfer__root_a4265442b0e4b34aa95f6fe0be17cffda}{done\_p}};    \textcolor{comment}{/* pointer to callback process */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00070}\mbox{\hyperlink{structusb__xfer__root_a40c404df951c72cc43f2b75c7ed4a502}{00070}}         \textcolor{keywordtype}{void}   *\mbox{\hyperlink{structusb__xfer__root_a40c404df951c72cc43f2b75c7ed4a502}{memory\_base}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00071}\mbox{\hyperlink{structusb__xfer__root_a421dfed4aa4ba0e2a7e2a2a38ec387ae}{00071}}         \textcolor{keyword}{struct }mtx *\mbox{\hyperlink{structusb__xfer__root_a421dfed4aa4ba0e2a7e2a2a38ec387ae}{xfer\_mtx}};   \textcolor{comment}{/* cannot be changed during operation */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00072}00072 \textcolor{preprocessor}{\#if USB\_HAVE\_BUSDMA}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00073}00073         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *dma\_page\_cache\_start;}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00074}00074         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *dma\_page\_cache\_end;}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00075}00075 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00076}\mbox{\hyperlink{structusb__xfer__root_a158c4441e4b5f1cb61b0ed4039e9ee26}{00076}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *\mbox{\hyperlink{structusb__xfer__root_a158c4441e4b5f1cb61b0ed4039e9ee26}{xfer\_page\_cache\_start}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00077}\mbox{\hyperlink{structusb__xfer__root_a17b9c328729a9a3a8ccbfce9981a05b3}{00077}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *\mbox{\hyperlink{structusb__xfer__root_a17b9c328729a9a3a8ccbfce9981a05b3}{xfer\_page\_cache\_end}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00078}\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{00078}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__bus}{usb\_bus}} *\mbox{\hyperlink{structusb__xfer__root_a870218d57253f00f1e9baa19401c9b0c}{bus}};          \textcolor{comment}{/* pointer to USB bus (cached) */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00079}\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{00079}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device}{usb\_device}} *\mbox{\hyperlink{structusb__xfer__root_ad636fcdafa42c174cdf281bb144b1e67}{udev}};  \textcolor{comment}{/* pointer to USB device */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00081}\mbox{\hyperlink{structusb__xfer__root_ab5b17b7340bc641e080839cbe5a0c28b}{00081}}         \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} \mbox{\hyperlink{structusb__xfer__root_ab5b17b7340bc641e080839cbe5a0c28b}{memory\_size}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00082}\mbox{\hyperlink{structusb__xfer__root_a574bdbab5bd5cd6da4a479fb8ff30b00}{00082}}         \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} \mbox{\hyperlink{structusb__xfer__root_a574bdbab5bd5cd6da4a479fb8ff30b00}{setup\_refcount}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00083}00083 \textcolor{preprocessor}{\#if USB\_HAVE\_BUSDMA}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00084}00084         \mbox{\hyperlink{usb__freebsd_8h_ace73c4fca228e0d4c98bc32c063b0714}{usb\_frcount\_t}} dma\_nframes; \textcolor{comment}{/* number of page caches to load */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00085}00085         \mbox{\hyperlink{usb__freebsd_8h_ace73c4fca228e0d4c98bc32c063b0714}{usb\_frcount\_t}} dma\_currframe;       \textcolor{comment}{/* currect page cache number */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00086}00086         \mbox{\hyperlink{usb__freebsd_8h_a66bb6b1869e5e89aff3b693720b39cfb}{usb\_frlength\_t}} dma\_frlength\_0;    \textcolor{comment}{/* length of page cache zero */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00087}00087         uint8\_t dma\_error;              \textcolor{comment}{/* set if virtual memory could not be}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00088}00088 \textcolor{comment}{                                         * loaded */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00089}00089 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00090}\mbox{\hyperlink{structusb__xfer__root_a8b4e674872b976ff75f9a78cf804bb19}{00090}}         uint8\_t \mbox{\hyperlink{structusb__xfer__root_a8b4e674872b976ff75f9a78cf804bb19}{done\_sleep}};           \textcolor{comment}{/* set if done thread is sleeping */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00091}00091 \};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00092}00092 }
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00093}00093 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00094}00094 \textcolor{comment}{ * The following structure is used when setting up an array of USB}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00095}00095 \textcolor{comment}{ * transfers.}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00096}00096 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00097}\mbox{\hyperlink{structusb__setup__params}{00097}} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__setup__params}{usb\_setup\_params}} \{}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00098}\mbox{\hyperlink{structusb__setup__params_afda9974e0f68ef178b467770bd25f5f1}{00098}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__dma__tag}{usb\_dma\_tag}} *\mbox{\hyperlink{structusb__setup__params_afda9974e0f68ef178b467770bd25f5f1}{dma\_tag\_p}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00099}\mbox{\hyperlink{structusb__setup__params_a90fc2ca2ac308dc56afa6ece4ab70e3c}{00099}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page}{usb\_page}} *\mbox{\hyperlink{structusb__setup__params_a90fc2ca2ac308dc56afa6ece4ab70e3c}{dma\_page\_ptr}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00100}\mbox{\hyperlink{structusb__setup__params_a7e61938ae46ec5231e920a07a8cd043d}{00100}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *\mbox{\hyperlink{structusb__setup__params_a7e61938ae46ec5231e920a07a8cd043d}{dma\_page\_cache\_ptr}};      \textcolor{comment}{/* these will be}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00101}00101 \textcolor{comment}{                                                         * auto-\/freed */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00102}\mbox{\hyperlink{structusb__setup__params_ab8966c98f5d29da7d0208adf2858265f}{00102}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *\mbox{\hyperlink{structusb__setup__params_ab8966c98f5d29da7d0208adf2858265f}{xfer\_page\_cache\_ptr}};    \textcolor{comment}{/* these will not be}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00103}00103 \textcolor{comment}{                                                         * auto-\/freed */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00104}\mbox{\hyperlink{structusb__setup__params_a9f1d602d76af2261a9f113b707bc56f7}{00104}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device}{usb\_device}} *\mbox{\hyperlink{structusb__setup__params_a9f1d602d76af2261a9f113b707bc56f7}{udev}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00105}\mbox{\hyperlink{structusb__setup__params_aa8ed6ed21704b223bdfa97a3ab0d4c0a}{00105}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *\mbox{\hyperlink{structusb__setup__params_aa8ed6ed21704b223bdfa97a3ab0d4c0a}{curr\_xfer}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00106}\mbox{\hyperlink{structusb__setup__params_aefbdeaa3e716d667f4b270978370a415}{00106}}         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} *\mbox{\hyperlink{structusb__setup__params_aefbdeaa3e716d667f4b270978370a415}{curr\_setup}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00107}\mbox{\hyperlink{structusb__setup__params_ada6e8220c275d4a1a28383d76aab878f}{00107}}         \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__pipe__methods}{usb\_pipe\_methods}} *\mbox{\hyperlink{structusb__setup__params_ada6e8220c275d4a1a28383d76aab878f}{methods}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00108}\mbox{\hyperlink{structusb__setup__params_a3a54a1ffd5caf3ab8718c91cbe78b639}{00108}}         \textcolor{keywordtype}{void}   *\mbox{\hyperlink{structusb__setup__params_a3a54a1ffd5caf3ab8718c91cbe78b639}{buf}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00109}\mbox{\hyperlink{structusb__setup__params_aef384c3b2cb84894ae6784f2a48ab5e3}{00109}}         \mbox{\hyperlink{usb__freebsd_8h_a66bb6b1869e5e89aff3b693720b39cfb}{usb\_frlength\_t}} *\mbox{\hyperlink{structusb__setup__params_aef384c3b2cb84894ae6784f2a48ab5e3}{xfer\_length\_ptr}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00110}00110 }
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00111}\mbox{\hyperlink{structusb__setup__params_a787abf638db3b00e32f70c2d33b41e27}{00111}}         \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} \mbox{\hyperlink{structusb__setup__params_a787abf638db3b00e32f70c2d33b41e27}{size}}[7];}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00112}\mbox{\hyperlink{structusb__setup__params_a54de65a672cf46cb885132943f68d2a7}{00112}}         \mbox{\hyperlink{usb__freebsd_8h_a66bb6b1869e5e89aff3b693720b39cfb}{usb\_frlength\_t}} \mbox{\hyperlink{structusb__setup__params_a54de65a672cf46cb885132943f68d2a7}{bufsize}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00113}\mbox{\hyperlink{structusb__setup__params_acedb5493f63bd41ccf7652fff1ebb616}{00113}}         \mbox{\hyperlink{usb__freebsd_8h_a66bb6b1869e5e89aff3b693720b39cfb}{usb\_frlength\_t}} \mbox{\hyperlink{structusb__setup__params_acedb5493f63bd41ccf7652fff1ebb616}{bufsize\_max}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00114}00114 }
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00115}\mbox{\hyperlink{structusb__setup__params_a1a5b54ff6d8638ae7a0acb0b10020155}{00115}}         uint32\_t \mbox{\hyperlink{structusb__setup__params_a1a5b54ff6d8638ae7a0acb0b10020155}{hc\_max\_frame\_size}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00116}\mbox{\hyperlink{structusb__setup__params_acc9d7b0e32de80b152fb807fba90257c}{00116}}         uint16\_t \mbox{\hyperlink{structusb__setup__params_acc9d7b0e32de80b152fb807fba90257c}{hc\_max\_packet\_size}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00117}\mbox{\hyperlink{structusb__setup__params_a82adfb05fee2d6583bce27791144139d}{00117}}         uint8\_t \mbox{\hyperlink{structusb__setup__params_a82adfb05fee2d6583bce27791144139d}{hc\_max\_packet\_count}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00118}\mbox{\hyperlink{structusb__setup__params_aea4ab21578342e03467d3f7792a81e80}{00118}}         \textcolor{keyword}{enum} \mbox{\hyperlink{usb_8h_a97e7c882fa8cd21898173a29471616ff}{usb\_dev\_speed}} \mbox{\hyperlink{structusb__setup__params_aea4ab21578342e03467d3f7792a81e80}{speed}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00119}\mbox{\hyperlink{structusb__setup__params_a709c7d7fcdd3152462c3baa3bceba6fe}{00119}}         uint8\_t \mbox{\hyperlink{structusb__setup__params_a709c7d7fcdd3152462c3baa3bceba6fe}{dma\_tag\_max}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00120}\mbox{\hyperlink{structusb__setup__params_ad2543ebaa3709e178a7ad9e56de498e0}{00120}}         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{structusb__setup__params_ad2543ebaa3709e178a7ad9e56de498e0}{err}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00121}00121 \};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00122}00122 }
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00123}00123 \textcolor{comment}{/* function prototypes */}}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00124}00124 }
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00125}\mbox{\hyperlink{usb__transfer_8h_a340073210a5be29d27fd51f0c0a87b3d}{00125}} uint8\_t \mbox{\hyperlink{usb__transfer_8h_a340073210a5be29d27fd51f0c0a87b3d}{usbd\_transfer\_setup\_sub\_malloc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__setup__params}{usb\_setup\_params}} *parm,}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00126}00126             \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} **ppc, \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} \mbox{\hyperlink{if__axge_8c_ae5dc6ffcd9b7605c7787791e40cc6bb0}{size}}, \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} align,}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00127}00127             \mbox{\hyperlink{usb__freebsd_8h_aef76bd5158b84c44681a07bc5f22aff1}{usb\_size\_t}} count);}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00128}00128 \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__transfer_8h_a90a0ff80a1c73db68fdb819987a45f92}{usb\_dma\_delay\_done\_cb}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *);}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00129}00129 \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__transfer_8h_aa355af68deedaf28083bd00182061445}{usb\_command\_wrapper}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer__queue}{usb\_xfer\_queue}} *pq,}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00130}00130             \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer);}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00131}00131 \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__transfer_8h_a1225d2a91b2e437d1f0afec7c68f5c34}{usbd\_pipe\_enter}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer);}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00132}00132 \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__transfer_8h_ab709632f75e8b0921b2f75fdbaac5166}{usbd\_pipe\_start}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer__queue}{usb\_xfer\_queue}} *pq);}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00133}00133 \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__transfer_8h_a8ae226e60d0a46334139efe0d9f304c1}{usbd\_transfer\_dequeue}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer);}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00134}00134 \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__transfer_8h_a3141421f88316987bbc9b10e36715faf}{usbd\_transfer\_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{usb__transfer_8h_source_l00135}00135 \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__transfer_8h_abfdcc46256df403f3f4d1b02db7ccb16}{usbd\_transfer\_enqueue}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer__queue}{usb\_xfer\_queue}} *pq,}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00136}00136             \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer);}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00137}00137 \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__transfer_8h_a26ac79fd0805b2add1b1dac2cf327a4e}{usbd\_transfer\_setup\_sub}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__setup__params}{usb\_setup\_params}} *parm);}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00138}00138 \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__transfer_8h_a46c7d94f74c7dbba30c49e44399d2fed}{usbd\_ctrl\_transfer\_setup}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev);}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00139}00139 \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__transfer_8h_ae749e9ea0cf82a4d8486c0d8a0c04775}{usbd\_clear\_stall\_locked}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev,}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00140}00140             \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__endpoint}{usb\_endpoint}} *ep);}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00141}00141 \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__transfer_8h_af0af41ee8b38c9c06835b49f59c00474}{usbd\_clear\_data\_toggle}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev,}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00142}00142             \textcolor{keyword}{struct} \mbox{\hyperlink{structusb__endpoint}{usb\_endpoint}} *ep);}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00143}\mbox{\hyperlink{usb__transfer_8h_a4785bd2f7eef274658805e7f4435b803}{00143}} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{usb__transfer_8h_a4785bd2f7eef274658805e7f4435b803}{usbd\_do\_request\_callback}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00144}\mbox{\hyperlink{usb__transfer_8h_a117d947a7f987ae2f68c23b08bee93ac}{00144}} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{usb__transfer_8h_a117d947a7f987ae2f68c23b08bee93ac}{usb\_handle\_request\_callback}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00145}\mbox{\hyperlink{usb__transfer_8h_a323714fff67693ae8a3a723cd59bf07a}{00145}} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{usb__transfer_8h_a323714fff67693ae8a3a723cd59bf07a}{usb\_do\_clear\_stall\_callback}};}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00146}00146 \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__transfer_8h_ad2a08e4791c74765a0ecc20d5894ab36}{usbd\_transfer\_timeout\_ms}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer,}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00147}00147             \textcolor{keywordtype}{void} (*cb) (\textcolor{keywordtype}{void} *arg), \mbox{\hyperlink{usb__freebsd_8h_ad024d1bfb97f4cb78c73989e05d13176}{usb\_timeout\_t}} ms);}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00148}00148 \mbox{\hyperlink{usb__freebsd_8h_ad024d1bfb97f4cb78c73989e05d13176}{usb\_timeout\_t}} \mbox{\hyperlink{usb__transfer_8h_a9503a6f229c914a68a4b34ad426bbf86}{usbd\_get\_dma\_delay}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__device}{usb\_device}} *udev);}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00149}\mbox{\hyperlink{usb__transfer_8h_a5867b9194ab0ed3a93ab1d6a44bfb26a}{00149}} \textcolor{keywordtype}{void}    \mbox{\hyperlink{usb__transfer_8h_a5867b9194ab0ed3a93ab1d6a44bfb26a}{usbd\_transfer\_power\_ref}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \textcolor{keywordtype}{int} \mbox{\hyperlink{if__rum_8c_ae1f13e96d928504e11ec4da744f67f9b}{val}});}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00150}00150 uint8\_t \mbox{\hyperlink{usb__transfer_8h_aebe24e11559a25fcb3a4bc49c1ea5ec3}{usbd\_xfer\_get\_isochronous\_start\_frame}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *, uint32\_t, uint32\_t, uint32\_t, uint32\_t, uint32\_t *);}
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00151}00151 }
\DoxyCodeLine{\Hypertarget{usb__transfer_8h_source_l00152}00152 \textcolor{preprocessor}{\#endif                                  }\textcolor{comment}{/* \_USB\_TRANSFER\_H\_ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
