diff options
Diffstat (limited to 'src/devices/pic/prog')
-rw-r--r-- | src/devices/pic/prog/pic_debug.cpp | 34 | ||||
-rw-r--r-- | src/devices/pic/prog/pic_debug.h | 12 | ||||
-rw-r--r-- | src/devices/pic/prog/pic_prog.cpp | 94 | ||||
-rw-r--r-- | src/devices/pic/prog/pic_prog.h | 2 | ||||
-rw-r--r-- | src/devices/pic/prog/pic_prog_specific.cpp | 28 | ||||
-rw-r--r-- | src/devices/pic/prog/pic_prog_specific.h | 6 |
6 files changed, 88 insertions, 88 deletions
diff --git a/src/devices/pic/prog/pic_debug.cpp b/src/devices/pic/prog/pic_debug.cpp index 443bb10..ebdcd75 100644 --- a/src/devices/pic/prog/pic_debug.cpp +++ b/src/devices/pic/prog/pic_debug.cpp @@ -13,14 +13,14 @@ #include "progs/manager/debug_manager.h" //---------------------------------------------------------------------------- -Register::TypeData Debugger::PicBase::registerTypeData(const QString &name) const +Register::TypeData Debugger::PicBase::registerTypeData(const TQString &name) const { const Pic::RegistersData &rdata = device()->registersData(); - Q_ASSERT(rdata.sfrs.contains(name)); + Q_ASSERT(rdata.sfrs.tqcontains(name)); return Register::TypeData(rdata.sfrs[name].address, rdata.nbChars()); } -bool Debugger::PicBase::updatePortStatus(uint index, QMap<uint, Device::PortBitData> &bits) +bool Debugger::PicBase::updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits) { const Pic::RegistersData &rdata = device()->registersData(); BitValue tris; @@ -65,7 +65,7 @@ const Debugger::PicBase &Debugger::PicSpecific::base() const return static_cast<PicBase &>(_base); } -bool Debugger::PicSpecific::updateStatus() +bool Debugger::PicSpecific::updatetqStatus() { if ( !Debugger::manager->readRegister(base().pcTypeData()) ) return false; if ( !Debugger::manager->readRegister(base().registerTypeData("STATUS")) ) return false; @@ -79,22 +79,22 @@ Register::TypeData Debugger::P16FSpecific::wregTypeData() const return Register::TypeData("WREG", device().registersData().nbChars()); } -QString Debugger::P16FSpecific::statusString() const +TQString Debugger::P16FSpecific::statusString() const { const Pic::RegistersData &rdata = device().registersData(); BitValue status = Register::list().value(base().registerTypeData("STATUS")); uint bank = (status.bit(5) ? 1 : 0) + (status.bit(6) ? 2 : 0); BitValue wreg = Register::list().value(wregTypeData()); - return QString("W:%1 %2 %3 %4 PC:%5 Bank:%6") - .arg(toHexLabel(wreg, rdata.nbChars())).arg(status.bit(2) ? "Z" : "z") - .arg(status.bit(1) ? "DC" : "dc").arg(status.bit(0) ? "C" : "c") - .arg(toHexLabel(_base.pc(), device().nbCharsAddress())).arg(bank); + return TQString("W:%1 %2 %3 %4 PC:%5 Bank:%6") + .tqarg(toHexLabel(wreg, rdata.nbChars())).tqarg(status.bit(2) ? "Z" : "z") + .tqarg(status.bit(1) ? "DC" : "dc").tqarg(status.bit(0) ? "C" : "c") + .tqarg(toHexLabel(_base.pc(), device().nbCharsAddress())).tqarg(bank); } //---------------------------------------------------------------------------- -bool Debugger::P18FSpecific::updateStatus() +bool Debugger::P18FSpecific::updatetqStatus() { - if ( !PicSpecific::updateStatus() ) return false; + if ( !PicSpecific::updatetqStatus() ) return false; if ( !Debugger::manager->readRegister(base().registerTypeData("BSR")) ) return false; return true; } @@ -104,15 +104,15 @@ Register::TypeData Debugger::P18FSpecific::wregTypeData() const return base().registerTypeData("WREG"); } -QString Debugger::P18FSpecific::statusString() const +TQString Debugger::P18FSpecific::statusString() const { const Pic::RegistersData &rdata = device().registersData(); BitValue status = Register::list().value(base().registerTypeData("STATUS")); BitValue bsr = Register::list().value(base().registerTypeData("BSR")); BitValue wreg = Register::list().value(wregTypeData()); - return QString("W:%1 %2 %3 %4 %5 %6 PC:%7 Bank:%8") - .arg(toHexLabel(wreg, rdata.nbChars())).arg(status.bit(4) ? "N" : "n") - .arg(status.bit(3) ? "OV" : "ov").arg(status.bit(2) ? "Z" : "z") - .arg(status.bit(1) ? "DC" : "dc").arg(status.bit(0) ? "C" : "c") - .arg(toHexLabel(base().pc(), device().nbCharsAddress())).arg(toLabel(bsr)); + return TQString("W:%1 %2 %3 %4 %5 %6 PC:%7 Bank:%8") + .tqarg(toHexLabel(wreg, rdata.nbChars())).tqarg(status.bit(4) ? "N" : "n") + .tqarg(status.bit(3) ? "OV" : "ov").tqarg(status.bit(2) ? "Z" : "z") + .tqarg(status.bit(1) ? "DC" : "dc").tqarg(status.bit(0) ? "C" : "c") + .tqarg(toHexLabel(base().pc(), device().nbCharsAddress())).tqarg(toLabel(bsr)); } diff --git a/src/devices/pic/prog/pic_debug.h b/src/devices/pic/prog/pic_debug.h index dfb8af6..ce08387 100644 --- a/src/devices/pic/prog/pic_debug.h +++ b/src/devices/pic/prog/pic_debug.h @@ -25,7 +25,7 @@ public: const Pic::Data &device() const { return static_cast<const Pic::Data &>(*_base.device()); } PicBase &base(); const PicBase &base() const; - virtual bool updateStatus(); + virtual bool updatetqStatus(); virtual Register::TypeData wregTypeData() const = 0; }; @@ -34,7 +34,7 @@ class P16FSpecific : public PicSpecific { public: P16FSpecific(Debugger::Base &base) : PicSpecific(base) {} - virtual QString statusString() const; + virtual TQString statusString() const; virtual Register::TypeData wregTypeData() const; }; @@ -43,8 +43,8 @@ class P18FSpecific : public PicSpecific { public: P18FSpecific(Debugger::Base &base) : PicSpecific(base) {} - virtual QString statusString() const; - virtual bool updateStatus(); + virtual TQString statusString() const; + virtual bool updatetqStatus(); virtual Register::TypeData wregTypeData() const; }; @@ -56,8 +56,8 @@ public: PicSpecific *deviceSpecific() { return static_cast<PicSpecific *>(_deviceSpecific); } const PicSpecific *deviceSpecific() const { return static_cast<const PicSpecific *>(_deviceSpecific); } const Pic::Data *device() const { return static_cast<const Pic::Data *>(Debugger::Base::device()); } - Register::TypeData registerTypeData(const QString &name) const; - virtual bool updatePortStatus(uint index, QMap<uint, Device::PortBitData> &bits); + Register::TypeData registerTypeData(const TQString &name) const; + virtual bool updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits); }; } // namespace diff --git a/src/devices/pic/prog/pic_prog.cpp b/src/devices/pic/prog/pic_prog.cpp index bc7dcd1..e882529 100644 --- a/src/devices/pic/prog/pic_prog.cpp +++ b/src/devices/pic/prog/pic_prog.cpp @@ -79,7 +79,7 @@ uint Programmer::PicBase::nbSteps(Task task, const Device::MemoryRange *range) c if ( !prange->all() && prange->_type!=type ) continue; nb += device()->nbWords(type); } - return QMAX(nb, uint(1)); + return TQMAX(nb, uint(1)); } case Task::Write: { uint nb = 0; @@ -90,7 +90,7 @@ uint Programmer::PicBase::nbSteps(Task task, const Device::MemoryRange *range) c nb += device()->nbWords(type); if ( readConfigEntry(Config::VerifyAfterProgram).toBool() ) nb += device()->nbWords(type); } - return QMAX(nb, uint(1)); + return TQMAX(nb, uint(1)); } case Task::Nb_Types: break; } @@ -106,9 +106,9 @@ bool Programmer::PicBase::readVoltages() if ( !group().canReadVoltage(Pic::VoltageType(i)) ) continue; if ( _voltages[i].error==true ) { ok = false; - log(Log::LineType::Error, i18n(" %1 = %2 V: error in voltage level.").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_voltages[i].value)); + log(Log::LineType::Error, i18n(" %1 = %2 V: error in voltage level.").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value)); } else if ( _voltages[i].value!=UNKNOWN_VOLTAGE ) - log(Log::DebugLevel::Normal, QString(" %1 = %2 V").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_voltages[i].value)); + log(Log::DebugLevel::Normal, TQString(" %1 = %2 V").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value)); } return ok; } @@ -136,10 +136,10 @@ bool Programmer::PicBase::initProgramming(Task) const Pic::VoltageData &tvpp = device()->voltage(Pic::Vpp); if ( vpp()<tvpp.min ) log(Log::LineType::Warning, i18n("Vpp (%1 V) is lower than the minimum required voltage (%2 V).") - .arg(vpp()).arg(tvpp.min)); + .tqarg(vpp()).tqarg(tvpp.min)); if ( vpp()>tvpp.max ) { - QString s = i18n("Vpp (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.") - .arg(vpp()).arg(tvpp.max); + TQString s = i18n("Vpp (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.") + .tqarg(vpp()).tqarg(tvpp.max); log(Log::LineType::Warning, s); if ( !askContinue(s) ) { logUserAbort(); @@ -153,15 +153,15 @@ bool Programmer::PicBase::initProgramming(Task) if ( vdd()<tvdd.min ) { if ( type==Pic::VddBulkErase && device()->voltage(Pic::VddWrite).min!=tvdd.min ) log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for high-voltage programming\n(piklab only supports high-voltage programming at the moment).\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); else if ( type==Pic::VddRead && device()->voltage(Pic::VddWrite).min!=tvdd.min ) log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for reading\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); else log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for programming\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); } else if ( vdd()>tvdd.max ) { - QString s = i18n("Vdd (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.") - .arg(vdd()).arg(tvdd.max); + TQString s = i18n("Vdd (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.") + .tqarg(vdd()).tqarg(tvdd.max); log(Log::LineType::Warning, s); if ( !askContinue(s) ) { logUserAbort(); @@ -177,8 +177,8 @@ bool Programmer::PicBase::initProgramming(Task) _deviceMemory->setArray(Pic::MemoryRangeType::Config, data); _hasProtectedCode = _deviceMemory->isProtected(Pic::Protection::ProgramProtected, Pic::MemoryRangeType::Code); _hasProtectedEeprom = _deviceMemory->isProtected(Pic::Protection::ProgramProtected, Pic::MemoryRangeType::Eeprom); - log(Log::DebugLevel::Normal, QString(" protected: code=%1 data=%2") - .arg(_hasProtectedCode ? "true" : "false").arg(_hasProtectedEeprom ? "true" : "false")); + log(Log::DebugLevel::Normal, TQString(" protected: code=%1 data=%2") + .tqarg(_hasProtectedCode ? "true" : "false").tqarg(_hasProtectedEeprom ? "true" : "false")); // read calibration if ( !readCalibration() ) return false; } @@ -250,45 +250,45 @@ bool Programmer::PicBase::verifyDeviceId() { if ( !specific()->canReadRange(Pic::MemoryRangeType::DeviceId ) ) return true; if ( !device()->isReadable(Pic::MemoryRangeType::DeviceId) ) { - log(Log::LineType::Information, i18n("Device not autodetectable: continuing with the specified device name \"%1\"...").arg(device()->name())); + log(Log::LineType::Information, i18n("Device not autodetectable: continuing with the specified device name \"%1\"...").tqarg(device()->name())); return true; } BitValue rawId = readDeviceId(); if ( hasError() ) return false; uint nbChars = device()->nbWords(Pic::MemoryRangeType::DeviceId) * device()->nbCharsWord(Pic::MemoryRangeType::DeviceId); - if ( rawId==0x0 || rawId==device()->mask(Pic::MemoryRangeType::DeviceId) ) { - log(Log::LineType::Error, i18n("Missing or incorrect device (Read id is %1).").arg(toHexLabel(rawId, nbChars))); + if ( rawId==0x0 || rawId==device()->tqmask(Pic::MemoryRangeType::DeviceId) ) { + log(Log::LineType::Error, i18n("Missing or incorrect device (Read id is %1).").tqarg(toHexLabel(rawId, nbChars))); return false; } - QMap<QString, Device::IdData> ids; - QValueVector<QString> names = group().supportedDevices(); + TQMap<TQString, Device::IdData> ids; + TQValueVector<TQString> names = group().supportedDevices(); for (uint k=0; k<uint(names.count()); k++) { const Pic::Data *data = static_cast<const Pic::Data *>(group().deviceData(names[k]).data); if ( data->architecture()!=device()->architecture() ) continue; Device::IdData idata; if ( data->matchId(rawId, idata) ) ids[names[k]] = idata; } - QString message; + TQString message; if ( ids.count()!=0 ) { - log(Log::LineType::Information, i18n("Read id: %1").arg(device()->idNames(ids).join("; "))); - if ( ids.contains(device()->name()) ) return true; - message = i18n("Read id does not match the specified device name \"%1\".").arg(device()->name()); + log(Log::LineType::Information, i18n("Read id: %1").tqarg(device()->idNames(ids).join("; "))); + if ( ids.tqcontains(device()->name()) ) return true; + message = i18n("Read id does not match the specified device name \"%1\".").tqarg(device()->name()); } else { - log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").arg(toHexLabel(rawId, nbChars))); + log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").tqarg(toHexLabel(rawId, nbChars))); message = i18n("Unknown device."); } if ( !askContinue(message) ) { logUserAbort(); return false; } - log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").arg(device()->name())); + log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").tqarg(device()->name())); return true; } //----------------------------------------------------------------------------- -QString Programmer::PicBase::prettyCalibration(const Device::Array &data) const +TQString Programmer::PicBase::prettyCalibration(const Device::Array &data) const { - QString s; + TQString s; for (uint i=0; i<data.count(); i++) { if ( i!=0 ) s += ", "; s += toHexLabel(data[i], device()->nbCharsWord(Pic::MemoryRangeType::Cal)); @@ -306,8 +306,8 @@ bool Programmer::PicBase::readCalibration() Device::Array data; if ( !specific()->read(Pic::MemoryRangeType::Cal, data, 0) ) return false; _deviceMemory->setArray(Pic::MemoryRangeType::Cal, data); - log(Log::DebugLevel::Normal, QString(" Read osccal: %1").arg(prettyCalibration(data))); - QString message; + log(Log::DebugLevel::Normal, TQString(" Read osccal: %1").tqarg(prettyCalibration(data))); + TQString message; if ( !device()->checkCalibration(data, &message) ) log(Log::LineType::Warning, " " + message); if ( device()->isReadable(Pic::MemoryRangeType::CalBackup) ) { if ( !specific()->canReadRange(Pic::MemoryRangeType::CalBackup) ) { @@ -316,7 +316,7 @@ bool Programmer::PicBase::readCalibration() } if ( !specific()->read(Pic::MemoryRangeType::CalBackup, data, 0) ) return false; _deviceMemory->setArray(Pic::MemoryRangeType::CalBackup, data); - log(Log::DebugLevel::Normal, QString(" Read osccal backup: %1").arg(prettyCalibration(data))); + log(Log::DebugLevel::Normal, TQString(" Read osccal backup: %1").tqarg(prettyCalibration(data))); if ( !device()->checkCalibration(data, &message) ) log(Log::LineType::Warning, " " + message); } } @@ -366,22 +366,22 @@ bool Programmer::PicBase::restoreBandGapBits() if ( !specific()->canReadRange(Pic::MemoryRangeType::Config) ) return true; bool hasProtectedBits = false; for (uint i=0; i<device()->nbWords(Pic::MemoryRangeType::Config); i++) - if ( device()->config()._words[i].pmask!=0 ) hasProtectedBits = true; + if ( device()->config()._words[i].ptqmask!=0 ) hasProtectedBits = true; if ( !hasProtectedBits ) return true; Device::Array cdata; if ( !specific()->read(Pic::MemoryRangeType::Config, cdata, 0) ) return false; Device::Array data = _deviceMemory->arrayForWriting(Pic::MemoryRangeType::Config); for (uint i=0; i<cdata.count(); i++) { - BitValue pmask = device()->config()._words[i].pmask; - if ( pmask==0 ) continue; - cdata[i] = cdata[i].clearMaskBits(pmask); - cdata[i] |= data[i].maskWith(pmask); + BitValue ptqmask = device()->config()._words[i].ptqmask; + if ( ptqmask==0 ) continue; + cdata[i] = cdata[i].clearMaskBits(ptqmask); + cdata[i] |= data[i].tqmaskWith(ptqmask); } if ( !specific()->canWriteRange(Pic::MemoryRangeType::Config) ) { log(Log::LineType::Warning, i18n("Could not restore band gap bits because programmer does not support writing config bits.")); return true; } - log(Log::DebugLevel::Normal, QString(" Write config with band gap bits: %2").arg(toHexLabel(cdata[0], device()->nbCharsWord(Pic::MemoryRangeType::Config)))); + log(Log::DebugLevel::Normal, TQString(" Write config with band gap bits: %2").tqarg(toHexLabel(cdata[0], device()->nbCharsWord(Pic::MemoryRangeType::Config)))); if ( !programRange(Pic::MemoryRangeType::Config, cdata) ) return false; if ( !specific()->read(Pic::MemoryRangeType::Config, data, 0) ) return false; if ( data==cdata ) log(Log::LineType::Information, i18n(" Band gap bits have been preserved.")); @@ -464,7 +464,7 @@ bool Programmer::PicBase::internalEraseRange(Pic::MemoryRangeType type) log(Log::LineType::SoftError, i18n("Cannot erase specified range because of programmer limitations.")); return false; } - if ( !askContinue(i18n("%1: Erasing this range only is not supported with this programmer. This will erase the whole chip and restore the other memory ranges.").arg(type.label())) ) { + if ( !askContinue(i18n("%1: Erasing this range only is not supported with this programmer. This will erase the whole chip and restore the other memory ranges.").tqarg(type.label())) ) { logUserAbort(); return false; } @@ -497,19 +497,19 @@ bool Programmer::PicBase::readRange(Pic::MemoryRangeType type, Pic::Memory *memo { if ( !device()->isReadable(type) ) return true; if ( !specific()->canReadRange(type) ) { - log(Log::LineType::Information, i18n("The selected programmer cannot read %1: operation skipped.").arg(type.label())); + log(Log::LineType::Information, i18n("The selected programmer cannot read %1: operation skipped.").tqarg(type.label())); return true; } VerifyData *vdata = (vd ? new VerifyData(vd->actions, vd->memory) : 0); if (vdata) { - log(Log::LineType::Information, i18n(" Verify memory: %1").arg(type.label())); + log(Log::LineType::Information, i18n(" Verify memory: %1").tqarg(type.label())); if ( !(vdata->actions & IgnoreProtectedVerify) ) { vdata->protectedRanges = static_cast<const Pic::Memory &>(vdata->memory).protectedRanges(Pic::Protection::ProgramProtected, type); if ( !vdata->protectedRanges.isEmpty() ) log(Log::LineType::Warning, i18n(" Part of device memory is protected (in %1) and cannot be verified.") - .arg(type.label())); + .tqarg(type.label())); } else vdata->protectedRanges.clear(); } else { - log(Log::LineType::Information, i18n(" Read memory: %1").arg(type.label())); + log(Log::LineType::Information, i18n(" Read memory: %1").tqarg(type.label())); CRASH_ASSERT(memory); } Device::Array data; @@ -562,7 +562,7 @@ bool Programmer::PicBase::programSingle(Pic::MemoryRangeType type, const Pic::Me bool Programmer::PicBase::programRange(Pic::MemoryRangeType mtype, const Device::Array &data) { - log(Log::LineType::Information, i18n(" Write memory: %1").arg(mtype.label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(mtype.label())); bool only = ( readConfigEntry(Config::OnlyProgramNonMask).toBool() && (mtype==Pic::MemoryRangeType::Code || mtype==Pic::MemoryRangeType::Eeprom) ); return specific()->write(mtype, data, !only); @@ -670,17 +670,17 @@ bool Programmer::PicBase::internalProgram(const Device::Memory &memory, const De //----------------------------------------------------------------------------- bool Programmer::PicBase::checkProgramCalibration(const Device::Array &data) { - QString message, s = prettyCalibration(data); + TQString message, s = prettyCalibration(data); if ( !device()->checkCalibration(data, &message) ) { - sorry(i18n("The calibration word %1 is not valid.").arg(s), message); + sorry(i18n("The calibration word %1 is not valid.").tqarg(s), message); return false; } - return askContinue(i18n("Do you want to overwrite the device calibration with %1?").arg(s)); + return askContinue(i18n("Do you want to overwrite the device calibration with %1?").tqarg(s)); } bool Programmer::PicBase::tryProgramCalibration(const Device::Array &data, bool &success) { - log(Log::LineType::Information, i18n(" Write memory: %1").arg(Pic::MemoryRangeType(Pic::MemoryRangeType::Cal).label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::Cal).label())); success = true; if ( !specific()->write(Pic::MemoryRangeType::Cal, data, true) ) return false; Device::Array read; @@ -691,7 +691,7 @@ bool Programmer::PicBase::tryProgramCalibration(const Device::Array &data, bool if ( device()->isWritable(Pic::MemoryRangeType::CalBackup) ) { if ( !specific()->read(Pic::MemoryRangeType::CalBackup, read, 0) ) return false; if ( device()->checkCalibration(read) ) return true; // do not overwrite correct backup value - log(Log::LineType::Information, i18n(" Write memory: %1").arg(Pic::MemoryRangeType(Pic::MemoryRangeType::CalBackup).label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::CalBackup).label())); if ( !specific()->write(Pic::MemoryRangeType::CalBackup, data, true) ) return false; if ( !specific()->read(Pic::MemoryRangeType::CalBackup, read, 0) ) return false; for (uint i=0; i<data.count(); i++) diff --git a/src/devices/pic/prog/pic_prog.h b/src/devices/pic/prog/pic_prog.h index 0fb37f7..a76913a 100644 --- a/src/devices/pic/prog/pic_prog.h +++ b/src/devices/pic/prog/pic_prog.h @@ -98,7 +98,7 @@ private: bool doProgramCalibration(const Device::Array &data); bool checkProgramCalibration(const Device::Array &data); bool internalProgramCalibration(const Device::Array &data); - QString prettyCalibration(const Device::Array &data) const; + TQString prettyCalibration(const Device::Array &data) const; bool tryProgramCalibration(const Device::Array &data, bool &success); bool preserveCode(); bool preserveEeprom(); diff --git a/src/devices/pic/prog/pic_prog_specific.cpp b/src/devices/pic/prog/pic_prog_specific.cpp index bfcd2fa..bca71b4 100644 --- a/src/devices/pic/prog/pic_prog_specific.cpp +++ b/src/devices/pic/prog/pic_prog_specific.cpp @@ -28,11 +28,11 @@ uint Programmer::PicDeviceSpecific::findNonMaskStart(Pic::MemoryRangeType type, { uint start = 0; for (; start<data.count(); start++) - if ( data[start]!=device().mask(type) ) break; - const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, QString("start before align: %1").arg(start)); + if ( data[start]!=device().tqmask(type) ) break; + const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("start before align: %1").tqarg(start)); uint align = device().nbWordsWriteAlignment(type); start -= start % align; - const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, QString("start after align: %1 (align=%2)").arg(start).arg(align)); + const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("start after align: %1 (align=%2)").tqarg(start).tqarg(align)); return start; } @@ -40,11 +40,11 @@ uint Programmer::PicDeviceSpecific::findNonMaskEnd(Pic::MemoryRangeType type, co { uint end = data.count()-1; for (; end>0; end--) - if ( data[end]!=device().mask(type) ) break; - const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, QString("end before align: %1").arg(end)); + if ( data[end]!=device().tqmask(type) ) break; + const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("end before align: %1").tqarg(end)); uint align = device().nbWordsWriteAlignment(type); if ( (end+1) % align ) end += align - (end+1) % align; - const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, QString("end after align: %1 (align=%2)").arg(end).arg(align)); + const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("end after align: %1 (align=%2)").tqarg(end).tqarg(align)); Q_ASSERT(end<data.count()); return end; } @@ -99,23 +99,23 @@ bool Programmer::PicHardware::compareWords(Pic::MemoryRangeType type, uint index Address address = device().range(type).start + inc * index; if ( actions & ::Programmer::BlankCheckVerify ) log(Log::LineType::SoftError, i18n("Device memory is not blank (in %1 at address %2: reading %3 and expecting %4).") - .arg(type.label()).arg(toHexLabel(address, device().nbCharsAddress())) - .arg(toHexLabel(d, device().nbCharsWord(type))).arg(toHexLabel(v, device().nbCharsWord(type)))); + .tqarg(type.label()).tqarg(toHexLabel(address, device().nbCharsAddress())) + .tqarg(toHexLabel(d, device().nbCharsWord(type))).tqarg(toHexLabel(v, device().nbCharsWord(type)))); else log(Log::LineType::SoftError, i18n("Device memory does not match hex file (in %1 at address %2: reading %3 and expecting %4).") - .arg(type.label()).arg(toHexLabel(address, device().nbCharsAddress())) - .arg(toHexLabel(d, device().nbCharsWord(type))).arg(toHexLabel(v, device().nbCharsWord(type)))); + .tqarg(type.label()).tqarg(toHexLabel(address, device().nbCharsAddress())) + .tqarg(toHexLabel(d, device().nbCharsWord(type))).tqarg(toHexLabel(v, device().nbCharsWord(type)))); return false; } bool Programmer::PicHardware::verifyWord(uint i, BitValue word, Pic::MemoryRangeType type, const VerifyData &vdata) { - if ( !(vdata.actions & ::Programmer::IgnoreProtectedVerify) && vdata.protectedRanges.contains(i) ) return true; // protected + if ( !(vdata.actions & ::Programmer::IgnoreProtectedVerify) && vdata.protectedRanges.tqcontains(i) ) return true; // protected BitValue v = static_cast<const Pic::Memory &>(vdata.memory).normalizedWord(type, i); BitValue d = static_cast<const Pic::Memory &>(vdata.memory).normalizeWord(type, i, word); if ( type==Pic::MemoryRangeType::Config ) { - BitValue pmask = device().config()._words[i].pmask; - v = v.clearMaskBits(pmask); - d = d.clearMaskBits(pmask); + BitValue ptqmask = device().config()._words[i].ptqmask; + v = v.clearMaskBits(ptqmask); + d = d.clearMaskBits(ptqmask); } return compareWords(type, i, v, d, vdata.actions); } diff --git a/src/devices/pic/prog/pic_prog_specific.h b/src/devices/pic/prog/pic_prog_specific.h index fef8a61..249aba6 100644 --- a/src/devices/pic/prog/pic_prog_specific.h +++ b/src/devices/pic/prog/pic_prog_specific.h @@ -66,13 +66,13 @@ public: double value; bool error; }; - class VoltagesData : public QValueVector<VoltageData> { + class VoltagesData : public TQValueVector<VoltageData> { public: - VoltagesData() : QValueVector<VoltageData>(Pic::Nb_VoltageTypes) {} + VoltagesData() : TQValueVector<VoltageData>(Pic::Nb_VoltageTypes) {} }; public: - PicHardware(::Programmer::Base &base, Port::Base *port, const QString &name) : Hardware(base, port, name) {} + PicHardware(::Programmer::Base &base, Port::Base *port, const TQString &name) : Hardware(base, port, name) {} const Pic::Data &device() const { return static_cast<const Pic::Data &>(*_base.device()); } virtual bool readVoltages(VoltagesData &) { return true; } virtual bool getTargetMode(Pic::TargetMode &mode) { mode = Pic::TargetInProgramming; return true; } |