summaryrefslogtreecommitdiffstats
path: root/src/devices/pic/prog
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:40:25 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:40:25 -0600
commit4374b9aebc67cce74e5c1099d5f4ad1749b05fc6 (patch)
tree8f99491ad0bd6e9632a912f07acdccebd2af9127 /src/devices/pic/prog
parent9d9fe02a944fe0719c2475739411727a729251ad (diff)
downloadpiklab-4374b9aebc67cce74e5c1099d5f4ad1749b05fc6.tar.gz
piklab-4374b9aebc67cce74e5c1099d5f4ad1749b05fc6.zip
Remove additional unneeded tq method conversions
Diffstat (limited to 'src/devices/pic/prog')
-rw-r--r--src/devices/pic/prog/pic_debug.cpp14
-rw-r--r--src/devices/pic/prog/pic_prog.cpp56
-rw-r--r--src/devices/pic/prog/pic_prog_specific.cpp16
3 files changed, 43 insertions, 43 deletions
diff --git a/src/devices/pic/prog/pic_debug.cpp b/src/devices/pic/prog/pic_debug.cpp
index 7dda5c2..eef84cc 100644
--- a/src/devices/pic/prog/pic_debug.cpp
+++ b/src/devices/pic/prog/pic_debug.cpp
@@ -86,9 +86,9 @@ TQString Debugger::P16FSpecific::statusString() const
uint bank = (status.bit(5) ? 1 : 0) + (status.bit(6) ? 2 : 0);
BitValue wreg = Register::list().value(wregTypeData());
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);
+ .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);
}
//----------------------------------------------------------------------------
@@ -111,8 +111,8 @@ TQString Debugger::P18FSpecific::statusString() const
BitValue bsr = Register::list().value(base().registerTypeData("BSR"));
BitValue wreg = Register::list().value(wregTypeData());
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));
+ .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));
}
diff --git a/src/devices/pic/prog/pic_prog.cpp b/src/devices/pic/prog/pic_prog.cpp
index f0c917d..b134303 100644
--- a/src/devices/pic/prog/pic_prog.cpp
+++ b/src/devices/pic/prog/pic_prog.cpp
@@ -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.").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value));
+ log(Log::LineType::Error, i18n(" %1 = %2 V: error in voltage level.").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_voltages[i].value));
} else if ( _voltages[i].value!=UNKNOWN_VOLTAGE )
- log(Log::DebugLevel::Normal, TQString(" %1 = %2 V").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value));
+ log(Log::DebugLevel::Normal, TQString(" %1 = %2 V").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_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).")
- .tqarg(vpp()).tqarg(tvpp.min));
+ .arg(vpp()).arg(tvpp.min));
if ( vpp()>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);
+ .arg(vpp()).arg(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.")
- .tqarg(vdd()).tqarg(tvdd.min));
+ .arg(vdd()).arg(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.")
- .tqarg(vdd()).tqarg(tvdd.min));
+ .arg(vdd()).arg(tvdd.min));
else log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for programming\nMinimum required is %2 V.")
- .tqarg(vdd()).tqarg(tvdd.min));
+ .arg(vdd()).arg(tvdd.min));
} else if ( vdd()>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);
+ .arg(vdd()).arg(tvdd.max);
log(Log::LineType::Warning, s);
if ( !askContinue(s) ) {
logUserAbort();
@@ -178,7 +178,7 @@ bool Programmer::PicBase::initProgramming(Task)
_hasProtectedCode = _deviceMemory->isProtected(Pic::Protection::ProgramProtected, Pic::MemoryRangeType::Code);
_hasProtectedEeprom = _deviceMemory->isProtected(Pic::Protection::ProgramProtected, Pic::MemoryRangeType::Eeprom);
log(Log::DebugLevel::Normal, TQString(" protected: code=%1 data=%2")
- .tqarg(_hasProtectedCode ? "true" : "false").tqarg(_hasProtectedEeprom ? "true" : "false"));
+ .arg(_hasProtectedCode ? "true" : "false").arg(_hasProtectedEeprom ? "true" : "false"));
// read calibration
if ( !readCalibration() ) return false;
}
@@ -250,14 +250,14 @@ 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\"...").tqarg(device()->name()));
+ log(Log::LineType::Information, i18n("Device not autodetectable: continuing with the specified device name \"%1\"...").arg(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).").tqarg(toHexLabel(rawId, nbChars)));
+ log(Log::LineType::Error, i18n("Missing or incorrect device (Read id is %1).").arg(toHexLabel(rawId, nbChars)));
return false;
}
TQMap<TQString, Device::IdData> ids;
@@ -270,18 +270,18 @@ bool Programmer::PicBase::verifyDeviceId()
}
TQString message;
if ( ids.count()!=0 ) {
- log(Log::LineType::Information, i18n("Read id: %1").tqarg(device()->idNames(ids).join("; ")));
+ 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\".").tqarg(device()->name());
+ message = i18n("Read id does not match the specified device name \"%1\".").arg(device()->name());
} else {
- log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").tqarg(toHexLabel(rawId, nbChars)));
+ log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").arg(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\"...").tqarg(device()->name()));
+ log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").arg(device()->name()));
return true;
}
@@ -306,7 +306,7 @@ 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, TQString(" Read osccal: %1").tqarg(prettyCalibration(data)));
+ log(Log::DebugLevel::Normal, TQString(" Read osccal: %1").arg(prettyCalibration(data)));
TQString message;
if ( !device()->checkCalibration(data, &message) ) log(Log::LineType::Warning, " " + message);
if ( device()->isReadable(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, TQString(" Read osccal backup: %1").tqarg(prettyCalibration(data)));
+ log(Log::DebugLevel::Normal, TQString(" Read osccal backup: %1").arg(prettyCalibration(data)));
if ( !device()->checkCalibration(data, &message) ) log(Log::LineType::Warning, " " + message);
}
}
@@ -381,7 +381,7 @@ bool Programmer::PicBase::restoreBandGapBits()
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, TQString(" Write config with band gap bits: %2").tqarg(toHexLabel(cdata[0], device()->nbCharsWord(Pic::MemoryRangeType::Config))));
+ log(Log::DebugLevel::Normal, TQString(" Write config with band gap bits: %2").arg(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.").tqarg(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.").arg(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.").tqarg(type.label()));
+ log(Log::LineType::Information, i18n("The selected programmer cannot read %1: operation skipped.").arg(type.label()));
return true;
}
VerifyData *vdata = (vd ? new VerifyData(vd->actions, vd->memory) : 0);
if (vdata) {
- log(Log::LineType::Information, i18n(" Verify memory: %1").tqarg(type.label()));
+ log(Log::LineType::Information, i18n(" Verify memory: %1").arg(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.")
- .tqarg(type.label()));
+ .arg(type.label()));
} else vdata->protectedRanges.clear();
} else {
- log(Log::LineType::Information, i18n(" Read memory: %1").tqarg(type.label()));
+ log(Log::LineType::Information, i18n(" Read memory: %1").arg(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").tqarg(mtype.label()));
+ log(Log::LineType::Information, i18n(" Write memory: %1").arg(mtype.label()));
bool only = ( readConfigEntry(Config::OnlyProgramNonMask).toBool()
&& (mtype==Pic::MemoryRangeType::Code || mtype==Pic::MemoryRangeType::Eeprom) );
return specific()->write(mtype, data, !only);
@@ -672,15 +672,15 @@ bool Programmer::PicBase::checkProgramCalibration(const Device::Array &data)
{
TQString message, s = prettyCalibration(data);
if ( !device()->checkCalibration(data, &message) ) {
- sorry(i18n("The calibration word %1 is not valid.").tqarg(s), message);
+ sorry(i18n("The calibration word %1 is not valid.").arg(s), message);
return false;
}
- return askContinue(i18n("Do you want to overwrite the device calibration with %1?").tqarg(s));
+ return askContinue(i18n("Do you want to overwrite the device calibration with %1?").arg(s));
}
bool Programmer::PicBase::tryProgramCalibration(const Device::Array &data, bool &success)
{
- log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::Cal).label()));
+ log(Log::LineType::Information, i18n(" Write memory: %1").arg(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").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::CalBackup).label()));
+ log(Log::LineType::Information, i18n(" Write memory: %1").arg(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_specific.cpp b/src/devices/pic/prog/pic_prog_specific.cpp
index c8d958b..b37febb 100644
--- a/src/devices/pic/prog/pic_prog_specific.cpp
+++ b/src/devices/pic/prog/pic_prog_specific.cpp
@@ -29,10 +29,10 @@ 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, TQString("start before align: %1").tqarg(start));
+ const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("start before align: %1").arg(start));
uint align = device().nbWordsWriteAlignment(type);
start -= start % align;
- const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("start after align: %1 (align=%2)").tqarg(start).tqarg(align));
+ const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("start after align: %1 (align=%2)").arg(start).arg(align));
return start;
}
@@ -41,10 +41,10 @@ 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, TQString("end before align: %1").tqarg(end));
+ const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("end before align: %1").arg(end));
uint align = device().nbWordsWriteAlignment(type);
if ( (end+1) % align ) end += align - (end+1) % align;
- const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("end after align: %1 (align=%2)").tqarg(end).tqarg(align));
+ const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("end after align: %1 (align=%2)").arg(end).arg(align));
Q_ASSERT(end<data.count());
return end;
}
@@ -99,11 +99,11 @@ 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).")
- .tqarg(type.label()).tqarg(toHexLabel(address, device().nbCharsAddress()))
- .tqarg(toHexLabel(d, device().nbCharsWord(type))).tqarg(toHexLabel(v, device().nbCharsWord(type))));
+ .arg(type.label()).arg(toHexLabel(address, device().nbCharsAddress()))
+ .arg(toHexLabel(d, device().nbCharsWord(type))).arg(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).")
- .tqarg(type.label()).tqarg(toHexLabel(address, device().nbCharsAddress()))
- .tqarg(toHexLabel(d, device().nbCharsWord(type))).tqarg(toHexLabel(v, device().nbCharsWord(type))));
+ .arg(type.label()).arg(toHexLabel(address, device().nbCharsAddress()))
+ .arg(toHexLabel(d, device().nbCharsWord(type))).arg(toHexLabel(v, device().nbCharsWord(type))));
return false;
}