summaryrefslogtreecommitdiffstats
path: root/share/man
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-04-28 12:46:23 +0000
committerian <ian@FreeBSD.org>2014-04-28 12:46:23 +0000
commitcb4d7c77b61877ede0f30cc96e4a61514819ba2a (patch)
tree7e28eff5570cf7bfe3e20ab95357c424589f6198 /share/man
parente852cd69383058c931f6f569329eed128eb9d109 (diff)
downloadFreeBSD-src-cb4d7c77b61877ede0f30cc96e4a61514819ba2a.zip
FreeBSD-src-cb4d7c77b61877ede0f30cc96e4a61514819ba2a.tar.gz
MFC uftdi(4) driver changes...
r264010: Support speeds up to 12mbaud on newer chips. r264031: Use 2K IO buffers for improved throughput. r264149: Add ioctl(2) calls to access bitbang, MPSSE, CPU_FIFO, and other modes.
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man4/uftdi.481
1 files changed, 81 insertions, 0 deletions
diff --git a/share/man/man4/uftdi.4 b/share/man/man4/uftdi.4
index db75c68..bfaa780 100644
--- a/share/man/man4/uftdi.4
+++ b/share/man/man4/uftdi.4
@@ -61,6 +61,87 @@ The device is accessed through the
.Xr ucom 4
driver which makes it behave like a
.Xr tty 4 .
+.Pp
+Many of the supported chips provide additional functionality
+such as bitbang mode and the MPSSE engine for serial bus emulation.
+The
+.Nm
+driver provides access to that functionality with the following
+.Xr ioctl 2
+calls, defined in
+.In dev/usb/uftdiio.h :
+.Bl -tag -width indent
+.It Dv UFTDIIOC_RESET_IO Pq Vt int
+Reset the channel to its default configuration, flush RX and TX FIFOs.
+.It Dv UFTDIIOC_RESET_RX Pq Vt int
+Flush the RX FIFO.
+.It Dv UFTDIIOC_RESET_TX Pq Vt int
+Flush the TX FIFO.
+.It Dv UFTDIIOC_SET_BITMODE Pq Vt "struct uftdi_bitmode"
+Put the channel into the operating mode specified in
+.Va mode ,
+and set the pins indicated by ones in
+.Va iomask
+to output mode.
+The
+.Va mode
+must be one of the
+.Va uftdi_bitmodes
+values.
+.Bd -literal
+enum uftdi_bitmodes
+{
+ UFTDI_BITMODE_ASYNC = 0,
+ UFTDI_BITMODE_MPSSE = 1,
+ UFTDI_BITMODE_SYNC = 2,
+ UFTDI_BITMODE_CPU_EMUL = 3,
+ UFTDI_BITMODE_FAST_SERIAL = 4,
+ UFTDI_BITMODE_CBUS = 5,
+ UFTDI_BITMODE_NONE = 0xff,
+};
+
+struct uftdi_bitmode
+{
+ uint8_t mode;
+ uint8_t iomask;
+};
+.Ed
+.Pp
+Manuals and application notes published by FTDI describe these
+modes in detail.
+To use most of these modes, you first put the channel into
+the desired mode, then you
+.Xr read 2
+and
+.Xr write 2
+data which either reflects pin state or is interpreted
+as MPSSE commands and parameters, depending on the mode.
+.It Dv UFTDIIOC_GET_BITMODE Pq Vt "struct uftdi_bitmode"
+Return the state of the bitbang pins at the time of the call in the
+.Va iomask
+member.
+The
+.Va mode
+member is unused.
+.It Dv UFTDIIOC_SET_ERROR_CHAR Pq Vt int
+Set the character which is inserted into the buffer to mark
+the point of an error such as FIFO overflow.
+.It Dv UFTDIIOC_SET_EVENT_CHAR Pq Vt int
+Set the character which causes a partial FIFO full of data
+to be returned immediately even if the FIFO is not full.
+.It Dv UFTDIIOC_SET_LATENCY Pq Vt int
+Set the amount of time to wait for a full FIFO,
+in milliseconds.
+If more than this much time elapses without receiving a new
+character, any characters in the FIFO are returned.
+.It Dv UFTDIIOC_GET_LATENCY Pq Vt int
+Get the current value of the latency timer.
+.It Dv UFTDIIOC_GET_HWREV Pq Vt int
+Get the hardware revision number.
+This is the
+.Va bcdDevice
+value from the
+.Va usb_device_descriptor .
.Sh HARDWARE
The
.Nm
OpenPOWER on IntegriCloud