diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-294EF1C3-E7EC-5B93-B4F4-ECA50DD6993F.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-294EF1C3-E7EC-5B93-B4F4-ECA50DD6993F.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,52 @@ + + + + + +How +to Set when Write Calls Return: TutorialThis tutorial follows on from the tutorial on How to transfer data. +

This tutorial follows on from the How +to Transfer Data Tutorial. The RComm::Write() function +can return when the data has been queued in the device driver buffer, or when +the data has been sent by the device driver. +

The RComm::Write() API can return in one of two +ways:

    +
  1. As soon as the data +has been queued with the device driver.

    This allows the application +to run while the data is sent so that the application can create the next +block of data to send.

  2. +
  3. After the device driver +has sent the data.

    This is used when the application must wait for +a response from the remote device after the data is sent.

  4. +

The default value is dependent on the Serial Device Driver.

+ + +Create an object of type TCommConfig. + +Call RComm::Config() with +the aConfig parameter set to the TCommConfig object. +The TCommConfig object now contains the port settings. + + +To set the RComm::Write() API to return early, set the KConfigWriteBufferedComplete flag +in the iHandshake field in the TCommconfig object. +To set the RComm::Write() API to return after the data is sent, clear +the KConfigWriteBufferedComplete flag in the iHandshake field +in the TCommconfig object. + +Call RComm::SetConfig() with +the aConfig parameter set to the TCommConfig object. + + +Example TCommConfig portSettings; +commPort.Config(portSettings); +portSettings().iHandshake |= KConfigWriteBufferedComplete; // set early complete +User::LeaveIfError (commPort.SetConfig(portSettings)); + +
\ No newline at end of file