leonerd / perl-Device-FTDI

perl extension to talk to FTDI chips
5 stars 1 forks source link

Acess chips with multiple controllers (FT2232D for example) #1

Closed paxospaxos closed 12 years ago

paxospaxos commented 12 years ago

Using Device::FTDI, I can't seem to figure out how to specify which controller I would like to communicate with on a dual controller chip such as the FT2232D. Am I missing something simple?

trinitum commented 12 years ago

I suspect that you should use ftdi_set_interface function. I didn't add it when implemented module, as I didn't need it. I will add function, but I won't be able to test it, as I don't have access to any FDTI chips at the moment.

trinitum commented 12 years ago

Please let me know if it worked for you or not

paxospaxos commented 12 years ago

added this:

  FTDI.pm
177c177,178
<     return _set_interface(shift->{_ctx});
---
>     my ( $self, $interface ) = @_;
>     return _set_interface(shift->{_ctx}, $interface);

will keep testing...

paxospaxos commented 12 years ago

With the added patch above, the new ftdi_set_interface function has been successfully tested with the FT2232D chipset. Works great! Thanks!