Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

Man Page or Keyword Search:
Man Architecture
Apropos Keyword Search (all sections) Output format
home | help
UFTDI(4)	       FreeBSD Kernel Interfaces Manual		      UFTDI(4)

     uftdi -- USB support for serial adapters based on the FTDI	family of USB
     serial adapter chips.

     To	compile	this driver into the kernel, place the following lines in your
     kernel configuration file:

	   device usb
	   device ucom
	   device uftdi

     Alternatively, to load the	driver as a module at boot time, place the
     following line in loader.conf(5):


     The uftdi driver provides support for various serial adapters based on
     the following FTDI	chips:

     +o	 FT8U100AX
     +o	 FT8U232AM
     +o	 FT8U232BM
     +o	 FT232R
     +o	 FT2232C
     +o	 FT2232D
     +o	 FT2232H
     +o	 FT4232H
     +o	 FT230X

     The device	is accessed through the	ucom(4)	driver which makes it behave
     like a tty(4).

     Many of the supported chips provide additional functionality such as bit-
     bang mode and the MPSSE engine for	serial bus emulation.  The uftdi
     driver provides access to that functionality with the following ioctl(2)
     calls, defined in <dev/usb/uftdiio.h>:

	     Reset the channel to its default configuration, flush RX and TX

	     Flush the RX FIFO.

	     Flush the TX FIFO.

     UFTDIIOC_SET_BITMODE (struct uftdi_bitmode)
	     Put the channel into the operating	mode specified in mode,	and
	     set the pins indicated by ones in iomask to output	mode.  The
	     mode must be one of the uftdi_bitmodes values.  Setting mode to
	     UFTDI_BITMODE_NONE	returns	the channel to standard	UART mode.

	     enum uftdi_bitmodes
		     UFTDI_BITMODE_NONE	= 0xff,

	     struct uftdi_bitmode
		     uint8_t mode;
		     uint8_t iomask;

	     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 read(2) and write(2) data
	     which either reflects pin state or	is interpreted as MPSSE	com-
	     mands and parameters, depending on	the mode.

     UFTDIIOC_GET_BITMODE (struct uftdi_bitmode)
	     Return the	current	bitbang	mode in	the mode member, and the state
	     of	the DBUS0..DBUS7 pins at the time of the call in the iomask
	     member.  The pin state can	be read	while the chip is in any mode,
	     including UFTDI_BITMODE_NONE (UART) mode.

	     Set the character which is	inserted into the buffer to mark the
	     point of an error such as FIFO overflow.

	     Set the character which causes a partial FIFO full	of data	to be
	     returned immediately even if the FIFO is not full.

	     Set the amount of time to wait for	a full FIFO, in	milliseconds.
	     If	more than this much time elapses without receiving a new char-
	     acter, any	characters in the FIFO are returned.

	     Get the current value of the latency timer.

	     Get the hardware revision number.	This is	the bcdDevice value
	     from the usb_device_descriptor.

     UFTDIIOC_READ_EEPROM (struct uftdi_eeio)
	     Read one or more words from the configuration eeprom.  The	FTDI
	     chip performs eeprom I/O in 16-bit	words.	Set offset and length
	     to	values evenly divisible	by two before the call,	and the	data
	     array will	contain	the requested values from eeprom after the

	     struct uftdi_eeio
		     uint16_t offset;
		     uint16_t length;
		     uint16_t data[64];

	     The FT232R	chip has an internal eeprom.  An external serial eep-
	     rom is optional on	other FTDI chips.  The eeprom may contain 64,
	     128, or 256 words,	depending on the part used.  Multiple calls
	     may be needed to read or write the	larger parts.  When no eeprom
	     is	present, all words in the returned data	are 0xffff.  An	erased
	     eeprom also reads as all 0xffff.

     UFTDIIOC_WRITE_EEPROM (struct uftdi_eeio)
	     Write one or more words to	the configuration eeprom.  The
	     uftdi_eeio	values are as described	for UFTDIIOC_READ_EEPROM.

	     The FTDI chip does	a blind	write to the eeprom, and it will
	     appear to succeed even when no eeprom is present.	To ensure a
	     good write	you must read back and verify the data.	 It is not
	     necessary to erase	before writing.	 Any position within the eep-
	     rom can be	overwritten at any time.

	     Erase the entire eeprom.  This is useful primarily	for test and
	     debugging,	as there is no need to erase before writing.  To help
	     prevent accidental	erasure	caused by calling the wrong ioctl, you
	     must pass the special value UFTDI_CONFIRM_ERASE as	the argument
	     to	this ioctl.

     The uftdi driver supports the following adapters:

     +o	 B&B Electronics USB->RS422/485	adapter
     +o	 Elexol	USB MOD1 and USB MOD3
     +o	 HP USB-Serial adapter shipped with some HP laptops
     +o	 Inland	UAS111
     +o	 QVS USC-1000
     +o	 Buffalo PC-OP-RS / Kurouto-shikou KURO-RS universal remote
     +o	 Prologix GPIB-USB Controller

     tty(4), ucom(4), usb(4)

     The uftdi driver appeared in FreeBSD 4.8 from NetBSD 1.5.

FreeBSD	11.1			August 6, 2015			  FreeBSD 11.1


Want to link to this manual page? Use this URL:

home | help