The Serial Communications Server API includes functionality to detect and configure an Infrared port.
These steps show the functionality of the Serial Communications Server API for Infrared. At the end of these steps, the port is set to Infrared mode. A port set to Infrared mode may still require further configuration specific to the Infrared driver. This further configuration is not included in this tutorial.
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)); }
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.