libftdi Archives

Subject: Re: getbitmode() and cbus pins.

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 20 May 2011 15:52:34 +0200
Hello Mark,

On Tuesday, 17. May 2011 18:02:54 Mark Rages wrote:
> 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.

I never used FT_GetBitMode(), in fact I never used any official FTDI driver.
To me, the documentation looks like it only returns the current
bitbang mode?

ftdi_read_pins() is not directly aware of the bitbang mode.

If there's some special way on D2xx to read either the normal pins or the 
CBUS pins, then you could use a USB sniffer like "USBsnoop" or "busdog"
to find out that they are sending over the wire.

If it's already supported by D2xx on Linux, then you could "strace" it.

Thomas

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

Current Thread