Author Topic: FTDI - GetBitMode command  (Read 2380 times)

0 Members and 1 Guest are viewing this topic.

Offline ZvikaTopic starter

  • Newbie
  • Posts: 1
FTDI - GetBitMode command
« on: October 27, 2014, 01:59:33 pm »
Hi,

I'm NB in FTDI programming.
Using FT2232D and Linux driver ftd2xx, I'm trying to read the values on channel A pins while in bit-bang asynchronous mode.
The pins were configured as output using SetBitMode command.
The FT_Read command returns wrong value.
However, the FT_GetBitMode command, from some reason I cant understand, returns the correct value.

FT_GetBitMode:
Get the current value of the IO bit mode.

FT_STATUS
FT_GetBitMode
(FT_HANDLE ftHandle, PUCHAR pucMode)

Parameters:
ftHandle
Handle of the device.

pucMode
Pointer to unsigned char to store bit mode value.

Return Value
FT_OK if successful, otherwise the return value is an FT error code.   

Is it OK to use the FT_GetBitMode in such way (to read the pins value)?
What is the usage that require configuring the pins as input?

thanks.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf