summaryrefslogtreecommitdiffstats
path: root/src/devices/pic/xml
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/pic/xml')
-rw-r--r--src/devices/pic/xml/pic_xml_to_data.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/devices/pic/xml/pic_xml_to_data.cpp b/src/devices/pic/xml/pic_xml_to_data.cpp
index eeb293a..18a5409 100644
--- a/src/devices/pic/xml/pic_xml_to_data.cpp
+++ b/src/devices/pic/xml/pic_xml_to_data.cpp
@@ -154,7 +154,7 @@ Pic::Config::Mask toConfigMask(TQDomElement tqmask, BitValue ptqmask)
if ( value.attribute("value")=="default" ) {
if ( !defName.isEmpty() ) qFatal(TQString("Default value already defined for tqmask %1").tqarg(ctqmask.name));
defName = value.attribute("name");
- //if ( names.tqcontains(defName) ) qFatal(TQString("Value name duplicated in tqmask %1").tqarg(ctqmask.name));
+ //if ( names.contains(defName) ) qFatal(TQString("Value name duplicated in tqmask %1").tqarg(ctqmask.name));
//names.append(defName);
FOR_EACH(Pic::ConfigNameType, type) defConfigNames[type] = TQStringList::split(' ', value.attribute(type.data().key));
continue;
@@ -163,7 +163,7 @@ Pic::Config::Mask toConfigMask(TQDomElement tqmask, BitValue ptqmask)
cvalue.value = fromHexLabel(value.attribute("value"), nbChars, &ok);
if ( !ok || !cvalue.value.isInside(ctqmask.value) ) qFatal(TQString("Malformed value in tqmask %1").tqarg(ctqmask.name));
cvalue.name = value.attribute("name");
- //if ( names.tqcontains(cvalue.name) ) qFatal(TQString("Value name duplicated in tqmask %1").tqarg(ctqmask.name));
+ //if ( names.contains(cvalue.name) ) qFatal(TQString("Value name duplicated in tqmask %1").tqarg(ctqmask.name));
//names.append(cvalue.name);
FOR_EACH(Pic::ConfigNameType, type) cvalue.configNames[type] = TQStringList::split(' ', value.attribute(type.data().key));
processName(ctqmask, ptqmask, cvalue);
@@ -298,7 +298,7 @@ TQString getChecksumData(TQDomElement checksum)
if ( protection.family()==Protection::NoProtection && !valueName.isEmpty() )
qFatal("Checksum protected attribute for device with no code protection");
}
- if ( data()->_checksums.tqcontains(valueName) ) qFatal("Duplicate checksum protected range");
+ if ( data()->_checksums.contains(valueName) ) qFatal("Duplicate checksum protected range");
TQString s = checksum.attribute("constant");
if ( s.isEmpty() ) cdata.constant = 0x0000;
@@ -359,8 +359,8 @@ virtual void processDevice(TQDomElement device)
TQString arch = device.attribute("architecture");
data()->_architecture = Architecture::fromKey(arch);
if ( data()->_architecture==Architecture::Nb_Types ) qFatal(TQString("Unrecognized architecture \"%1\"").tqarg(arch));
- if ( (data()->_architecture==Architecture::P18F && data()->_name.tqcontains("C"))
- || (data()->_architecture==Architecture::P18F && data()->_name.tqcontains("J")) ) qFatal("Not matching family");
+ if ( (data()->_architecture==Architecture::P18F && data()->_name.contains("C"))
+ || (data()->_architecture==Architecture::P18F && data()->_name.contains("J")) ) qFatal("Not matching family");
bool ok;
TQString pc = device.attribute("pc");
@@ -449,7 +449,7 @@ virtual void processDevice(TQDomElement device)
const TQStringList &vcnames = tqmask.values[k].configNames[type];
for (uint l=0; l<uint(vcnames.count()); l++) {
if ( vcnames[l].startsWith("0x") ) continue;
- if ( cnames.tqcontains(vcnames[l]) && cnames[vcnames[l]]!=tqmask.name )
+ if ( cnames.contains(vcnames[l]) && cnames[vcnames[l]]!=tqmask.name )
qFatal(TQString("Duplicated config name for %1/%2").tqarg(tqmask.name).tqarg(tqmask.values[k].name));
cnames[vcnames[l]] = word.masks[j].name;
}
@@ -500,7 +500,7 @@ virtual void processDevice(TQDomElement device)
if ( child.nodeName()!="checksum" ) qFatal("Childs of \"checksums\" should \"checksum\"");
TQString valueName = getChecksumData(child.toElement());
if ( protection.family()==Protection::BasicProtection ) {
- if ( !valueNames.tqcontains(valueName) ) qFatal("Unknown protected attribute");
+ if ( !valueNames.contains(valueName) ) qFatal("Unknown protected attribute");
valueNames[valueName] = true;
}
child = child.nextSibling();
@@ -548,7 +548,7 @@ void processSfr(TQDomElement e)
{
TQString name = e.attribute("name");
if ( name.isEmpty() ) qFatal("SFR cannot have empty name");
- if ( data()->registersData().sfrs.tqcontains(name) || data()->registersData().combined.tqcontains(name) )
+ if ( data()->registersData().sfrs.contains(name) || data()->registersData().combined.contains(name) )
qFatal("SFR name is duplicated");
bool ok;
uint address = fromHexLabel(e.attribute("address"), &ok);
@@ -582,7 +582,7 @@ void processCombined(TQDomElement e)
{
TQString name = e.attribute("name");
if ( name.isEmpty() ) qFatal("Combined register cannot have empty name");
- if ( data()->registersData().sfrs.tqcontains(name) || data()->registersData().combined.tqcontains(name) )
+ if ( data()->registersData().sfrs.contains(name) || data()->registersData().combined.contains(name) )
qFatal("Combined register name is duplicated");
bool ok;
CombinedData rdata;
@@ -601,7 +601,7 @@ void processDeviceRegisters(TQDomElement element)
{
TQString s = element.attribute("same_as");
if ( !s.isEmpty() ) {
- if ( !_map.tqcontains(s) ) qFatal(TQString("Registers same as unknown device %1").tqarg(s));
+ if ( !_map.contains(s) ) qFatal(TQString("Registers same as unknown device %1").tqarg(s));
const Pic::Data *d = static_cast<const Pic::Data *>(_map[s]);
data()->_registersData = d->_registersData;
return;
@@ -636,14 +636,14 @@ void processDeviceRegisters(TQDomElement element)
for (uint i=0; i<Device::MAX_NB_PORTS; i++) {
TQString portname = rdata.portName(i);
if ( portname.isEmpty() ) break;
- bool hasPort = rdata.sfrs.tqcontains(portname);
+ bool hasPort = rdata.sfrs.contains(portname);
TQString trisname = rdata.trisName(i);
if ( trisname.isEmpty() ) continue;
- bool hasTris = rdata.sfrs.tqcontains(trisname);
+ bool hasTris = rdata.sfrs.contains(trisname);
if ( !hasPort && hasTris ) qFatal(TQString("%1 needs %2 to be present").tqarg(trisname).tqarg(portname));
TQString latchname = rdata.latchName(i);
if ( latchname.isEmpty() ) continue;
- bool hasLatch = rdata.sfrs.tqcontains(latchname);
+ bool hasLatch = rdata.sfrs.contains(latchname);
if ( !hasPort && hasLatch ) qFatal(TQString("%1 needs %2 to be present").tqarg(latchname).tqarg(portname));
}
}
@@ -660,8 +660,8 @@ void processRegistersFile(const TQString &filename, TQStringList &devices)
if ( child.nodeName()!="device" ) qFatal("Device node should be named \"device\"");
TQDomElement device = child.toElement();
TQString name = device.attribute("name");
- if ( devices.tqcontains(name) ) qFatal(TQString("Registers already defined for %1").tqarg(name));
- if ( _map.tqcontains(name) ) {
+ if ( devices.contains(name) ) qFatal(TQString("Registers already defined for %1").tqarg(name));
+ if ( _map.contains(name) ) {
_data = _map[name];
processDeviceRegisters(device);
devices.append(name);
@@ -680,14 +680,14 @@ void processRegisters()
TQMap<TQString, Device::Data *>::const_iterator it = _map.begin();
for (; it!=_map.end(); ++it) {
_data = it.data();
- if ( !devices.tqcontains(it.key()) ) qWarning("Register description not found for %s", it.key().latin1());
+ if ( !devices.contains(it.key()) ) qWarning("Register description not found for %s", it.key().latin1());
}
}
virtual void checkPins(const TQMap<TQString, uint> &pinLabels) const
{
- if ( !pinLabels.tqcontains("VDD") ) qFatal("No VDD pin specified");
- if ( !pinLabels.tqcontains("VSS") ) qFatal("No VSS pin specified");
+ if ( !pinLabels.contains("VDD") ) qFatal("No VDD pin specified");
+ if ( !pinLabels.contains("VSS") ) qFatal("No VSS pin specified");
TQMap<TQString, uint>::const_iterator it;
for (it=pinLabels.begin(); it!=pinLabels.end(); ++it) {
if ( it.key()=="VDD" || it.key()=="VSS" || it.key().startsWith("CCP") ) continue;
@@ -699,7 +699,7 @@ virtual void checkPins(const TQMap<TQString, uint> &pinLabels) const
for (uint k=0; k<Device::MAX_NB_PORT_BITS; k++) {
if ( !rdata.hasPortBit(i, k) ) continue;
TQString name = rdata.portBitName(i, k);
- if ( !pinLabels.tqcontains(name) ) qFatal(TQString("Pin \"%1\" not present").tqarg(name));
+ if ( !pinLabels.contains(name) ) qFatal(TQString("Pin \"%1\" not present").tqarg(name));
}
}
}