BL4S100 User’s Manual
70
setDuty
int setDuty(int channel, float duty);
FUNCTION DESCRIPTION
Sets the duty cycle of the PWM or PPM output on a digital output channel. Will affect
any PWM/PPM that has been bound to this channel’s PWM/PPM.
PARAMETERS
channel
digital output channel that is getting its duty cycle set,
0–7 (OUT0–OUT7)
duty
duty cycle of the PWM/PPM output (should be from 0 to 100%)
RETURN VALUE
0 — success.
-EINVAL
— invalid parameter value.
-EPERM
— channel function does not permit this operation.
SEE ALSO
brdInit, setPWM, setPPM, setOffset, setFreq, setSyncIn, setSyncOut,
pulseEnable, pulseDisable