libftdi Archives

Subject: Can someone give me a good explanation of ftdi_set_bitmode()?

From: John Oyler <john.oyler@xxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Sat, 28 Aug 2010 17:05:05 -0500
I think I understand it well enough, but I'd like confirmation here.

I'm using it once, during an init() function, and it is passed 3 arguments. The 
first is the ftdi context object (I can't tell you what this is, it's voodoo, 
but I doubt I need to know specifics of this).

The second argument is a bitmask... and it seems it might be central to some 
problems I've been having.

The third is the mode itself, which since I'm doing SPI, should be a value of 2.

This bitmask, I'm assuming, determines either which bits are "enabled" for SPI, 
or which are outputs or something like that. But it's still not very clear to 
me which, or how.  The example code I've been using merely sets this to 0x00.

John O.
libftdi - see for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx

Current Thread