git-svn-id: svn://db.shs.com.ru/pip@677 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "pispi.h"
|
||||
#include "pipropertystorage.h"
|
||||
#include "piincludes_p.h"
|
||||
#if !defined(WINDOWS) && !defined(MAC_OS)
|
||||
# define PIP_SPI
|
||||
@@ -145,3 +146,23 @@ void PISPI::configureFromFullPathDevice(const PIString & full_path) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PIPropertyStorage PISPI::constructVariantDevice() const {
|
||||
PIPropertyStorage ret;
|
||||
ret.addProperty("path", path());
|
||||
ret.addProperty("speed", int(speed()));
|
||||
ret.addProperty("bits", int(bits()));
|
||||
ret.addProperty("clock inverse", isParameterSet(ClockInverse));
|
||||
ret.addProperty("clock phase shift", isParameterSet(ClockPhaseShift));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void PISPI::configureFromVariantDevice(const PIPropertyStorage & d) {
|
||||
setPath(d.propertyValueByName("path").toString());
|
||||
setSpeed(d.propertyValueByName("speed").toInt());
|
||||
setBits(d.propertyValueByName("bits").toInt());
|
||||
setParameter(ClockInverse, d.propertyValueByName("clock inverse").toBool());
|
||||
setParameter(ClockPhaseShift, d.propertyValueByName("clock phase shift").toBool());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user