QextSerialPort CommEvent overlapped write error: 170
-
Hi, If I uncomment the only commented line below I got "CommEvent overlapped write error: 170". Why? Thanks for the answers!
@
void SerialOut::sendOut(QString in)
{
const char buff[2]={0x00,0x0A};
port->write(buff,2);
port->waitForBytesWritten(250);
const char *temparray;
QByteArray tempbytearray=in.toAscii();
temparray=tempbytearray.constData();
qDebug() << "outstring:" << temparray;
qint64 i=port->write(temparray);
port->waitForBytesWritten(250);
//port->write(buff,2); This is the only line which throw the error
port->waitForBytesWritten(250);
}@