libftdi Archives

Subject: Setting high byte(ACBUS) using ftdi_set_bitmode

From: Ramkumar Jayaraman <ramkumarj2000commits@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sun, 30 Oct 2011 13:08:05 +0800
Hi,

I have a question on the libftdi-0.19 library API. My understanding based on AN 108 is that FT2232H has 2 channels with each channel having 16-bit IO lines. I have a code similar as below.

ret = ftdi_init(&ctx);
ret = ftdi_set_interface(&ctx, INTERFACE_A); <== Talk to 1 st channel
ret = ftdi_usb_open( &ctx, 0x0403, 0x6010);
ret = ftdi_set_bitmode( &ctx, 0xFF, BITMODE_MPSSE); <== Turn ON MPSSE mode

It looks like ftdi_set_bitmode() can configure only the ADBUS[7:0]. Is there a way to set directions of ACBUS[7:0] before entering the MPSSE mode ?

Similarly, ftdi_read_pins() seem to populate the status of pins in the 'unsigned char *pins' pointer. Would it safe to assume the pins as 2 bytes always ?

BR,
Ram


libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx


Current Thread