NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
char MSIRTrain ( const byte  port,
const byte  i2caddr,
const byte  channel,
const byte  func 
)
inline

MSIRTrain function.

Control an IR Train receiver set to the specified channel using the mindsensors NRLink device. Valid function values are TRAIN_FUNC_STOP, TRAIN_FUNC_INCR_SPEED, TRAIN_FUNC_DECR_SPEED, and TRAIN_FUNC_TOGGLE_LIGHT. Valid channels are TRAIN_CHANNEL_1 through TRAIN_CHANNEL_3 and TRAIN_CHANNEL_ALL. The port must be configured as a Lowspeed port before using this function.

Parameters
portThe sensor port. See Input port constants.
i2caddrThe sensor I2C address. See sensor documentation for this value.
channelThe IR Train channel. See IR Train channel constants.
funcThe IR Train function. See PF/IR Train function constants
Returns
The function call result. NO_ERR or Communications specific errors.
Examples:
ex_MSIRTrain.nxc.