diff options
Diffstat (limited to 'src/devices/pic/base/pic_register.cpp')
-rw-r--r-- | src/devices/pic/base/pic_register.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/src/devices/pic/base/pic_register.cpp b/src/devices/pic/base/pic_register.cpp index fcfe5ef..b5dc616 100644 --- a/src/devices/pic/base/pic_register.cpp +++ b/src/devices/pic/base/pic_register.cpp @@ -28,7 +28,7 @@ Address Pic::RegistersData::mirroredAddress(Address address) const } if ( delta==-1 ) continue; for (uint k=0; k<uint(mirrored[i].count()); k++) - mirror = QMIN(mirrored[i][k].start + delta, mirror); + mirror = TQMIN(mirrored[i][k].start + delta, mirror); break; } return mirror; @@ -43,7 +43,7 @@ Device::RegisterProperties Pic::RegistersData::properties(Address address) const case Sfr: { Device::RegisterProperties properties = Device::NotAccessible; RegisterBitProperties rbp = RegisterBitUnused; - QMap<QString, RegisterData>::const_iterator it; + TQMap<TQString, RegisterData>::const_iterator it; for (it=sfrs.begin(); it!=sfrs.end(); ++it) { if ( it.data().address!=address ) continue; for (uint i=0; i<Device::MAX_NB_PORT_BITS; i++) rbp |= it.data().bits[i].properties; @@ -69,29 +69,29 @@ Pic::RegisterType Pic::RegistersData::type(Address address) const return Mirrored; } -QString Pic::RegistersData::label(Address address) const +TQString Pic::RegistersData::label(Address address) const { switch ( type(address) ) { case UnusedRegister: return "---"; - case Mirrored: return i18n("Mirror of %1").arg(toHexLabel(mirroredAddress(address), nbCharsAddress())); + case Mirrored: return i18n("Mirror of %1").tqarg(toHexLabel(mirroredAddress(address), nbCharsAddress())); case Gpr: return "<GPR>"; case Sfr: return sfrNames[address]; } Q_ASSERT(false); - return QString::null; + return TQString(); } bool Pic::RegistersData::hasPort(uint index) const { Q_ASSERT( index<Device::MAX_NB_PORTS ); - if ( sfrs.contains("GPIO") ) return ( index==0 ); - if ( !sfrs.contains(portName(index)) ) return false; + if ( sfrs.tqcontains("GPIO") ) return ( index==0 ); + if ( !sfrs.tqcontains(portName(index)) ) return false; return true; } int Pic::RegistersData::portIndex(Address address) const { - QString name = sfrNames[address]; + TQString name = sfrNames[address]; if ( name.isEmpty() ) return -1; for (uint i=0; i<Device::MAX_NB_PORTS; i++) { if ( !hasPort(i) ) continue; @@ -107,58 +107,58 @@ bool Pic::RegistersData::hasPortBit(uint index, uint bit) const return ( port.bits[bit].properties!=RegisterBitUnused ); } -QString Pic::RegistersData::portName(uint index) const +TQString Pic::RegistersData::portName(uint index) const { - if ( sfrs.contains("GPIO") ) { - if ( index!=0 ) return QString::null; + if ( sfrs.tqcontains("GPIO") ) { + if ( index!=0 ) return TQString(); return "GPIO"; } - return QString("PORT") + char('A' + index); + return TQString("PORT") + char('A' + index); } -QString Pic::RegistersData::trisName(uint index) const +TQString Pic::RegistersData::trisName(uint index) const { - if ( sfrs.contains("GPIO") ) { - if ( index!=0 ) return QString::null; + if ( sfrs.tqcontains("GPIO") ) { + if ( index!=0 ) return TQString(); return "TRISIO"; } if ( _data.architecture()==Architecture::P17C ) { - if ( index==0 ) return QString::null; - return QString("DDR") + char('A' + index); + if ( index==0 ) return TQString(); + return TQString("DDR") + char('A' + index); } - return QString("TRIS") + char('A' + index); + return TQString("TRIS") + char('A' + index); } bool Pic::RegistersData::hasTris(uint index) const { - QString name = trisName(index); + TQString name = trisName(index); if ( name.isEmpty() ) return false; - return sfrs.contains(name); + return sfrs.tqcontains(name); } -QString Pic::RegistersData::latchName(uint index) const +TQString Pic::RegistersData::latchName(uint index) const { if ( _data.architecture()==Architecture::P10X || _data.architecture()==Architecture::P16X || _data.architecture()==Architecture::P17C ) - return QString::null; - return QString("LAT") + char('A' + index); + return TQString(); + return TQString("LAT") + char('A' + index); } bool Pic::RegistersData::hasLatch(uint index) const { - QString name = latchName(index); + TQString name = latchName(index); if ( name.isEmpty() ) return false; - return sfrs.contains(name); + return sfrs.tqcontains(name); } -QString Pic::RegistersData::portBitName(uint index, uint bit) const +TQString Pic::RegistersData::portBitName(uint index, uint bit) const { - if ( sfrs.contains("GPIO") ) return QString("GP") + QString::number(bit); - return QString("R") + char('A' + index) + QString::number(bit); + if ( sfrs.tqcontains("GPIO") ) return TQString("GP") + TQString::number(bit); + return TQString("R") + char('A' + index) + TQString::number(bit); } -QValueList<Register::TypeData> Pic::RegistersData::relatedRegisters(const Register::TypeData &data) const +TQValueList<Register::TypeData> Pic::RegistersData::relatedRegisters(const Register::TypeData &data) const { - QValueList<Register::TypeData> list; + TQValueList<Register::TypeData> list; if ( data.type()==Register::Regular ) { int i = portIndex(data.address()); if ( i==-1 ) list.append(data); @@ -185,7 +185,7 @@ bool Pic::RegistersData::bankHasSfrs(uint i) const if ( i==0 ) return true; if ( (_data.architecture()==Pic::Architecture::P18F || _data.architecture()==Pic::Architecture::P18J) && i==15 ) return true; if ( !isBankUsed(i) ) return false; - QMap<Address, QString>::const_iterator it; + TQMap<Address, TQString>::const_iterator it; for (it=sfrNames.begin(); it!=sfrNames.end(); ++it) if ( bankFromAddress(it.key())==i ) return true; return false; @@ -220,25 +220,25 @@ uint Pic::RegistersData::firstGprIndex() const } //---------------------------------------------------------------------------- -QDataStream &Pic::operator <<(QDataStream &s, const RangeData &rd) +TQDataStream &Pic::operator <<(TQDataStream &s, const RangeData &rd) { s << rd.start << rd.length; return s; } -QDataStream &Pic::operator >>(QDataStream &s, RangeData &rd) +TQDataStream &Pic::operator >>(TQDataStream &s, RangeData &rd) { s >> rd.start >> rd.length; return s; } -QDataStream &Pic::operator <<(QDataStream &s, const RegisterBitData &rbd) +TQDataStream &Pic::operator <<(TQDataStream &s, const RegisterBitData &rbd) { - s << Q_UINT8(rbd.properties) << Q_UINT8(rbd.por) << Q_UINT8(rbd.mclr); + s << TQ_UINT8(rbd.properties) << TQ_UINT8(rbd.por) << TQ_UINT8(rbd.mclr); return s; } -QDataStream &Pic::operator >>(QDataStream &s, RegisterBitData &rbd) +TQDataStream &Pic::operator >>(TQDataStream &s, RegisterBitData &rbd) { - Q_UINT8 properties, por, mclr; + TQ_UINT8 properties, por, mclr; s >> properties >> por >> mclr; rbd.properties = RegisterBitProperties(properties); rbd.por = RegisterBitState(por); @@ -246,42 +246,42 @@ QDataStream &Pic::operator >>(QDataStream &s, RegisterBitData &rbd) return s; } -QDataStream &Pic::operator <<(QDataStream &s, const RegisterData &rd) +TQDataStream &Pic::operator <<(TQDataStream &s, const RegisterData &rd) { s << rd.address; for (int i=0; i<Device::MAX_NB_PORT_BITS; i++) s << rd.bits[i]; return s; } -QDataStream &Pic::operator >>(QDataStream &s, RegisterData &rd) +TQDataStream &Pic::operator >>(TQDataStream &s, RegisterData &rd) { s >> rd.address; for (int i=0; i<Device::MAX_NB_PORT_BITS; i++) s >> rd.bits[i]; return s; } -QDataStream &Pic::operator <<(QDataStream &s, const CombinedData &rd) +TQDataStream &Pic::operator <<(TQDataStream &s, const CombinedData &rd) { s << rd.address << rd.nbChars; return s; } -QDataStream &Pic::operator >>(QDataStream &s, CombinedData &rd) +TQDataStream &Pic::operator >>(TQDataStream &s, CombinedData &rd) { s >> rd.address >> rd.nbChars; return s; } -QDataStream &Pic::operator <<(QDataStream &s, const RegistersData &rd) +TQDataStream &Pic::operator <<(TQDataStream &s, const RegistersData &rd) { s << rd.nbBanks << rd.accessBankSplit << rd.unusedBankMask; s << rd.sfrs << rd.mirrored << rd.unused << rd.combined; return s; } -QDataStream &Pic::operator >>(QDataStream &s, RegistersData &rd) +TQDataStream &Pic::operator >>(TQDataStream &s, RegistersData &rd) { s >> rd.nbBanks >> rd.accessBankSplit >> rd.unusedBankMask; s >> rd.sfrs >> rd.mirrored >> rd.unused >> rd.combined; rd.sfrNames.clear(); - QMap<QString, RegisterData>::const_iterator it; + TQMap<TQString, RegisterData>::const_iterator it; for(it=rd.sfrs.begin(); it!=rd.sfrs.end(); ++it) rd.sfrNames[it.data().address] = it.key(); return s; } |