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

MSPFComboDirect function.

Execute a pair of Power Function motor commands on the specified channel using the mindsensors NRLink device. Commands for outa and outb are PF_CMD_STOP, PF_CMD_REV, PF_CMD_FWD, and PF_CMD_BRAKE. Valid channels are PF_CHANNEL_1 through PF_CHANNEL_4. 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 Power Function channel. See Power Function channel constants.
outaThe Power Function command for output A. See Power Function command constants.
outbThe Power Function command for output B. See Power Function command constants.
Returns
The function call result. NO_ERR or Communications specific errors.
Examples:
ex_MSPFComboDirect.nxc.