This tutorial shows how to wait for the device driver to transmit data when a write request has previously been terminated early.
The tutorial How to Terminate Write Requests Early shows how the RComm::Write API can return early.
To wait for the buffer to be empty, call RComm::Write() in one of two ways:
sending an empty descriptor:
outputBuffer.Zero(); commPort.Write (requeststatus,outputBuffer);
sending a descriptor with an optional length parameter of zero:
commPort.Write (requeststatus,outputBuffer,0);
The state of the KConfigWriteBufferedComplete bit has no effect when the above methods are used.
This is a useful feature that enables something like a file transfer of a series of blocks to be sent efficiently making use of early completion, while still being able to guarantee through the method above that all the data has actually cleared the transmitter at end of the transfer.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.