This tutorial shows the basic steps to perform any serial port configuration through the RComm API.
RComm::Caps() The capabilities of the port are in the TCommCaps structure. For example, TCommCapsV01.iRate contains a bit field of the bit rates the port can manage.
Note: A port may be able to manage bit rates higher than those contained in the TCommCapsV01.iRate bit field.RComm::Config() with the aConfig parameter set to the TCommConfigV01 object to get the port configuration. TCommConfigV01 object. For example, set the iSIREnable flag to enable Infrared. RComm::Config() with the TCommConfigV01 object as the aConfig parameter. The port is now configured. TCommCaps ourCapabilities;
User::LeaveIfError(commPort.Caps (ourCapabilities));
if ((ourCapabilities ().iSIR & KCapsSIR115kbps) ||
(ourCapabilities ().iSIR & KCapsSIR2400bpsOnly) ||
(ourCapabilities ().iSIR & KCapsSIR4Mbps))
{
// IR is supported, so enable it
TCommConfig portSettings;
User::LeaveIfError(commPort.Config (portSettings));
portSettings ().iSIREnable = ESIREnable;
User::LeaveIfError (commPort.SetConfig (portSettings));
}