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
49 Alternatively, to load the driver as a
50 module at boot time, place the following line in
52 .Bd -literal -offset indent
58 driver provides support for various serial adapters based on the
82 The device is accessed through the
84 driver which makes it behave like a
87 Many of the supported chips provide additional functionality
88 such as bitbang mode and the MPSSE engine for serial bus emulation.
91 driver provides access to that functionality with the following
94 .In dev/usb/uftdiio.h :
95 .Bl -tag -width indent
96 .It Dv UFTDIIOC_RESET_IO Pq Vt int
97 Reset the channel to its default configuration, flush RX and TX FIFOs.
98 .It Dv UFTDIIOC_RESET_RX Pq Vt int
100 .It Dv UFTDIIOC_RESET_TX Pq Vt int
102 .It Dv UFTDIIOC_SET_BITMODE Pq Vt "struct uftdi_bitmode"
103 Put the channel into the operating mode specified in
105 and set the pins indicated by ones in
116 UFTDI_BITMODE_ASYNC = 0,
117 UFTDI_BITMODE_MPSSE = 1,
118 UFTDI_BITMODE_SYNC = 2,
119 UFTDI_BITMODE_CPU_EMUL = 3,
120 UFTDI_BITMODE_FAST_SERIAL = 4,
121 UFTDI_BITMODE_CBUS = 5,
122 UFTDI_BITMODE_NONE = 0xff,
132 Manuals and application notes published by FTDI describe these
134 To use most of these modes, you first put the channel into
135 the desired mode, then you
139 data which either reflects pin state or is interpreted
140 as MPSSE commands and parameters, depending on the mode.
141 .It Dv UFTDIIOC_GET_BITMODE Pq Vt "struct uftdi_bitmode"
142 Return the state of the bitbang pins at the time of the call in the
148 .It Dv UFTDIIOC_SET_ERROR_CHAR Pq Vt int
149 Set the character which is inserted into the buffer to mark
150 the point of an error such as FIFO overflow.
151 .It Dv UFTDIIOC_SET_EVENT_CHAR Pq Vt int
152 Set the character which causes a partial FIFO full of data
153 to be returned immediately even if the FIFO is not full.
154 .It Dv UFTDIIOC_SET_LATENCY Pq Vt int
155 Set the amount of time to wait for a full FIFO,
157 If more than this much time elapses without receiving a new
158 character, any characters in the FIFO are returned.
159 .It Dv UFTDIIOC_GET_LATENCY Pq Vt int
160 Get the current value of the latency timer.
161 .It Dv UFTDIIOC_GET_HWREV Pq Vt int
162 Get the hardware revision number.
166 .Va usb_device_descriptor .
170 driver supports the following adapters:
174 B&B Electronics USB->RS422/485 adapter
176 Elexol USB MOD1 and USB MOD3
178 HP USB-Serial adapter shipped with some HP laptops
184 Buffalo PC-OP-RS / Kurouto-shikou KURO-RS universal remote
186 Prologix GPIB-USB Controller