mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-15 08:59:55 +00:00
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user