From f8c31271e35e02da82aa9b35882fe697c6ab167e Mon Sep 17 00:00:00 2001 From: Rainer Clasen Date: Tue, 26 Jul 2011 02:15:02 +0200 Subject: [PATCH] SrmDevice: support D2XX with srmio, as well added the last bits to use the libftd2xx support I just wrote for srmio. In other words: this needs an update srmio from github, again. --- src/SrmDevice.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/SrmDevice.cpp b/src/SrmDevice.cpp index a507016c9..561cb8889 100644 --- a/src/SrmDevice.cpp +++ b/src/SrmDevice.cpp @@ -43,6 +43,9 @@ SrmDevices::supportsPort( CommPortPtr dev ) if( dev->type() == "Serial" ) return true; + if( dev->type() == "D2XX" ) + return true; + return false; } @@ -99,6 +102,15 @@ SrmDevice::open( QString &err ) return false; } + } else if( dev->type() == "D2XX" ){ + io = srmio_d2xx_description_new( dev->name().toAscii().constData() ); + if( ! io ){ + err = tr("failed to allocate device handle: %1") + .arg(strerror(errno)); + return false; + } + + } else { err = tr("device type %1 is unsupported") .arg(dev->type());