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.
This commit is contained in:
Rainer Clasen
2011-07-26 02:15:02 +02:00
parent 9a1cd73f01
commit f8c31271e3

View File

@@ -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());