diff options
Diffstat (limited to 'src/progs/psp/base/psp_serial.cpp')
-rw-r--r-- | src/progs/psp/base/psp_serial.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/progs/psp/base/psp_serial.cpp b/src/progs/psp/base/psp_serial.cpp index 964d604..7da4c00 100644 --- a/src/progs/psp/base/psp_serial.cpp +++ b/src/progs/psp/base/psp_serial.cpp @@ -14,7 +14,7 @@ #include "common/common/number.h" //----------------------------------------------------------------------------- -Psp::SerialPort::SerialPort(const QString &device, Log::Base &log) +Psp::SerialPort::SerialPort(const TQString &device, Log::Base &log) : Port::Serial(device, NeedFlush, log) {} @@ -46,9 +46,9 @@ bool Psp::SerialPort::reset() return flush(0); } -bool Psp::SerialPort::command(uchar c, uint nbBytes, QMemArray<uchar> &a) +bool Psp::SerialPort::command(uchar c, uint nbBytes, TQMemArray<uchar> &a) { - log(Log::DebugLevel::Extra, QString("Command %1").arg(toHexLabel(c, 2))); + log(Log::DebugLevel::Extra, TQString("Command %1").tqarg(toHexLabel(c, 2))); if ( !sendChar(c) ) return false; return receive(nbBytes, a); } @@ -57,7 +57,7 @@ bool Psp::SerialPort::checkAck(uchar ec, uchar rc) { if ( ec==rc ) return true; log(Log::LineType::Error, i18n("Incorrect ack: expecting %1, received %2") - .arg(QString(toHex(ec, 2))).arg(QString(toHex(rc, 2)))); + .tqarg(TQString(toHex(ec, 2))).tqarg(TQString(toHex(rc, 2)))); return false; } @@ -65,14 +65,14 @@ bool Psp::SerialPort::checkEnd(uchar c) { if ( c==0 ) return true; log(Log::LineType::Error, i18n("Incorrect received data end: expecting 00, received %1") - .arg(QString(toHex(c, 2)))); + .tqarg(TQString(toHex(c, 2)))); return false; } -bool Psp::SerialPort::commandAck(uchar c, uint nbBytes, QMemArray<uchar> *a) +bool Psp::SerialPort::commandAck(uchar c, uint nbBytes, TQMemArray<uchar> *a) { Q_ASSERT( nbBytes>=1 ); - QMemArray<uchar> tmp; + TQMemArray<uchar> tmp; if ( !command(c, nbBytes, tmp) ) return false; if ( !checkAck(c, tmp[0]) ) return false; if (a) *a = tmp; @@ -81,13 +81,13 @@ bool Psp::SerialPort::commandAck(uchar c, uint nbBytes, QMemArray<uchar> *a) bool Psp::SerialPort::receiveEnd() { - QMemArray<uchar> a; + TQMemArray<uchar> a; if ( !receive(1, a) ) return false; if ( !checkEnd(a[0]) ) return false; return true; } -bool Psp::SerialPort::commandAckEnd(uchar c, uint nbBytes, QMemArray<uchar> &a) +bool Psp::SerialPort::commandAckEnd(uchar c, uint nbBytes, TQMemArray<uchar> &a) { Q_ASSERT( nbBytes>=2 ); if ( !command(c, nbBytes, a) ) return false; @@ -100,7 +100,7 @@ bool Psp::SerialPort::sendData(uint value, uint nbBytes) { Q_ASSERT( nbBytes==1 || nbBytes==2 ); Q_ASSERT( value<uint(1 << 8*nbBytes) ); - QMemArray<uchar> a(nbBytes); + TQMemArray<uchar> a(nbBytes); if ( nbBytes==2 ) { a[0] = value / 256; a[1] = value & 0xFF; |