libftdi Archives

Subject: getbitmode() and cbus pins.

From: Mark Rages <markrages@xxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 17 May 2011 11:02:54 -0500
On Tue, May 17, 2011 at 8:33 AM, Thomas Jarosch
<thomas.jarosch@xxxxxxxxxxxxx> wrote:
> On 05/13/2011 05:41 PM, Mark Rages wrote:
>>> I thought about releasing libftdi 0.19 next week.
>>> Any outstanding issues/patches?
>>
>> ftdi_get_bitmode()
>
> "examples/bitbang_cbus.c" might help.
>
> Thomas

But I need to use the bitbang pins and the cbus pins at the same time.

The attached file shows what doesn't work:  I want to maintain the CTS
pin high, but when I set BITMODE_CBUS it drops the CTS pin.  When I
set BITMODE_BITBANG it drops the CTS pin again.

The attached file demonstrates the problem.  Run it and watch the CTS
pin toggle in the mainloop.

As a workaround I can set BITBANG_CBUS | BITMODE_BITBANG and it will
maintain CTS state and let me address the CBUS pins (the same mask
fortuitously works for both sets of pins), but then ftdi_read_pins()
reads the bitbang pins instead of the cbus pins.   The D2xx function
FD_GetBitMode() does what I need (in Windows; it is broken in Linux)
but I would prefer to use libftdi instead.

Is there a preferred way to address the CBUS pins and remember the
state of the bitbang pins?

Regards,
Mark
markrages@gmail
-- 
Mark Rages, Engineer
Midwest Telecine LLC
markrages@xxxxxxxxxxxxxxxxxxx


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

Attachment: main.c
Description: Text Data

Current Thread