Em 17-11-2010 19:37, Thomas Jarosch escreveu:
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 libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
I'm using ftdi_read_data() to read the DMX signal after I detect a break
with ftdi_poll_modem_status, at least what I think it is a break, and I
need to search for the MAB, are you saying it is possible to detect MAB
with the data returned from ftdi_read_data ? If so could I get a simple
example on how to catch it ?
Thanks. Best regards,
Rui Barreiros
--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|