Hello Rui, On 10/26/2010 07:51 PM, Rui Barreiros wrote: > * Loop start > - ftdi_poll_modem_status > - if we got a break > - read startbyte (1 byte) > - read dmxvalues (512 bytes) > - ftdi_usb_purge_buffers > * Loop end > > Now, the dmx values are read, but, in the wrong place and sometimes change > places. The break detection is not working well, sometimes it's detected > other times it isn't, so the update is slow as hell for a 250k baud and I'm > almost sure that due to the break issue the values come in a wrong order. > > I could use FTDI own driver, I have an example using Win32 API that works > (all those FT_W320_* functions) but I can't make this work with libftdi, and > I'd rather use libftdi instead of FTDI own lib. > > Anyone has any idea or pointer to enlighten me over what I might be doing > wrong ?
I'm not sure if the ftdi_poll_modem_status() function gives you access to all sent break signals. Look into ftdi_read_data(), it filters out the modem status on every packet border IIRC. Thomas -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
