1 .\" $NetBSD: uftdi.4,v 1.5 2002/02/07 03:15:08 ross Exp $
3 .\" Copyright (c) 2000 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Lennart Augustsson.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
37 .Nd USB support for serial adapters based on the FTDI family of USB
40 To compile this driver into the kernel,
41 place the following lines in your
42 kernel configuration file:
43 .Bd -ragged -offset indent
47 Alternatively, to load the driver as a
48 module at boot time, place the following line in
50 .Bd -literal -offset indent
56 driver provides support for various serial adapters based on the
80 The device is accessed through the
82 driver which makes it behave like a
85 Many of the supported chips provide additional functionality
86 such as bitbang mode and the MPSSE engine for serial bus emulation.
89 driver provides access to that functionality with the following
92 .In dev/usb/uftdiio.h :
93 .Bl -tag -width indent
94 .It Dv UFTDIIOC_RESET_IO Pq Vt int
95 Reset the channel to its default configuration, flush RX and TX FIFOs.
96 .It Dv UFTDIIOC_RESET_RX Pq Vt int
98 .It Dv UFTDIIOC_RESET_TX Pq Vt int
100 .It Dv UFTDIIOC_SET_BITMODE Pq Vt "struct uftdi_bitmode"
101 Put the channel into the operating mode specified in
103 and set the pins indicated by ones in
114 UFTDI_BITMODE_ASYNC = 0,
115 UFTDI_BITMODE_MPSSE = 1,
116 UFTDI_BITMODE_SYNC = 2,
117 UFTDI_BITMODE_CPU_EMUL = 3,
118 UFTDI_BITMODE_FAST_SERIAL = 4,
119 UFTDI_BITMODE_CBUS = 5,
120 UFTDI_BITMODE_NONE = 0xff,
130 Manuals and application notes published by FTDI describe these
132 To use most of these modes, you first put the channel into
133 the desired mode, then you
137 data which either reflects pin state or is interpreted
138 as MPSSE commands and parameters, depending on the mode.
139 .It Dv UFTDIIOC_GET_BITMODE Pq Vt "struct uftdi_bitmode"
140 Return the state of the bitbang pins at the time of the call in the
146 .It Dv UFTDIIOC_SET_ERROR_CHAR Pq Vt int
147 Set the character which is inserted into the buffer to mark
148 the point of an error such as FIFO overflow.
149 .It Dv UFTDIIOC_SET_EVENT_CHAR Pq Vt int
150 Set the character which causes a partial FIFO full of data
151 to be returned immediately even if the FIFO is not full.
152 .It Dv UFTDIIOC_SET_LATENCY Pq Vt int
153 Set the amount of time to wait for a full FIFO,
155 If more than this much time elapses without receiving a new
156 character, any characters in the FIFO are returned.
157 .It Dv UFTDIIOC_GET_LATENCY Pq Vt int
158 Get the current value of the latency timer.
159 .It Dv UFTDIIOC_GET_HWREV Pq Vt int
160 Get the hardware revision number.
164 .Va usb_device_descriptor .
168 driver supports the following adapters:
172 B&B Electronics USB->RS422/485 adapter
174 Elexol USB MOD1 and USB MOD3
176 HP USB-Serial adapter shipped with some HP laptops
182 Buffalo PC-OP-RS / Kurouto-shikou KURO-RS universal remote
184 Prologix GPIB-USB Controller