summaryrefslogtreecommitdiffstats
path: root/src/progs/direct/base/direct_18F.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
commit0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch)
treeb95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/progs/direct/base/direct_18F.cpp
parentb79a2c28534cf09987eeeba3077fff9236df182a (diff)
downloadpiklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz
piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip
TQt4 port piklab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/progs/direct/base/direct_18F.cpp')
-rw-r--r--src/progs/direct/base/direct_18F.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/progs/direct/base/direct_18F.cpp b/src/progs/direct/base/direct_18F.cpp
index 9860e63..75112c2 100644
--- a/src/progs/direct/base/direct_18F.cpp
+++ b/src/progs/direct/base/direct_18F.cpp
@@ -17,21 +17,21 @@ bool Direct::P18F::skipMaskWords(Pic::MemoryRangeType type, const Device::Array
{
if (forceProgram) return false;
for (uint k=0; k<nb; k++)
- if ( data[i+k]!=device().mask(type) ) return false;
+ if ( data[i+k]!=device().tqmask(type) ) return false;
i += nb;
return true;
}
void Direct::P18F::program(Type type)
{
- QString cmd;
+ TQString cmd;
switch (type) {
case Code:
- cmd = QString("d,C,c,C,c,C,c,Cw%1cw%2X0000,").arg(programHighTime(Code)).arg(programLowTime());
+ cmd = TQString("d,C,c,C,c,C,c,Cw%1cw%2X0000,").tqarg(programHighTime(Code)).tqarg(programLowTime());
break;
case Erase:
pulseEngine("k0,X0000,"); // NOP
- cmd = QString("k0;w%1;w%2;X0000").arg(programHighTime(type)).arg(programLowTime());
+ cmd = TQString("k0;w%1;w%2;X0000").tqarg(programHighTime(type)).tqarg(programLowTime());
break;
case Eeprom:
for (;;) {
@@ -41,7 +41,7 @@ void Direct::P18F::program(Type type)
BitValue b = get_byte();
if ( !b.bit(1) ) break; // WR bit clear
}
- cmd = QString("w%1").arg(programLowTime());
+ cmd = TQString("w%1").tqarg(programLowTime());
break;
}
pulseEngine(cmd);
@@ -82,7 +82,7 @@ bool Direct::P18F::doRead(Pic::MemoryRangeType type, Device::Array &data, const
nbWords = findNonMaskEnd(type, wdata)+1;
}
}
- BitValue mask = device().mask(type);
+ BitValue tqmask = device().tqmask(type);
//qDebug("read %s %i", Pic::MEMORY_RANGE_TYPE_DATA[type].label, device().nbWords(type));
//pulseEngine("w300000"); // what for ?
directAccess(type);
@@ -91,7 +91,7 @@ bool Direct::P18F::doRead(Pic::MemoryRangeType type, Device::Array &data, const
for (uint i = 0; i<data.count(); i++) {
setPointer(type, i);
pulseEngine("k0,X80A6,k0,X50A8,k0,X6EF5,k0,X0000");
- data[i] = pulseEngine("r").maskWith(mask);
+ data[i] = pulseEngine("r").tqmaskWith(tqmask);
if ( vdata && !hardware().verifyWord(offset+i, data[i], type, *vdata) ) return false;
}
_base.progressMonitor().addTaskProgress(data.count());
@@ -100,7 +100,7 @@ bool Direct::P18F::doRead(Pic::MemoryRangeType type, Device::Array &data, const
setPointer(type, offset);
//pulseEngine("w1000"); ??
for (uint i=0; i<nbWords; i++) {
- data[i] = pulseEngine("R").maskWith(mask);
+ data[i] = pulseEngine("R").tqmaskWith(tqmask);
if ( vdata && !hardware().verifyWord(offset+i, data[i], type, *vdata) ) return false;
}
_base.progressMonitor().addTaskProgress(data.count());
@@ -111,7 +111,7 @@ bool Direct::P18F::doRead(Pic::MemoryRangeType type, Device::Array &data, const
setPointer(type, 0);
for (uint i = 0; i<data.count(); i+=2) {
BitValue w = pulseEngine("R");
- data[i] = w.maskWith(mask);
+ data[i] = w.tqmaskWith(tqmask);
if ( vdata && !hardware().verifyWord(offset+i, data[i], type, *vdata) ) return false;
data[i+1] = w >> 8;
if ( vdata && !hardware().verifyWord(offset+i+1, data[i+1], type, *vdata) ) return false;
@@ -234,7 +234,7 @@ void Direct::P18F1220::program(Type type)
{
if ( type==Eeprom ) {
pulseEngine("k0,X0000,"); // NOP
- QString cmd = QString("k0;w%1;w%2;X0000").arg(programHighTime(type)).arg(programLowTime());
+ TQString cmd = TQString("k0;w%1;w%2;X0000").tqarg(programHighTime(type)).tqarg(programLowTime());
pulseEngine(cmd);
} else P18F::program(type);
}
@@ -249,7 +249,7 @@ void Direct::P18F242::configureSinglePanel()
//-----------------------------------------------------------------------------
bool Direct::P18F2539::doErase(bool)
{
- // apparently there is no chip erase...
+ // aptqparently there is no chip erase...
return ( doEraseRange(Pic::MemoryRangeType::Code) && doEraseRange(Pic::MemoryRangeType::Eeprom) );
}