summaryrefslogtreecommitdiffstats
path: root/src/devices/pic/prog
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:57:30 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:57:30 -0600
commitad1fc5fc8eadb9b63e8767e57ac41cbac84f7eb7 (patch)
treec47273eb6595f763c282d33fb89affe1f8866120 /src/devices/pic/prog
parent9d6927a7d6a543332f828bffedf65eecf6774c6d (diff)
downloadpiklab-ad1fc5fc8eadb9b63e8767e57ac41cbac84f7eb7.tar.gz
piklab-ad1fc5fc8eadb9b63e8767e57ac41cbac84f7eb7.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 9d6927a7d6a543332f828bffedf65eecf6774c6d.
Diffstat (limited to 'src/devices/pic/prog')
-rw-r--r--src/devices/pic/prog/pic_debug.cpp22
-rw-r--r--src/devices/pic/prog/pic_debug.h6
-rw-r--r--src/devices/pic/prog/pic_prog.cpp56
-rw-r--r--src/devices/pic/prog/pic_prog_specific.cpp16
4 files changed, 50 insertions, 50 deletions
diff --git a/src/devices/pic/prog/pic_debug.cpp b/src/devices/pic/prog/pic_debug.cpp
index eef84cc..9434a74 100644
--- a/src/devices/pic/prog/pic_debug.cpp
+++ b/src/devices/pic/prog/pic_debug.cpp
@@ -20,7 +20,7 @@ Register::TypeData Debugger::PicBase::registerTypeData(const TQString &name) con
return Register::TypeData(rdata.sfrs[name].address, rdata.nbChars());
}
-bool Debugger::PicBase::updatePortStatus(uint index, TQMap<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;
@@ -86,15 +86,15 @@ 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")
- .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);
+ .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;
}
@@ -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")
- .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));
+ .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 d73aeee..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;
};
@@ -44,7 +44,7 @@ class P18FSpecific : public PicSpecific
public:
P18FSpecific(Debugger::Base &base) : PicSpecific(base) {}
virtual TQString statusString() const;
- virtual bool updateStatus();
+ virtual bool updatetqStatus();
virtual Register::TypeData wregTypeData() const;
};
@@ -57,7 +57,7 @@ public:
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 TQString &name) const;
- virtual bool updatePortStatus(uint index, TQMap<uint, Device::PortBitData> &bits);
+ 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 b134303..f0c917d 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.").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, TQString(" %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 ) {
TQString s = i18n("Vpp (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.")
- .arg(vpp()).arg(tvpp.max);
+ .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 ) {
TQString s = i18n("Vdd (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.")
- .arg(vdd()).arg(tvdd.max);
+ .tqarg(vdd()).tqarg(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")
- .arg(_hasProtectedCode ? "true" : "false").arg(_hasProtectedEeprom ? "true" : "false"));
+ .tqarg(_hasProtectedCode ? "true" : "false").tqarg(_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\"...").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)));
+ log(Log::LineType::Error, i18n("Missing or incorrect device (Read id is %1).").tqarg(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").arg(device()->idNames(ids).join("; ")));
+ log(Log::LineType::Information, i18n("Read id: %1").tqarg(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());
+ 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;
}
@@ -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").arg(prettyCalibration(data)));
+ 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) ) {
@@ -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").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);
}
}
@@ -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").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);
@@ -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.").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_specific.cpp b/src/devices/pic/prog/pic_prog_specific.cpp
index b37febb..c8d958b 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").arg(start));
+ 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, TQString("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;
}
@@ -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").arg(end));
+ 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, TQString("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,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).")
- .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;
}