You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Any call to WritePins fails
What is the expected output? What do you see instead?
Get an MPSSE_FAIL for return value instead of MPSSE_OK
What version of the product are you using? On what operating system?
latest SVN version.
Please provide any additional information below.
I looked at this and found, much to my chagrin, that when I'd given you this
function, I was only checking for ftdi_write_data to return 0. The latest
libftdi version doesn't do that. It actually returns the number of bytes
written, in which case the following:
if(ftdi_write_data(&mpsse->ftdi, &data, 1) == 0)
will always fail, even if there is a success. It probably should read:
if(ftdi_write_data(&mpsse->ftdi, &data, 1) > 0)
I guess it could even read:
if(ftdi_write_data(&mpsse->ftdi, &data, 1) >= 0)
I would send a patch instead, but I made the change without creating a git
repository. Since it was a trivial change, it is no big deal. I'm guessing
not too many people use this function. I don't know if, given some of the
library additions, there is now a better, or different way to achieve what this
achieved.
Thanks for taking a look.
Original issue reported on code.google.com by [email protected] on 29 Nov 2013 at 4:05
The text was updated successfully, but these errors were encountered:
Oh, I suppose it could even check for the number of bytes returned, but then it
wouldn't be backward compatible with older versions of libftdi, if you care
about that.
Original issue reported on code.google.com by
[email protected]
on 29 Nov 2013 at 4:05The text was updated successfully, but these errors were encountered: