Skip to content
Snippets Groups Projects
Commit 118fec1d authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

olved a bug in the FTDI module. The flow control was set to RTS/CTS and must be NONE.

parent f07b08c1
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,12 @@ void CFTDI::hard_config(void *config)
/* handle exceptions */
throw CFTDIException(_HERE_,error_messages[ft_status],this->comm_id);
}
usleep(100);
usleep(1000000);
if((ft_status=FT_SetBitMode(this->ft_handle,0xFF,0x40))!=FT_OK)
{
/* handle exceptions */
throw CFTDIException(_HERE_,error_messages[ft_status],this->comm_id);
}
if((ft_status=FT_SetLatencyTimer(this->ft_handle,2))!=FT_OK)
{
......@@ -123,7 +128,7 @@ void CFTDI::hard_config(void *config)
/* handle exceptions */
throw CFTDIException(_HERE_,error_messages[ft_status],this->comm_id);
}
if((ft_status=FT_Purge(this->ft_handle,FT_PURGE_RX))!=FT_OK)
if((ft_status=FT_Purge(this->ft_handle,FT_PURGE_TX|FT_PURGE_RX))!=FT_OK)
{
/* handle exceptions */
throw CFTDIException(_HERE_,error_messages[ft_status],this->comm_id);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment