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.