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

HTPFSingleOutputPWM function.

Control the speed of a single output on a Power Function receiver set to the specified channel using the HiTechnic iRLink device. Select the desired output using PF_OUT_A or PF_OUT_B. Valid functions are PF_PWM_FLOAT, PF_PWM_FWD1, PF_PWM_FWD2, PF_PWM_FWD3, PF_PWM_FWD4, PF_PWM_FWD5, PF_PWM_FWD6, PF_PWM_FWD7, PF_PWM_BRAKE, PF_PWM_REV7, PF_PWM_REV6, PF_PWM_REV5, PF_PWM_REV4, PF_PWM_REV3, PF_PWM_REV2, and PF_PWM_REV1. 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.
channelThe Power Function channel. See Power Function channel constants.
outThe Power Function output. See Power Function output constants.
funcThe Power Function PWM function. See Power Function PWM option constants.
Returns
The function call result. NO_ERR or Communications specific errors.
Examples:
ex_HTPFSingleOutputPWM.nxc.