\hypertarget{ucycom_8c_source}{}\doxysection{ucycom.\+c}
\label{ucycom_8c_source}\index{dev/usb/serial/ucycom.c@{dev/usb/serial/ucycom.c}}
\mbox{\hyperlink{ucycom_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00001}00001 \textcolor{preprocessor}{\#include <sys/cdefs.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00002}\mbox{\hyperlink{ucycom_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{00002}} \mbox{\hyperlink{ucycom_8c_a8c3ef283470a68cd30afe9b8a72cb60f}{\_\_FBSDID}}(\textcolor{stringliteral}{"{}\$FreeBSD\$"{}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00003}00003 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00004}00004 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00005}00005 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00007}00007 \textcolor{comment}{ * Copyright (c) 2004 Dag-\/Erling Coïdan Smørgrav}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00008}00008 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00009}00009 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00010}00010 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00011}00011 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00012}00012 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00013}00013 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00014}00014 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00015}00015 \textcolor{comment}{ *    in this position and unchanged.}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00016}00016 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00017}00017 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00018}00018 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00019}00019 \textcolor{comment}{ * 3. The name of the author may not be used to endorse or promote products}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00020}00020 \textcolor{comment}{ *    derived from this software without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00021}00021 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00022}00022 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00023}00023 \textcolor{comment}{ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00024}00024 \textcolor{comment}{ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00025}00025 \textcolor{comment}{ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00026}00026 \textcolor{comment}{ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00027}00027 \textcolor{comment}{ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00028}00028 \textcolor{comment}{ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00029}00029 \textcolor{comment}{ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00030}00030 \textcolor{comment}{ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00031}00031 \textcolor{comment}{ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00032}00032 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00034}00034 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00035}00035 \textcolor{comment}{ * Device driver for Cypress CY7C637xx and CY7C640/1xx series USB to}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00036}00036 \textcolor{comment}{ * RS232 bridges.}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00037}00037 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00038}00038 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00039}00039 \textcolor{preprocessor}{\#include <sys/stdint.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00040}00040 \textcolor{preprocessor}{\#include <sys/stddef.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00041}00041 \textcolor{preprocessor}{\#include <sys/param.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00042}00042 \textcolor{preprocessor}{\#include <sys/queue.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00043}00043 \textcolor{preprocessor}{\#include <sys/types.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00044}00044 \textcolor{preprocessor}{\#include <sys/systm.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00045}00045 \textcolor{preprocessor}{\#include <sys/kernel.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00046}00046 \textcolor{preprocessor}{\#include <sys/bus.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00047}00047 \textcolor{preprocessor}{\#include <sys/module.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00048}00048 \textcolor{preprocessor}{\#include <sys/lock.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00049}00049 \textcolor{preprocessor}{\#include <sys/mutex.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00050}00050 \textcolor{preprocessor}{\#include <sys/condvar.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00051}00051 \textcolor{preprocessor}{\#include <sys/sysctl.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00052}00052 \textcolor{preprocessor}{\#include <sys/sx.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00053}00053 \textcolor{preprocessor}{\#include <sys/unistd.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00054}00054 \textcolor{preprocessor}{\#include <sys/callout.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00055}00055 \textcolor{preprocessor}{\#include <sys/malloc.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00056}00056 \textcolor{preprocessor}{\#include <sys/priv.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00057}00057 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00058}00058 \textcolor{preprocessor}{\#include <dev/hid/hid.h>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00060}00060 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb_8h}{dev/usb/usb.h}}>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00061}00061 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi_8h}{dev/usb/usbdi.h}}>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00062}00062 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbdi__util_8h}{dev/usb/usbdi\_util.h}}>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00063}00063 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usbhid_8h}{dev/usb/usbhid.h}}>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00064}00064 \textcolor{preprocessor}{\#include "{}usbdevs.h"{}}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00066}\mbox{\hyperlink{ucycom_8c_a927dd6f59caf10a2991dfb564bcbb1e1}{00066}} \textcolor{preprocessor}{\#define USB\_DEBUG\_VAR usb\_debug}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00067}00067 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__debug_8h}{dev/usb/usb\_debug.h}}>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00068}00068 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__process_8h}{dev/usb/usb\_process.h}}>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00070}00070 \textcolor{preprocessor}{\#include <\mbox{\hyperlink{usb__serial_8h}{dev/usb/serial/usb\_serial.h}}>}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00071}00071 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00072}\mbox{\hyperlink{ucycom_8c_a84d05459dcbf4f3d8366e65fc0cb7630}{00072}} \textcolor{preprocessor}{\#define UCYCOM\_MAX\_IOLEN        (1024 + 2)      }\textcolor{comment}{/* bytes */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00073}00073 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00074}\mbox{\hyperlink{ucycom_8c_a58e8aaf56a3787fde39a02421fe1ec48}{00074}} \textcolor{preprocessor}{\#define UCYCOM\_IFACE\_INDEX      0}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00075}00075 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00076}00076 \textcolor{keyword}{enum} \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00077}\mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719a2c14177e7469eb9a0dcd77271cd04632}{00077}}         \mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719a2c14177e7469eb9a0dcd77271cd04632}{UCYCOM\_CTRL\_RD}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00078}\mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719a491bd1d30c3232f105ea4e14132be6ca}{00078}}         \mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719a491bd1d30c3232f105ea4e14132be6ca}{UCYCOM\_INTR\_RD}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00079}\mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719aa8d7878185620b5d65169f4daf24501e}{00079}}         \mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719aa8d7878185620b5d65169f4daf24501e}{UCYCOM\_N\_TRANSFER}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00080}00080 \};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00082}\mbox{\hyperlink{structucycom__softc}{00082}} \textcolor{keyword}{struct }\mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00083}\mbox{\hyperlink{structucycom__softc_a06601833c9237b408f5e6e9b43ed84f1}{00083}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structucom__super__softc}{ucom\_super\_softc}} \mbox{\hyperlink{structucycom__softc_a06601833c9237b408f5e6e9b43ed84f1}{sc\_super\_ucom}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00084}\mbox{\hyperlink{structucycom__softc_a6dbebbfb80cb388f97fa2beb7f750b95}{00084}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structucom__softc}{ucom\_softc}} \mbox{\hyperlink{structucycom__softc_a6dbebbfb80cb388f97fa2beb7f750b95}{sc\_ucom}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00085}00085 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00086}\mbox{\hyperlink{structucycom__softc_a41877d85df56a68bd1a28e94e826289d}{00086}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device}{usb\_device}} *\mbox{\hyperlink{structucycom__softc_a41877d85df56a68bd1a28e94e826289d}{sc\_udev}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00087}\mbox{\hyperlink{structucycom__softc_a6907b8c8a64ecf591415803be4adddaa}{00087}}         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *\mbox{\hyperlink{structucycom__softc_a6907b8c8a64ecf591415803be4adddaa}{sc\_xfer}}[\mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719aa8d7878185620b5d65169f4daf24501e}{UCYCOM\_N\_TRANSFER}}];}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00088}\mbox{\hyperlink{structucycom__softc_a8ae5bc6364876122c266c02485012663}{00088}}         \textcolor{keyword}{struct }mtx \mbox{\hyperlink{structucycom__softc_a8ae5bc6364876122c266c02485012663}{sc\_mtx}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00089}00089 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00090}\mbox{\hyperlink{structucycom__softc_ac2490944c56f5c84554cfec118bf8bf3}{00090}}         uint32\_t \mbox{\hyperlink{structucycom__softc_ac2490944c56f5c84554cfec118bf8bf3}{sc\_model}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00091}\mbox{\hyperlink{ucycom_8c_ab5f14b8ddb66783d03377155404c6e4f}{00091}} \textcolor{preprocessor}{\#define MODEL\_CY7C63743         0x63743}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00092}\mbox{\hyperlink{ucycom_8c_a221e3b8946b81091edeb22a822dfe194}{00092}} \textcolor{preprocessor}{\#define MODEL\_CY7C64013         0x64013}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00093}00093 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00094}\mbox{\hyperlink{structucycom__softc_a64cac571d14c416cd1ae9e9b45b26956}{00094}}         uint16\_t \mbox{\hyperlink{structucycom__softc_a64cac571d14c416cd1ae9e9b45b26956}{sc\_flen}};                \textcolor{comment}{/* feature report length */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00095}\mbox{\hyperlink{structucycom__softc_a755f4f516781b372ef577f1b16d5fa84}{00095}}         uint16\_t \mbox{\hyperlink{structucycom__softc_a755f4f516781b372ef577f1b16d5fa84}{sc\_ilen}};                \textcolor{comment}{/* input report length */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00096}\mbox{\hyperlink{structucycom__softc_a1f13af54b658f00945fef9618fd0ea62}{00096}}         uint16\_t \mbox{\hyperlink{structucycom__softc_a1f13af54b658f00945fef9618fd0ea62}{sc\_olen}};                \textcolor{comment}{/* output report length */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00097}00097 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00098}\mbox{\hyperlink{structucycom__softc_a0da235355aa3dafb41e90fb97a040d75}{00098}}         uint8\_t \mbox{\hyperlink{structucycom__softc_a0da235355aa3dafb41e90fb97a040d75}{sc\_fid}};                   \textcolor{comment}{/* feature report id */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00099}\mbox{\hyperlink{structucycom__softc_a9d513cc789e0571736848880507f6022}{00099}}         uint8\_t \mbox{\hyperlink{structucycom__softc_a9d513cc789e0571736848880507f6022}{sc\_iid}};                   \textcolor{comment}{/* input report id */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00100}\mbox{\hyperlink{structucycom__softc_a345338f7140b19cd821101d5a818206c}{00100}}         uint8\_t \mbox{\hyperlink{structucycom__softc_a345338f7140b19cd821101d5a818206c}{sc\_oid}};                   \textcolor{comment}{/* output report id */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00101}\mbox{\hyperlink{structucycom__softc_aa9b32817f13745dccd87e5d1ad4fc7e3}{00101}}         uint8\_t \mbox{\hyperlink{structucycom__softc_aa9b32817f13745dccd87e5d1ad4fc7e3}{sc\_cfg}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00102}\mbox{\hyperlink{ucycom_8c_a0b6b646a905f0e12639e82de10b2c23a}{00102}} \textcolor{preprocessor}{\#define UCYCOM\_CFG\_RESET        0x80}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00103}\mbox{\hyperlink{ucycom_8c_a4abc7c8576c142b80ff668459ef2a63c}{00103}} \textcolor{preprocessor}{\#define UCYCOM\_CFG\_PARODD       0x20}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00104}\mbox{\hyperlink{ucycom_8c_abcbb38832a49494b5f79be1a3a5efe76}{00104}} \textcolor{preprocessor}{\#define UCYCOM\_CFG\_PAREN        0x10}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00105}\mbox{\hyperlink{ucycom_8c_a68f0a97c8a66ea039449888c046388ff}{00105}} \textcolor{preprocessor}{\#define UCYCOM\_CFG\_STOPB        0x08}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00106}\mbox{\hyperlink{ucycom_8c_abfdc8f9179b68e2039847492f360fb91}{00106}} \textcolor{preprocessor}{\#define UCYCOM\_CFG\_DATAB        0x03}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00107}\mbox{\hyperlink{structucycom__softc_a77b63e881083979c7c54468c679265b8}{00107}}         uint8\_t \mbox{\hyperlink{structucycom__softc_a77b63e881083979c7c54468c679265b8}{sc\_ist}};                   \textcolor{comment}{/* status flags from last input */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00108}\mbox{\hyperlink{structucycom__softc_a2ede5dcdbded465ff2860acb5f1ed03e}{00108}}         uint8\_t \mbox{\hyperlink{structucycom__softc_a2ede5dcdbded465ff2860acb5f1ed03e}{sc\_iface\_no}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00109}\mbox{\hyperlink{structucycom__softc_aefb98fafedddba9157f3ec37e20d152e}{00109}}         uint8\_t \mbox{\hyperlink{structucycom__softc_aefb98fafedddba9157f3ec37e20d152e}{sc\_temp\_cfg}}[32];}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00110}00110 \};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00111}00111 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00112}00112 \textcolor{comment}{/* prototypes */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00113}00113 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00114}\mbox{\hyperlink{ucycom_8c_ab0e690b621bc9126340f9cc5e3e5368f}{00114}} \textcolor{keyword}{static} device\_probe\_t \mbox{\hyperlink{ucycom_8c_ab0e690b621bc9126340f9cc5e3e5368f}{ucycom\_probe}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00115}\mbox{\hyperlink{ucycom_8c_a3c04a75dbd1dc7a5b16eacedecec4542}{00115}} \textcolor{keyword}{static} device\_attach\_t \mbox{\hyperlink{ucycom_8c_a3c04a75dbd1dc7a5b16eacedecec4542}{ucycom\_attach}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00116}\mbox{\hyperlink{ucycom_8c_a19a8c539ffd29c1f0d2ad4e0d631e7c0}{00116}} \textcolor{keyword}{static} device\_detach\_t \mbox{\hyperlink{ucycom_8c_a19a8c539ffd29c1f0d2ad4e0d631e7c0}{ucycom\_detach}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00117}00117 \textcolor{keyword}{static} \textcolor{keywordtype}{void} \mbox{\hyperlink{ucycom_8c_aceef44e43fd1819fe1c6445bd52d31af}{ucycom\_free\_softc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00118}00118 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00119}\mbox{\hyperlink{ucycom_8c_ae9e38d7b93ac93b81bdb7d560abc6620}{00119}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{ucycom_8c_ae9e38d7b93ac93b81bdb7d560abc6620}{ucycom\_ctrl\_write\_callback}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00120}\mbox{\hyperlink{ucycom_8c_a3cb38bdaf7d02749d3a74eeb4fe462c1}{00120}} \textcolor{keyword}{static} \mbox{\hyperlink{usbdi_8h_aad1085e1e87347ed71e554c4b0209239}{usb\_callback\_t}} \mbox{\hyperlink{ucycom_8c_a3cb38bdaf7d02749d3a74eeb4fe462c1}{ucycom\_intr\_read\_callback}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00121}00121 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00122}00122 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{ucycom_8c_a48ff407a725db14dbf3d88350faae045}{ucycom\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00123}00123 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{ucycom_8c_a29be05fb58ce90cc133f420cfcf84870}{ucycom\_cfg\_open}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00124}00124 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{ucycom_8c_ab14d26a37a2d3d59e4d5d66d73cadeb2}{ucycom\_start\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00125}00125 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{ucycom_8c_af3bd93e6194c4ac9dc98d1b653267779}{ucycom\_stop\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00126}00126 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{ucycom_8c_a2aeecc82e429190d8ca1cedb105654be}{ucycom\_start\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00127}00127 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{ucycom_8c_a6cb1468e2dbc4f5bebd57cc99ae6d1c5}{ucycom\_stop\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00128}00128 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{ucycom_8c_ac5c06639bf1723805aa2d2d74a079333}{ucycom\_cfg\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *, uint32\_t, uint8\_t);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00129}00129 \textcolor{keyword}{static} \textcolor{keywordtype}{int}      \mbox{\hyperlink{ucycom_8c_ae2c124df12d3066c47646e991fb08cc6}{ucycom\_pre\_param}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *, \textcolor{keyword}{struct} termios *);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00130}00130 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{ucycom_8c_a78d4e25e995c125624ff56a6ea9bb93b}{ucycom\_cfg\_param}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *, \textcolor{keyword}{struct} termios *);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00131}00131 \textcolor{keyword}{static} \textcolor{keywordtype}{void}     \mbox{\hyperlink{ucycom_8c_ae4ed7f577a9dea1f2cf77882a67375a8}{ucycom\_poll}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *ucom);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00132}00132 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00133}\mbox{\hyperlink{ucycom_8c_a23ca38a99f56f167a8d4730e0ab2852b}{00133}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__config}{usb\_config}} \mbox{\hyperlink{ucycom_8c_a23ca38a99f56f167a8d4730e0ab2852b}{ucycom\_config}}[\mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719aa8d7878185620b5d65169f4daf24501e}{UCYCOM\_N\_TRANSFER}}] = \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00134}00134         [\mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719a2c14177e7469eb9a0dcd77271cd04632}{UCYCOM\_CTRL\_RD}}] = \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00135}00135                 .\mbox{\hyperlink{structusb__config_a5bd5d569870291a54d9bed8377ed8b10}{type}} = \mbox{\hyperlink{usb_8h_ace49b7adb24ebcb0a0b17110c26aa63a}{UE\_CONTROL}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00136}00136                 .endpoint = 0x00,       \textcolor{comment}{/* Control pipe */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00137}00137                 .direction = \mbox{\hyperlink{usb_8h_a0b305068483ac39f5d34f848bcb95c11}{UE\_DIR\_ANY}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00138}00138                 .bufsize = (\textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}}) + \mbox{\hyperlink{ucycom_8c_a84d05459dcbf4f3d8366e65fc0cb7630}{UCYCOM\_MAX\_IOLEN}}),}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00139}00139                 .callback = \&\mbox{\hyperlink{ucycom_8c_ae9e38d7b93ac93b81bdb7d560abc6620}{ucycom\_ctrl\_write\_callback}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00140}00140                 .timeout = 1000,        \textcolor{comment}{/* 1 second */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00141}00141         \},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00142}00142 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00143}00143         [\mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719a491bd1d30c3232f105ea4e14132be6ca}{UCYCOM\_INTR\_RD}}] = \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00144}00144                 .type = \mbox{\hyperlink{usb_8h_a01e28e87ad16f6dfffefc6ccab08baed}{UE\_INTERRUPT}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00145}00145                 .endpoint = \mbox{\hyperlink{usb_8h_a1e8d1f402536e634471569b83f603197}{UE\_ADDR\_ANY}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00146}00146                 .direction = \mbox{\hyperlink{usb_8h_a72bb077a860132c175c166f344c75893}{UE\_DIR\_IN}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00147}00147                 .flags = \{.pipe\_bof = 1,.short\_xfer\_ok = 1,\},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00148}00148                 .bufsize = \mbox{\hyperlink{ucycom_8c_a84d05459dcbf4f3d8366e65fc0cb7630}{UCYCOM\_MAX\_IOLEN}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00149}00149                 .callback = \&\mbox{\hyperlink{ucycom_8c_a3cb38bdaf7d02749d3a74eeb4fe462c1}{ucycom\_intr\_read\_callback}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00150}00150         \},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00151}00151 \};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00152}00152 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00153}\mbox{\hyperlink{ucycom_8c_aad62016553d9c6f6b5ee4aaa93d22779}{00153}} \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keyword}{struct }\mbox{\hyperlink{structucom__callback}{ucom\_callback}} \mbox{\hyperlink{ucycom_8c_aad62016553d9c6f6b5ee4aaa93d22779}{ucycom\_callback}} = \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00154}00154         .\mbox{\hyperlink{structucom__callback_ae7a877fbc3726cffd78e22ab722c8b97}{ucom\_cfg\_param}} = \&\mbox{\hyperlink{ucycom_8c_a78d4e25e995c125624ff56a6ea9bb93b}{ucycom\_cfg\_param}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00155}00155         .ucom\_cfg\_open = \&\mbox{\hyperlink{ucycom_8c_a29be05fb58ce90cc133f420cfcf84870}{ucycom\_cfg\_open}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00156}00156         .ucom\_pre\_param = \&\mbox{\hyperlink{ucycom_8c_ae2c124df12d3066c47646e991fb08cc6}{ucycom\_pre\_param}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00157}00157         .ucom\_start\_read = \&\mbox{\hyperlink{ucycom_8c_ab14d26a37a2d3d59e4d5d66d73cadeb2}{ucycom\_start\_read}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00158}00158         .ucom\_stop\_read = \&\mbox{\hyperlink{ucycom_8c_af3bd93e6194c4ac9dc98d1b653267779}{ucycom\_stop\_read}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00159}00159         .ucom\_start\_write = \&\mbox{\hyperlink{ucycom_8c_a2aeecc82e429190d8ca1cedb105654be}{ucycom\_start\_write}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00160}00160         .ucom\_stop\_write = \&\mbox{\hyperlink{ucycom_8c_a6cb1468e2dbc4f5bebd57cc99ae6d1c5}{ucycom\_stop\_write}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00161}00161         .ucom\_poll = \&\mbox{\hyperlink{ucycom_8c_ae4ed7f577a9dea1f2cf77882a67375a8}{ucycom\_poll}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00162}00162         .ucom\_free = \&\mbox{\hyperlink{ucycom_8c_a48ff407a725db14dbf3d88350faae045}{ucycom\_free}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00163}00163 \};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00164}00164 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00165}\mbox{\hyperlink{ucycom_8c_a1c3b2e8740c98086108685a14a002076}{00165}} \textcolor{keyword}{static} device\_method\_t \mbox{\hyperlink{ucycom_8c_a1c3b2e8740c98086108685a14a002076}{ucycom\_methods}}[] = \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00166}00166         DEVMETHOD(device\_probe, \mbox{\hyperlink{ucycom_8c_ab0e690b621bc9126340f9cc5e3e5368f}{ucycom\_probe}}),}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00167}00167         DEVMETHOD(device\_attach, \mbox{\hyperlink{ucycom_8c_a3c04a75dbd1dc7a5b16eacedecec4542}{ucycom\_attach}}),}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00168}00168         DEVMETHOD(device\_detach, \mbox{\hyperlink{ucycom_8c_a19a8c539ffd29c1f0d2ad4e0d631e7c0}{ucycom\_detach}}),}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00169}00169         DEVMETHOD\_END}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00170}00170 \};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00171}00171 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00172}\mbox{\hyperlink{ucycom_8c_a532aa9645b8be924b0eebdb940783b42}{00172}} \textcolor{keyword}{static} devclass\_t \mbox{\hyperlink{ucycom_8c_a532aa9645b8be924b0eebdb940783b42}{ucycom\_devclass}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00173}00173 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00174}\mbox{\hyperlink{ucycom_8c_a11c6fbe656897a98a71c155366851e64}{00174}} \textcolor{keyword}{static} driver\_t \mbox{\hyperlink{ucycom_8c_a11c6fbe656897a98a71c155366851e64}{ucycom\_driver}} = \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00175}00175         .name = \textcolor{stringliteral}{"{}ucycom"{}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00176}00176         .methods = \mbox{\hyperlink{ucycom_8c_a1c3b2e8740c98086108685a14a002076}{ucycom\_methods}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00177}00177         .size = \textcolor{keyword}{sizeof}(\textcolor{keyword}{struct }\mbox{\hyperlink{structucycom__softc}{ucycom\_softc}}),}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00178}00178 \};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00180}00180 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00181}00181 \textcolor{comment}{ * Supported devices}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00182}00182 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00183}\mbox{\hyperlink{ucycom_8c_aae9d579c082469c58b4c43ac308f2f7e}{00183}} \textcolor{keyword}{static} \textcolor{keyword}{const} \mbox{\hyperlink{usbdi_8h_acf836fd8d6349b66a31f45420728da8d}{STRUCT\_USB\_HOST\_ID}} \mbox{\hyperlink{ucycom_8c_aae9d579c082469c58b4c43ac308f2f7e}{ucycom\_devs}}[] = \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00184}00184         \{\mbox{\hyperlink{usbdi_8h_acdab3edd999014815e8baeb9b33e9071}{USB\_VPI}}(USB\_VENDOR\_DELORME, USB\_PRODUCT\_DELORME\_EARTHMATE, \mbox{\hyperlink{ucycom_8c_a221e3b8946b81091edeb22a822dfe194}{MODEL\_CY7C64013}})\},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00185}00185 \};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00186}00186 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00187}\mbox{\hyperlink{ucycom_8c_a288c377936f960fa783b5b4f8562b369}{00187}} \mbox{\hyperlink{ucycom_8c_a288c377936f960fa783b5b4f8562b369}{DRIVER\_MODULE}}(ucycom, uhub, \mbox{\hyperlink{ucycom_8c_a11c6fbe656897a98a71c155366851e64}{ucycom\_driver}}, \mbox{\hyperlink{ucycom_8c_a532aa9645b8be924b0eebdb940783b42}{ucycom\_devclass}}, NULL, 0);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00188}\mbox{\hyperlink{ucycom_8c_a3b59c6b9407790e642fd066c170d6f1a}{00188}} \mbox{\hyperlink{ucycom_8c_a3b59c6b9407790e642fd066c170d6f1a}{MODULE\_DEPEND}}(ucycom, ucom, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00189}\mbox{\hyperlink{ucycom_8c_a1cd1cbfe821f383625f33d26c4cbbe52}{00189}} \mbox{\hyperlink{ucycom_8c_a3b59c6b9407790e642fd066c170d6f1a}{MODULE\_DEPEND}}(ucycom, \mbox{\hyperlink{usb__if_8m_adfa3f6da9c4881e494b180c4ebb06470}{usb}}, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00190}\mbox{\hyperlink{ucycom_8c_ae4bbc0b541bc146ad88779e3645f6ad0}{00190}} \mbox{\hyperlink{ucycom_8c_a3b59c6b9407790e642fd066c170d6f1a}{MODULE\_DEPEND}}(ucycom, hid, 1, 1, 1);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00191}\mbox{\hyperlink{ucycom_8c_a839c544c30a79bb56728fd6f9d7b3614}{00191}} \mbox{\hyperlink{ucycom_8c_a839c544c30a79bb56728fd6f9d7b3614}{MODULE\_VERSION}}(ucycom, 1);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00192}\mbox{\hyperlink{ucycom_8c_a77c96a32f6c9edd32c3c7e98e7b8b97a}{00192}} \mbox{\hyperlink{ucycom_8c_a77c96a32f6c9edd32c3c7e98e7b8b97a}{USB\_PNP\_HOST\_INFO}}(\mbox{\hyperlink{ucycom_8c_aae9d579c082469c58b4c43ac308f2f7e}{ucycom\_devs}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00193}00193 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00194}\mbox{\hyperlink{ucycom_8c_a79a2683fa0bf0a6442f80f56abfe9ba1}{00194}} \textcolor{preprocessor}{\#define UCYCOM\_DEFAULT\_RATE      4800}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00195}\mbox{\hyperlink{ucycom_8c_acd72e8422c0383b18010f545331f8265}{00195}} \textcolor{preprocessor}{\#define UCYCOM\_DEFAULT\_CFG       0x03   }\textcolor{comment}{/* N-\/8-\/1 */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00196}00196 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00197}00197 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00198}\mbox{\hyperlink{ucycom_8c_a01b6cfe3774a27b9961f401406ab46db}{00198}} \mbox{\hyperlink{ucycom_8c_ab0e690b621bc9126340f9cc5e3e5368f}{ucycom\_probe}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00199}00199 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00200}00200         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00201}00201 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00202}00202         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a246691e99681281d3113d63e81b7e4f0}{usb\_mode}} != \mbox{\hyperlink{usb_8h_a9bc559812598988121896dceb483806ba1c7091216cfa9c9f4a252b0825ed32cb}{USB\_MODE\_HOST}}) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00203}00203                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00204}00204         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00205}00205         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a9e2af2c9a58f0df11559c7679185b0e8}{bConfigIndex}} != 0) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00206}00206                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00207}00207         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00208}00208         \textcolor{keywordflow}{if} (uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a50a68740a4c82f1a9b999d4a7994b550}{bIfaceIndex}} != \mbox{\hyperlink{ucycom_8c_a58e8aaf56a3787fde39a02421fe1ec48}{UCYCOM\_IFACE\_INDEX}}) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00209}00209                 \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00210}00210         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00211}00211         \textcolor{keywordflow}{return} (\mbox{\hyperlink{usb__lookup_8c_aa691ad42d532498716f358cb1c994fb2}{usbd\_lookup\_id\_by\_uaa}}(\mbox{\hyperlink{ucycom_8c_aae9d579c082469c58b4c43ac308f2f7e}{ucycom\_devs}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{ucycom_8c_aae9d579c082469c58b4c43ac308f2f7e}{ucycom\_devs}}), uaa));}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00212}00212 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00213}00213 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00214}00214 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00215}\mbox{\hyperlink{ucycom_8c_a4c353eac58b0c13c55a07b6a5876301c}{00215}} \mbox{\hyperlink{ucycom_8c_a3c04a75dbd1dc7a5b16eacedecec4542}{ucycom\_attach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00216}00216 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00217}00217         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__attach__arg}{usb\_attach\_arg}} *uaa = device\_get\_ivars(dev);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00218}00218         \textcolor{keyword}{struct }\mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00219}00219         \textcolor{keywordtype}{void} *urd\_ptr = NULL;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00220}00220         int32\_t \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00221}00221         uint16\_t urd\_len;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00222}00222         uint8\_t iface\_index;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00223}00223 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00224}00224         sc-\/>\mbox{\hyperlink{structucycom__softc_a41877d85df56a68bd1a28e94e826289d}{sc\_udev}} = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00225}00225 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00226}00226         \mbox{\hyperlink{usb__util_8c_a2f65a197990caa1a69a16691ce4dc66a}{device\_set\_usb\_desc}}(dev);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00227}00227         mtx\_init(\&sc-\/>\mbox{\hyperlink{structucycom__softc_a8ae5bc6364876122c266c02485012663}{sc\_mtx}}, \textcolor{stringliteral}{"{}ucycom"{}}, NULL, MTX\_DEF);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00228}00228         \mbox{\hyperlink{usb__serial_8c_a3533648e606891c90d0267b21b3ba59e}{ucom\_ref}}(\&sc-\/>\mbox{\hyperlink{structucycom__softc_a06601833c9237b408f5e6e9b43ed84f1}{sc\_super\_ucom}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00229}00229 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00230}00230         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00232}00232         \textcolor{comment}{/* get chip model */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00233}00233         sc-\/>\mbox{\hyperlink{structucycom__softc_ac2490944c56f5c84554cfec118bf8bf3}{sc\_model}} = \mbox{\hyperlink{usbdi_8h_ad61be4846786fb86de5691968d1e9b66}{USB\_GET\_DRIVER\_INFO}}(uaa);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00234}00234         \textcolor{keywordflow}{if} (sc-\/>\mbox{\hyperlink{structucycom__softc_ac2490944c56f5c84554cfec118bf8bf3}{sc\_model}} == 0) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00235}00235                 device\_printf(dev, \textcolor{stringliteral}{"{}unsupported device\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00236}00236                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00237}00237         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00238}00238         device\_printf(dev, \textcolor{stringliteral}{"{}Cypress CY7C\%X USB to RS232 bridge\(\backslash\)n"{}}, sc-\/>\mbox{\hyperlink{structucycom__softc_ac2490944c56f5c84554cfec118bf8bf3}{sc\_model}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00239}00239 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00240}00240         \textcolor{comment}{/* get report descriptor */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00241}00241 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00242}00242         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__hid_8c_a606298298fcaeada223dd72693f380c7}{usbd\_req\_get\_hid\_desc}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}}, NULL,}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00243}00243             \&urd\_ptr, \&urd\_len, M\_USBDEV,}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00244}00244             \mbox{\hyperlink{ucycom_8c_a58e8aaf56a3787fde39a02421fe1ec48}{UCYCOM\_IFACE\_INDEX}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00245}00245 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00246}00246         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00247}00247                 device\_printf(dev, \textcolor{stringliteral}{"{}failed to get report "{}}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00248}00248                     \textcolor{stringliteral}{"{}descriptor: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00249}00249                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00250}00250                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00251}00251         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00252}00252         \textcolor{comment}{/* get report sizes */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00253}00253 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00254}00254         sc-\/>\mbox{\hyperlink{structucycom__softc_a64cac571d14c416cd1ae9e9b45b26956}{sc\_flen}} = hid\_report\_size\_max(urd\_ptr, urd\_len, hid\_feature, \&sc-\/>\mbox{\hyperlink{structucycom__softc_a0da235355aa3dafb41e90fb97a040d75}{sc\_fid}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00255}00255         sc-\/>\mbox{\hyperlink{structucycom__softc_a755f4f516781b372ef577f1b16d5fa84}{sc\_ilen}} = hid\_report\_size\_max(urd\_ptr, urd\_len, hid\_input, \&sc-\/>\mbox{\hyperlink{structucycom__softc_a9d513cc789e0571736848880507f6022}{sc\_iid}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00256}00256         sc-\/>\mbox{\hyperlink{structucycom__softc_a1f13af54b658f00945fef9618fd0ea62}{sc\_olen}} = hid\_report\_size\_max(urd\_ptr, urd\_len, hid\_output, \&sc-\/>\mbox{\hyperlink{structucycom__softc_a345338f7140b19cd821101d5a818206c}{sc\_oid}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00257}00257 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00258}00258         \textcolor{keywordflow}{if} ((sc-\/>\mbox{\hyperlink{structucycom__softc_a755f4f516781b372ef577f1b16d5fa84}{sc\_ilen}} > \mbox{\hyperlink{ucycom_8c_a84d05459dcbf4f3d8366e65fc0cb7630}{UCYCOM\_MAX\_IOLEN}}) || (sc-\/>\mbox{\hyperlink{structucycom__softc_a755f4f516781b372ef577f1b16d5fa84}{sc\_ilen}} < 1) ||}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00259}00259             (sc-\/>\mbox{\hyperlink{structucycom__softc_a1f13af54b658f00945fef9618fd0ea62}{sc\_olen}} > \mbox{\hyperlink{ucycom_8c_a84d05459dcbf4f3d8366e65fc0cb7630}{UCYCOM\_MAX\_IOLEN}}) || (sc-\/>\mbox{\hyperlink{structucycom__softc_a1f13af54b658f00945fef9618fd0ea62}{sc\_olen}} < 2) ||}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00260}00260             (sc-\/>\mbox{\hyperlink{structucycom__softc_a64cac571d14c416cd1ae9e9b45b26956}{sc\_flen}} > \mbox{\hyperlink{ucycom_8c_a84d05459dcbf4f3d8366e65fc0cb7630}{UCYCOM\_MAX\_IOLEN}}) || (sc-\/>\mbox{\hyperlink{structucycom__softc_a64cac571d14c416cd1ae9e9b45b26956}{sc\_flen}} < 5)) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00261}00261                 device\_printf(dev, \textcolor{stringliteral}{"{}invalid report size i=\%d, o=\%d, f=\%d, max=\%d\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00262}00262                     sc-\/>\mbox{\hyperlink{structucycom__softc_a755f4f516781b372ef577f1b16d5fa84}{sc\_ilen}}, sc-\/>\mbox{\hyperlink{structucycom__softc_a1f13af54b658f00945fef9618fd0ea62}{sc\_olen}}, sc-\/>\mbox{\hyperlink{structucycom__softc_a64cac571d14c416cd1ae9e9b45b26956}{sc\_flen}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00263}00263                     \mbox{\hyperlink{ucycom_8c_a84d05459dcbf4f3d8366e65fc0cb7630}{UCYCOM\_MAX\_IOLEN}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00264}00264                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00265}00265         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00266}00266         sc-\/>\mbox{\hyperlink{structucycom__softc_a2ede5dcdbded465ff2860acb5f1ed03e}{sc\_iface\_no}} = uaa-\/>\mbox{\hyperlink{structusb__attach__arg_a66c2afc71fce73cc432f7d58593e1f26}{info}}.\mbox{\hyperlink{structusbd__lookup__info_a268433f99f7bfcc278a619418e3c44fa}{bIfaceNum}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00267}00267 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00268}00268         iface\_index = \mbox{\hyperlink{ucycom_8c_a58e8aaf56a3787fde39a02421fe1ec48}{UCYCOM\_IFACE\_INDEX}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00269}00269         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__transfer_8c_a7494c04fae5c5e7ef1af436308670a21}{usbd\_transfer\_setup}}(uaa-\/>\mbox{\hyperlink{structusb__attach__arg_ac86557d3eaf77874d436ce38648b0276}{device}}, \&iface\_index,}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00270}00270             sc-\/>\mbox{\hyperlink{structucycom__softc_a6907b8c8a64ecf591415803be4adddaa}{sc\_xfer}}, \mbox{\hyperlink{ucycom_8c_a23ca38a99f56f167a8d4730e0ab2852b}{ucycom\_config}}, \mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719aa8d7878185620b5d65169f4daf24501e}{UCYCOM\_N\_TRANSFER}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00271}00271             sc, \&sc-\/>\mbox{\hyperlink{structucycom__softc_a8ae5bc6364876122c266c02485012663}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00272}00272         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00273}00273                 device\_printf(dev, \textcolor{stringliteral}{"{}allocating USB "{}}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00274}00274                     \textcolor{stringliteral}{"{}transfers failed\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00275}00275                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00276}00276         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00277}00277         \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} = \mbox{\hyperlink{usb__serial_8c_a1a14cc63123395507acee783de212d75}{ucom\_attach}}(\&sc-\/>\mbox{\hyperlink{structucycom__softc_a06601833c9237b408f5e6e9b43ed84f1}{sc\_super\_ucom}}, \&sc-\/>\mbox{\hyperlink{structucycom__softc_a6dbebbfb80cb388f97fa2beb7f750b95}{sc\_ucom}}, 1, sc,}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00278}00278             \&\mbox{\hyperlink{ucycom_8c_aad62016553d9c6f6b5ee4aaa93d22779}{ucycom\_callback}}, \&sc-\/>\mbox{\hyperlink{structucycom__softc_a8ae5bc6364876122c266c02485012663}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00279}00279         \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00280}00280                 \textcolor{keywordflow}{goto} detach;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00281}00281         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00282}00282         \mbox{\hyperlink{usb__serial_8c_a5fd441bb430a68061e8c933443f1d14f}{ucom\_set\_pnpinfo\_usb}}(\&sc-\/>\mbox{\hyperlink{structucycom__softc_a06601833c9237b408f5e6e9b43ed84f1}{sc\_super\_ucom}}, dev);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00283}00283 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00284}00284         \textcolor{keywordflow}{if} (urd\_ptr) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00285}00285                 free(urd\_ptr, M\_USBDEV);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00286}00286         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00287}00287 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00288}00288         \textcolor{keywordflow}{return} (0);                     \textcolor{comment}{/* success */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00289}00289 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00290}00290 detach:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00291}00291         \textcolor{keywordflow}{if} (urd\_ptr) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00292}00292                 free(urd\_ptr, M\_USBDEV);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00293}00293         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00294}00294         \mbox{\hyperlink{ucycom_8c_a19a8c539ffd29c1f0d2ad4e0d631e7c0}{ucycom\_detach}}(dev);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00295}00295         \textcolor{keywordflow}{return} (ENXIO);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00296}00296 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00297}00297 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00298}00298 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00299}\mbox{\hyperlink{ucycom_8c_ae647b38fa3186535a440ad815e4d8d75}{00299}} \mbox{\hyperlink{ucycom_8c_a19a8c539ffd29c1f0d2ad4e0d631e7c0}{ucycom\_detach}}(device\_t dev)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00300}00300 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00301}00301         \textcolor{keyword}{struct }\mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *sc = device\_get\_softc(dev);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00302}00302 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00303}00303         \mbox{\hyperlink{usb__serial_8c_abcceb7ddf05b758da5f3ada77a962ad1}{ucom\_detach}}(\&sc-\/>\mbox{\hyperlink{structucycom__softc_a06601833c9237b408f5e6e9b43ed84f1}{sc\_super\_ucom}}, \&sc-\/>\mbox{\hyperlink{structucycom__softc_a6dbebbfb80cb388f97fa2beb7f750b95}{sc\_ucom}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00304}00304         \mbox{\hyperlink{usb__transfer_8c_a2f5ab55bfe7f356bb7a7505ff35c9741}{usbd\_transfer\_unsetup}}(sc-\/>\mbox{\hyperlink{structucycom__softc_a6907b8c8a64ecf591415803be4adddaa}{sc\_xfer}}, \mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719aa8d7878185620b5d65169f4daf24501e}{UCYCOM\_N\_TRANSFER}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00305}00305 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00306}00306         device\_claim\_softc(dev);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00307}00307 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00308}00308         \mbox{\hyperlink{ucycom_8c_aceef44e43fd1819fe1c6445bd52d31af}{ucycom\_free\_softc}}(sc);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00309}00309 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00310}00310         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00311}00311 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00312}00312 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00313}\mbox{\hyperlink{ucycom_8c_a3377a59e513a3775c056600cf7b69220}{00313}} \mbox{\hyperlink{ucycom_8c_a3377a59e513a3775c056600cf7b69220}{UCOM\_UNLOAD\_DRAIN}}(ucycom);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00314}00314 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00315}00315 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00316}\mbox{\hyperlink{ucycom_8c_aceef44e43fd1819fe1c6445bd52d31af}{00316}} \mbox{\hyperlink{ucycom_8c_aceef44e43fd1819fe1c6445bd52d31af}{ucycom\_free\_softc}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *sc)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00317}00317 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00318}00318         \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__serial_8c_a27ca652272693169923a38646505d083}{ucom\_unref}}(\&sc-\/>\mbox{\hyperlink{structucycom__softc_a06601833c9237b408f5e6e9b43ed84f1}{sc\_super\_ucom}})) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00319}00319                 mtx\_destroy(\&sc-\/>\mbox{\hyperlink{structucycom__softc_a8ae5bc6364876122c266c02485012663}{sc\_mtx}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00320}00320                 device\_free\_softc(sc);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00321}00321         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00322}00322 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00323}00323 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00324}00324 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00325}\mbox{\hyperlink{ucycom_8c_a48ff407a725db14dbf3d88350faae045}{00325}} \mbox{\hyperlink{ucycom_8c_a48ff407a725db14dbf3d88350faae045}{ucycom\_free}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *ucom)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00326}00326 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00327}00327         \mbox{\hyperlink{ucycom_8c_aceef44e43fd1819fe1c6445bd52d31af}{ucycom\_free\_softc}}(ucom-\/>\mbox{\hyperlink{structucom__softc_a4ebbc8663d0291bf6e0ffb93cc2dc70e}{sc\_parent}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00328}00328 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00329}00329 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00330}00330 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00331}\mbox{\hyperlink{ucycom_8c_a29be05fb58ce90cc133f420cfcf84870}{00331}} \mbox{\hyperlink{ucycom_8c_a29be05fb58ce90cc133f420cfcf84870}{ucycom\_cfg\_open}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *ucom)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00332}00332 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00333}00333         \textcolor{keyword}{struct }\mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *sc = ucom-\/>\mbox{\hyperlink{structucom__softc_a4ebbc8663d0291bf6e0ffb93cc2dc70e}{sc\_parent}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00334}00334 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00335}00335         \textcolor{comment}{/* set default configuration */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00336}00336         \mbox{\hyperlink{ucycom_8c_ac5c06639bf1723805aa2d2d74a079333}{ucycom\_cfg\_write}}(sc, \mbox{\hyperlink{ucycom_8c_a79a2683fa0bf0a6442f80f56abfe9ba1}{UCYCOM\_DEFAULT\_RATE}}, \mbox{\hyperlink{ucycom_8c_acd72e8422c0383b18010f545331f8265}{UCYCOM\_DEFAULT\_CFG}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00337}00337 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00338}00338 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00339}00339 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00340}\mbox{\hyperlink{ucycom_8c_ab14d26a37a2d3d59e4d5d66d73cadeb2}{00340}} \mbox{\hyperlink{ucycom_8c_ab14d26a37a2d3d59e4d5d66d73cadeb2}{ucycom\_start\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *ucom)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00341}00341 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00342}00342         \textcolor{keyword}{struct }\mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *sc = ucom-\/>\mbox{\hyperlink{structucom__softc_a4ebbc8663d0291bf6e0ffb93cc2dc70e}{sc\_parent}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00343}00343 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00344}00344         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structucycom__softc_a6907b8c8a64ecf591415803be4adddaa}{sc\_xfer}}[\mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719a491bd1d30c3232f105ea4e14132be6ca}{UCYCOM\_INTR\_RD}}]);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00345}00345 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00346}00346 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00347}00347 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00348}\mbox{\hyperlink{ucycom_8c_af3bd93e6194c4ac9dc98d1b653267779}{00348}} \mbox{\hyperlink{ucycom_8c_af3bd93e6194c4ac9dc98d1b653267779}{ucycom\_stop\_read}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *ucom)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00349}00349 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00350}00350         \textcolor{keyword}{struct }\mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *sc = ucom-\/>\mbox{\hyperlink{structucom__softc_a4ebbc8663d0291bf6e0ffb93cc2dc70e}{sc\_parent}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00351}00351 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00352}00352         \mbox{\hyperlink{usb__transfer_8c_abe245d973df0cfd6fb96b884d33ebce3}{usbd\_transfer\_stop}}(sc-\/>\mbox{\hyperlink{structucycom__softc_a6907b8c8a64ecf591415803be4adddaa}{sc\_xfer}}[\mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719a491bd1d30c3232f105ea4e14132be6ca}{UCYCOM\_INTR\_RD}}]);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00353}00353 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00354}00354 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00355}00355 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00356}\mbox{\hyperlink{ucycom_8c_a2aeecc82e429190d8ca1cedb105654be}{00356}} \mbox{\hyperlink{ucycom_8c_a2aeecc82e429190d8ca1cedb105654be}{ucycom\_start\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *ucom)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00357}00357 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00358}00358         \textcolor{keyword}{struct }\mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *sc = ucom-\/>\mbox{\hyperlink{structucom__softc_a4ebbc8663d0291bf6e0ffb93cc2dc70e}{sc\_parent}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00359}00359 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00360}00360         \mbox{\hyperlink{usb__transfer_8c_a7a1f2d22a70b832e8cc31366adec443d}{usbd\_transfer\_start}}(sc-\/>\mbox{\hyperlink{structucycom__softc_a6907b8c8a64ecf591415803be4adddaa}{sc\_xfer}}[\mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719a2c14177e7469eb9a0dcd77271cd04632}{UCYCOM\_CTRL\_RD}}]);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00361}00361 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00362}00362 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00363}00363 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00364}\mbox{\hyperlink{ucycom_8c_a6cb1468e2dbc4f5bebd57cc99ae6d1c5}{00364}} \mbox{\hyperlink{ucycom_8c_a6cb1468e2dbc4f5bebd57cc99ae6d1c5}{ucycom\_stop\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *ucom)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00365}00365 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00366}00366         \textcolor{keyword}{struct }\mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *sc = ucom-\/>\mbox{\hyperlink{structucom__softc_a4ebbc8663d0291bf6e0ffb93cc2dc70e}{sc\_parent}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00367}00367 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00368}00368         \mbox{\hyperlink{usb__transfer_8c_abe245d973df0cfd6fb96b884d33ebce3}{usbd\_transfer\_stop}}(sc-\/>\mbox{\hyperlink{structucycom__softc_a6907b8c8a64ecf591415803be4adddaa}{sc\_xfer}}[\mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719a2c14177e7469eb9a0dcd77271cd04632}{UCYCOM\_CTRL\_RD}}]);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00369}00369 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00370}00370 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00371}00371 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00372}\mbox{\hyperlink{ucycom_8c_a8032d6ddc7de884e1ff8e3772a262dce}{00372}} \mbox{\hyperlink{ucycom_8c_ae9e38d7b93ac93b81bdb7d560abc6620}{ucycom\_ctrl\_write\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00373}00373 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00374}00374         \textcolor{keyword}{struct }\mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00375}00375         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00376}00376         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc0, *pc1;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00377}00377         uint8\_t data[2];}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00378}00378         uint8\_t \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00379}00379         uint32\_t actlen;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00380}00380 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00381}00381         pc0 = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00382}00382         pc1 = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 1);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00383}00383 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00384}00384         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00385}00385         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00386}00386 tr\_transferred:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00387}00387         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00388}00388 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00389}00389                 \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structucycom__softc_ac2490944c56f5c84554cfec118bf8bf3}{sc\_model}}) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00390}00390                 \textcolor{keywordflow}{case} \mbox{\hyperlink{ucycom_8c_ab5f14b8ddb66783d03377155404c6e4f}{MODEL\_CY7C63743}}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00391}00391                         \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}} = 1;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00392}00392                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00393}00393                 \textcolor{keywordflow}{case} \mbox{\hyperlink{ucycom_8c_a221e3b8946b81091edeb22a822dfe194}{MODEL\_CY7C64013}}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00394}00394                         \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}} = 2;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00395}00395                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00396}00396                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00397}00397                         \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}} = 0;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00398}00398                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00399}00399                 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00400}00400 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00401}00401                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{usb__serial_8c_a014a131e1bce5fb84d1788e48a69733f}{ucom\_get\_data}}(\&sc-\/>\mbox{\hyperlink{structucycom__softc_a6dbebbfb80cb388f97fa2beb7f750b95}{sc\_ucom}}, pc1, \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00402}00402                     sc-\/>\mbox{\hyperlink{structucycom__softc_a1f13af54b658f00945fef9618fd0ea62}{sc\_olen}} -\/ \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}}, \&actlen)) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00403}00403                         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_ac338c3af82b085859b50582e10fa7cb7}{UT\_WRITE\_CLASS\_INTERFACE}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00404}00404                         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{usbhid_8h_a9fc94613b9ef6bb7fcc37deda784c760}{UR\_SET\_REPORT}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00405}00405                         \mbox{\hyperlink{usb__endian_8h_a202f07612d9f9d4b3a1a89bd21b20012}{USETW2}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, \mbox{\hyperlink{usbhid_8h_a6c15a5eb7d96339faf19c4ac50a5c79b}{UHID\_OUTPUT\_REPORT}}, sc-\/>\mbox{\hyperlink{structucycom__softc_a345338f7140b19cd821101d5a818206c}{sc\_oid}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00406}00406                         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex[0] = sc-\/>\mbox{\hyperlink{structucycom__softc_a2ede5dcdbded465ff2860acb5f1ed03e}{sc\_iface\_no}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00407}00407                         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex[1] = 0;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00408}00408                         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, sc-\/>\mbox{\hyperlink{structucycom__softc_a1f13af54b658f00945fef9618fd0ea62}{sc\_olen}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00409}00409 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00410}00410                         \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structucycom__softc_ac2490944c56f5c84554cfec118bf8bf3}{sc\_model}}) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00411}00411                         \textcolor{keywordflow}{case} \mbox{\hyperlink{ucycom_8c_ab5f14b8ddb66783d03377155404c6e4f}{MODEL\_CY7C63743}}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00412}00412                                 data[0] = actlen;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00413}00413                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00414}00414                         \textcolor{keywordflow}{case} \mbox{\hyperlink{ucycom_8c_a221e3b8946b81091edeb22a822dfe194}{MODEL\_CY7C64013}}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00415}00415                                 data[0] = 0;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00416}00416                                 data[1] = actlen;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00417}00417                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00418}00418                         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00419}00419                                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00420}00420                         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00421}00421 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00422}00422                         \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc0, 0, \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}));}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00423}00423                         \mbox{\hyperlink{usb__busdma_8c_accb7cd85c3477e50c1ba1b1489226d09}{usbd\_copy\_in}}(pc1, 0, data, \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00424}00424 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00425}00425                         \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, \textcolor{keyword}{sizeof}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}));}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00426}00426                         \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 1, sc-\/>\mbox{\hyperlink{structucycom__softc_a1f13af54b658f00945fef9618fd0ea62}{sc\_olen}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00427}00427                         \mbox{\hyperlink{usb__transfer_8c_a10f82b008c3a5311e5210e44beaca014}{usbd\_xfer\_set\_frames}}(xfer, sc-\/>\mbox{\hyperlink{structucycom__softc_a1f13af54b658f00945fef9618fd0ea62}{sc\_olen}} ? 2 : 1);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00428}00428                         \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00429}00429                 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00430}00430                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00431}00431 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00432}00432         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00433}00433                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} == \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00434}00434                         \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00435}00435                 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00436}00436                 \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}error=\%s\(\backslash\)n"{}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00437}00437                     \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}}));}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00438}00438                 \textcolor{keywordflow}{goto} tr\_transferred;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00439}00439         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00440}00440 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00441}00441 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00442}00442 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00443}\mbox{\hyperlink{ucycom_8c_ac5c06639bf1723805aa2d2d74a079333}{00443}} \mbox{\hyperlink{ucycom_8c_ac5c06639bf1723805aa2d2d74a079333}{ucycom\_cfg\_write}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *sc, uint32\_t baud, uint8\_t cfg)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00444}00444 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00445}00445         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__device__request}{usb\_device\_request}} \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00446}00446         uint16\_t \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00447}00447         \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} err;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00448}00448 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00449}00449         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = sc-\/>\mbox{\hyperlink{structucycom__softc_a64cac571d14c416cd1ae9e9b45b26956}{sc\_flen}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00450}00450         \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} > \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structucycom__softc_aefb98fafedddba9157f3ec37e20d152e}{sc\_temp\_cfg}})) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00451}00451                 \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = \textcolor{keyword}{sizeof}(sc-\/>\mbox{\hyperlink{structucycom__softc_aefb98fafedddba9157f3ec37e20d152e}{sc\_temp\_cfg}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00452}00452         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00453}00453         sc-\/>\mbox{\hyperlink{structucycom__softc_aa9b32817f13745dccd87e5d1ad4fc7e3}{sc\_cfg}} = cfg;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00454}00454 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00455}00455         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bmRequestType = \mbox{\hyperlink{usb_8h_ac338c3af82b085859b50582e10fa7cb7}{UT\_WRITE\_CLASS\_INTERFACE}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00456}00456         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.bRequest = \mbox{\hyperlink{usbhid_8h_a9fc94613b9ef6bb7fcc37deda784c760}{UR\_SET\_REPORT}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00457}00457         \mbox{\hyperlink{usb__endian_8h_a202f07612d9f9d4b3a1a89bd21b20012}{USETW2}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wValue, \mbox{\hyperlink{usbhid_8h_a2b39f0f97bf832c66dad0c7dc051b314}{UHID\_FEATURE\_REPORT}}, sc-\/>\mbox{\hyperlink{structucycom__softc_a0da235355aa3dafb41e90fb97a040d75}{sc\_fid}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00458}00458         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex[0] = sc-\/>\mbox{\hyperlink{structucycom__softc_a2ede5dcdbded465ff2860acb5f1ed03e}{sc\_iface\_no}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00459}00459         \mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wIndex[1] = 0;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00460}00460         \mbox{\hyperlink{usb__endian_8h_a69f5ba903a605cb9dc7eed2ad905f2dc}{USETW}}(\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}.wLength, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00461}00461 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00462}00462         sc-\/>\mbox{\hyperlink{structucycom__softc_aefb98fafedddba9157f3ec37e20d152e}{sc\_temp\_cfg}}[0] = (baud \& 0xff);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00463}00463         sc-\/>\mbox{\hyperlink{structucycom__softc_aefb98fafedddba9157f3ec37e20d152e}{sc\_temp\_cfg}}[1] = (baud >> 8) \& 0xff;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00464}00464         sc-\/>\mbox{\hyperlink{structucycom__softc_aefb98fafedddba9157f3ec37e20d152e}{sc\_temp\_cfg}}[2] = (baud >> 16) \& 0xff;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00465}00465         sc-\/>\mbox{\hyperlink{structucycom__softc_aefb98fafedddba9157f3ec37e20d152e}{sc\_temp\_cfg}}[3] = (baud >> 24) \& 0xff;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00466}00466         sc-\/>\mbox{\hyperlink{structucycom__softc_aefb98fafedddba9157f3ec37e20d152e}{sc\_temp\_cfg}}[4] = cfg;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00467}00467 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00468}00468         err = \mbox{\hyperlink{usb__serial_8h_aef1b97ecbf82451d6b353c561648b24f}{ucom\_cfg\_do\_request}}(sc-\/>\mbox{\hyperlink{structucycom__softc_a41877d85df56a68bd1a28e94e826289d}{sc\_udev}}, \&sc-\/>\mbox{\hyperlink{structucycom__softc_a6dbebbfb80cb388f97fa2beb7f750b95}{sc\_ucom}},}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00469}00469             \&\mbox{\hyperlink{usb__if_8m_accfb270fc1884a0d1e4b9a0fb6234f14}{req}}, sc-\/>\mbox{\hyperlink{structucycom__softc_aefb98fafedddba9157f3ec37e20d152e}{sc\_temp\_cfg}}, 0, 1000);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00470}00470         \textcolor{keywordflow}{if} (err) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00471}00471                 DPRINTFN(0, \textcolor{stringliteral}{"{}device request failed, err=\%s "{}}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00472}00472                     \textcolor{stringliteral}{"{}(ignored)\(\backslash\)n"{}}, \mbox{\hyperlink{usb__error_8c_a2391eb446dce3e4368cacf781857774e}{usbd\_errstr}}(err));}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00473}00473         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00474}00474 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00475}00475 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00476}00476 \textcolor{keyword}{static} \textcolor{keywordtype}{int}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00477}\mbox{\hyperlink{ucycom_8c_ae2c124df12d3066c47646e991fb08cc6}{00477}} \mbox{\hyperlink{ucycom_8c_ae2c124df12d3066c47646e991fb08cc6}{ucycom\_pre\_param}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *ucom, \textcolor{keyword}{struct} termios *t)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00478}00478 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00479}00479         \textcolor{keywordflow}{switch} (t-\/>c\_ospeed) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00480}00480                 \textcolor{keywordflow}{case} 600:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00481}00481                 \textcolor{keywordflow}{case} 1200:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00482}00482                 \textcolor{keywordflow}{case} 2400:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00483}00483                 \textcolor{keywordflow}{case} 4800:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00484}00484                 \textcolor{keywordflow}{case} 9600:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00485}00485                 \textcolor{keywordflow}{case} 19200:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00486}00486                 \textcolor{keywordflow}{case} 38400:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00487}00487                 \textcolor{keywordflow}{case} 57600:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00488}00488 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00489}00489                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00490}00490 \textcolor{comment}{                 * Stock chips only support standard baud rates in the 600 -\/ 57600}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00491}00491 \textcolor{comment}{                 * range, but higher rates can be achieved using custom firmware.}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00492}00492 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00493}00493                 \textcolor{keywordflow}{case} 115200:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00494}00494                 \textcolor{keywordflow}{case} 153600:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00495}00495                 \textcolor{keywordflow}{case} 192000:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00496}00496 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00497}00497                 \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00498}00498         \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00499}00499                 \textcolor{keywordflow}{return} (EINVAL);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00500}00500         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00501}00501         \textcolor{keywordflow}{return} (0);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00502}00502 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00503}00503 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00504}00504 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00505}\mbox{\hyperlink{ucycom_8c_a78d4e25e995c125624ff56a6ea9bb93b}{00505}} \mbox{\hyperlink{ucycom_8c_a78d4e25e995c125624ff56a6ea9bb93b}{ucycom\_cfg\_param}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *ucom, \textcolor{keyword}{struct} termios *t)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00506}00506 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00507}00507         \textcolor{keyword}{struct }\mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *sc = ucom-\/>\mbox{\hyperlink{structucom__softc_a4ebbc8663d0291bf6e0ffb93cc2dc70e}{sc\_parent}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00508}00508         uint8\_t cfg;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00509}00509 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00510}00510         \mbox{\hyperlink{umass_8c_aa786fc43d4857c3ab9f2c777b4e6f9c5}{DPRINTF}}(\textcolor{stringliteral}{"{}\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00511}00511 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00512}00512         \textcolor{keywordflow}{if} (t-\/>c\_cflag \& CIGNORE) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00513}00513                 cfg = sc-\/>\mbox{\hyperlink{structucycom__softc_aa9b32817f13745dccd87e5d1ad4fc7e3}{sc\_cfg}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00514}00514         \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00515}00515                 cfg = 0;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00516}00516                 \textcolor{keywordflow}{switch} (t-\/>c\_cflag \& CSIZE) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00517}00517                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00518}00518                 \textcolor{keywordflow}{case} CS8:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00519}00519                         ++cfg;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00520}00520                 \textcolor{keywordflow}{case} CS7:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00521}00521                         ++cfg;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00522}00522                 \textcolor{keywordflow}{case} CS6:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00523}00523                         ++cfg;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00524}00524                 \textcolor{keywordflow}{case} CS5:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00525}00525                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00526}00526                 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00527}00527 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00528}00528                 \textcolor{keywordflow}{if} (t-\/>c\_cflag \& CSTOPB)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00529}00529                         cfg |= \mbox{\hyperlink{ucycom_8c_a68f0a97c8a66ea039449888c046388ff}{UCYCOM\_CFG\_STOPB}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00530}00530                 \textcolor{keywordflow}{if} (t-\/>c\_cflag \& PARENB)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00531}00531                         cfg |= \mbox{\hyperlink{ucycom_8c_abcbb38832a49494b5f79be1a3a5efe76}{UCYCOM\_CFG\_PAREN}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00532}00532                 \textcolor{keywordflow}{if} (t-\/>c\_cflag \& PARODD)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00533}00533                         cfg |= \mbox{\hyperlink{ucycom_8c_a4abc7c8576c142b80ff668459ef2a63c}{UCYCOM\_CFG\_PARODD}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00534}00534         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00535}00535 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00536}00536         \mbox{\hyperlink{ucycom_8c_ac5c06639bf1723805aa2d2d74a079333}{ucycom\_cfg\_write}}(sc, t-\/>c\_ospeed, cfg);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00537}00537 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00538}00538 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00539}00539 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00540}\mbox{\hyperlink{ucycom_8c_a23b8f5d5187ad35c0281958b0f3eee48}{00540}} \mbox{\hyperlink{ucycom_8c_a3cb38bdaf7d02749d3a74eeb4fe462c1}{ucycom\_intr\_read\_callback}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structusb__xfer}{usb\_xfer}} *xfer, \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945}{usb\_error\_t}} \mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}})}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00541}00541 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00542}00542         \textcolor{keyword}{struct }\mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *sc = \mbox{\hyperlink{usb__transfer_8c_ab75ef6d82c4a000a3d16c133d1d589b0}{usbd\_xfer\_softc}}(xfer);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00543}00543         \textcolor{keyword}{struct }\mbox{\hyperlink{structusb__page__cache}{usb\_page\_cache}} *pc;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00544}00544         uint8\_t buf[2];}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00545}00545         uint32\_t \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00546}00546         \textcolor{keywordtype}{int} \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00547}00547         \textcolor{keywordtype}{int} actlen;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00548}00548 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00549}00549         \mbox{\hyperlink{usb__transfer_8c_ac0c68320222f26c2a3eba47b46c47899}{usbd\_xfer\_status}}(xfer, \&actlen, NULL, NULL, NULL);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00550}00550         pc = \mbox{\hyperlink{usb__transfer_8c_a6e66695b916f0770a259bed959c21555}{usbd\_xfer\_get\_frame}}(xfer, 0);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00551}00551 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00552}00552         \textcolor{keywordflow}{switch} (\mbox{\hyperlink{usbdi_8h_adc2dd35bd0dd6a42d3abd4230796a7b0}{USB\_GET\_STATE}}(xfer)) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00553}00553         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a8f0386217ba77be3e47721fae9aa9b3d}{USB\_ST\_TRANSFERRED}}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00554}00554                 \textcolor{keywordflow}{switch} (sc-\/>\mbox{\hyperlink{structucycom__softc_ac2490944c56f5c84554cfec118bf8bf3}{sc\_model}}) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00555}00555                 \textcolor{keywordflow}{case} \mbox{\hyperlink{ucycom_8c_ab5f14b8ddb66783d03377155404c6e4f}{MODEL\_CY7C63743}}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00556}00556                         \textcolor{keywordflow}{if} (actlen < 1) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00557}00557                                 \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00558}00558                         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00559}00559                         \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, 0, buf, 1);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00560}00560 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00561}00561                         sc-\/>\mbox{\hyperlink{structucycom__softc_a77b63e881083979c7c54468c679265b8}{sc\_ist}} = buf[0] \& \string~0x07;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00562}00562                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = buf[0] \& 0x07;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00563}00563 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00564}00564                         actlen-\/-\/;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00565}00565                         \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}} = 1;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00566}00566 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00567}00567                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00568}00568 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00569}00569                 \textcolor{keywordflow}{case} \mbox{\hyperlink{ucycom_8c_a221e3b8946b81091edeb22a822dfe194}{MODEL\_CY7C64013}}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00570}00570                         \textcolor{keywordflow}{if} (actlen < 2) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00571}00571                                 \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00572}00572                         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00573}00573                         \mbox{\hyperlink{usb__busdma_8c_af52eece45b7868dbf58386f4c9e4eb9a}{usbd\_copy\_out}}(pc, 0, buf, 2);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00574}00574 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00575}00575                         sc-\/>\mbox{\hyperlink{structucycom__softc_a77b63e881083979c7c54468c679265b8}{sc\_ist}} = buf[0] \& \string~0x07;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00576}00576                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = buf[1];}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00577}00577 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00578}00578                         actlen -\/= 2;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00579}00579                         \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}} = 2;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00580}00580 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00581}00581                         \textcolor{keywordflow}{break};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00582}00582 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00583}00583                 \textcolor{keywordflow}{default}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00584}00584                         DPRINTFN(0, \textcolor{stringliteral}{"{}unsupported model number\(\backslash\)n"{}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00585}00585                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00586}00586                 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00587}00587 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00588}00588                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} > actlen)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00589}00589                         \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}} = actlen;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00590}00590                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}})}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00591}00591                         \mbox{\hyperlink{usb__serial_8c_af96494685ba012ad6a1c2e18b783e185}{ucom\_put\_data}}(\&sc-\/>\mbox{\hyperlink{structucycom__softc_a6dbebbfb80cb388f97fa2beb7f750b95}{sc\_ucom}}, pc, \mbox{\hyperlink{usb__if_8m_ac681806181c80437cfab37335f62ff39}{offset}}, \mbox{\hyperlink{ehci_8h_a8aed22e2c7b283705ec82e0120515618}{len}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00592}00592                 \textcolor{comment}{/* FALLTHROUGH */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00593}00593         \textcolor{keywordflow}{case} \mbox{\hyperlink{usbdi_8h_a3aa7120c3ecab31972b8fe219530f552}{USB\_ST\_SETUP}}:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00594}00594 tr\_setup:}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00595}00595                 \mbox{\hyperlink{usb__transfer_8c_a31786497f0f4222203b1e993d52af753}{usbd\_xfer\_set\_frame\_len}}(xfer, 0, sc-\/>\mbox{\hyperlink{structucycom__softc_a755f4f516781b372ef577f1b16d5fa84}{sc\_ilen}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00596}00596                 \mbox{\hyperlink{usb__transfer_8c_a10c440b0b97cac293b4df9d558f15bac}{usbd\_transfer\_submit}}(xfer);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00597}00597                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00598}00598 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00599}00599         \textcolor{keywordflow}{default}:                        \textcolor{comment}{/* Error */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00600}00600                 \textcolor{keywordflow}{if} (\mbox{\hyperlink{if__runreg_8h_a9f8f252ecb5b3fb46dafe827231faf70}{error}} != \mbox{\hyperlink{usbdi_8h_a5daf16538c7ea36dad2de85182c72945abe72c3e4b6644141519a28f1ef97f717}{USB\_ERR\_CANCELLED}}) \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00601}00601                         \textcolor{comment}{/* try to clear stall first */}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00602}00602                         \mbox{\hyperlink{usb__transfer_8c_abadf9cb2f8e81a5133af0c8030039de3}{usbd\_xfer\_set\_stall}}(xfer);}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00603}00603                         \textcolor{keywordflow}{goto} tr\_setup;}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00604}00604                 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00605}00605                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00606}00606         \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00607}00607 \}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00608}00608 }
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00609}00609 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00610}\mbox{\hyperlink{ucycom_8c_ae4ed7f577a9dea1f2cf77882a67375a8}{00610}} \mbox{\hyperlink{ucycom_8c_ae4ed7f577a9dea1f2cf77882a67375a8}{ucycom\_poll}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structucom__softc}{ucom\_softc}} *ucom)}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00611}00611 \{}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00612}00612         \textcolor{keyword}{struct }\mbox{\hyperlink{structucycom__softc}{ucycom\_softc}} *sc = ucom-\/>\mbox{\hyperlink{structucom__softc_a4ebbc8663d0291bf6e0ffb93cc2dc70e}{sc\_parent}};}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00613}00613         \mbox{\hyperlink{usb__transfer_8c_ab2036eadf83fca25cf0d8cdec16d7227}{usbd\_transfer\_poll}}(sc-\/>\mbox{\hyperlink{structucycom__softc_a6907b8c8a64ecf591415803be4adddaa}{sc\_xfer}}, \mbox{\hyperlink{ucycom_8c_afccd240f973cf154952fb917c9209719aa8d7878185620b5d65169f4daf24501e}{UCYCOM\_N\_TRANSFER}});}
\DoxyCodeLine{\Hypertarget{ucycom_8c_source_l00614}00614 \}}

\end{DoxyCode}
