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 FT8U100AX and FT8U232AM chips
39 To compile this driver into the kernel,
40 place the following lines in your
41 kernel configuration file:
42 .Bd -ragged -offset indent
48 Alternatively, to load the driver as a
49 module at boot time, place the following line in
51 .Bd -literal -offset indent
57 driver provides support for various serial adapters based on the FTDI
58 FT2232C, FT8U100AX and FT8U232AM chips.
60 The device is accessed through the
62 driver which makes it behave like a
65 Many of the supported chips provide additional functionality
66 such as bitbang mode and the MPSSE engine for serial bus emulation.
69 driver provides access to that functionality with the following
72 .In dev/usb/uftdiio.h :
73 .Bl -tag -width indent
74 .It Dv UFTDIIOC_RESET_IO Pq Vt int
75 Reset the channel to its default configuration, flush RX and TX FIFOs.
76 .It Dv UFTDIIOC_RESET_RX Pq Vt int
78 .It Dv UFTDIIOC_RESET_TX Pq Vt int
80 .It Dv UFTDIIOC_SET_BITMODE Pq Vt "struct uftdi_bitmode"
81 Put the channel into the operating mode specified in
83 and set the pins indicated by ones in
94 UFTDI_BITMODE_ASYNC = 0,
95 UFTDI_BITMODE_MPSSE = 1,
96 UFTDI_BITMODE_SYNC = 2,
97 UFTDI_BITMODE_CPU_EMUL = 3,
98 UFTDI_BITMODE_FAST_SERIAL = 4,
99 UFTDI_BITMODE_CBUS = 5,
100 UFTDI_BITMODE_NONE = 0xff,
110 Manuals and application notes published by FTDI describe these
112 To use most of these modes, you first put the channel into
113 the desired mode, then you
117 data which either reflects pin state or is interpreted
118 as MPSSE commands and parameters, depending on the mode.
119 .It Dv UFTDIIOC_GET_BITMODE Pq Vt "struct uftdi_bitmode"
120 Return the state of the bitbang pins at the time of the call in the
126 .It Dv UFTDIIOC_SET_ERROR_CHAR Pq Vt int
127 Set the character which is inserted into the buffer to mark
128 the point of an error such as FIFO overflow.
129 .It Dv UFTDIIOC_SET_EVENT_CHAR Pq Vt int
130 Set the character which causes a partial FIFO full of data
131 to be returned immediately even if the FIFO is not full.
132 .It Dv UFTDIIOC_SET_LATENCY Pq Vt int
133 Set the amount of time to wait for a full FIFO,
135 If more than this much time elapses without receiving a new
136 character, any characters in the FIFO are returned.
137 .It Dv UFTDIIOC_GET_LATENCY Pq Vt int
138 Get the current value of the latency timer.
139 .It Dv UFTDIIOC_GET_HWREV Pq Vt int
140 Get the hardware revision number.
144 .Va usb_device_descriptor .
148 driver supports the following adapters:
152 B&B Electronics USB->RS422/485 adapter
154 Elexol USB MOD1 and USB MOD3
156 HP USB-Serial adapter shipped with some HP laptops
162 Buffalo PC-OP-RS / Kurouto-shikou KURO-RS universal remote
164 Prologix GPIB-USB Controller