BL4S200 User’s Manual
90
setOffset
int setOffset(int channel, float offset);
FUNCTION DESCRIPTION
Sets the offset of a PPM output on a configurable I/O channel. Will affect any PWM/
PPM output that has been bound to this channel’s PPM signal.
NOTE:
Configurable I/O channels DIO30 and DIO31 do not support PWM/PPM
functionality, and cannot be used with this function call.
PARAMETERS
channel
channel that is getting its offset set, 0–29 (DIO0–DIO29)
duty
PPM offset (should be from 0 to 100%, an offset above 100.0%
will be set to 100.0%)
NOTE:
A zero offset will produce the smallest offset possible, which is one count. If you
must have a zero offset, use
setPWM()
instead of
setOffset()
.
RETURN VALUE
0 — success.
-EINVAL
— invalid parameter value.
-EPERM
— channel function does not permit this operation.
SEE ALSO
brdInit, setPWM, setPPM, setFreq, setDuty, setToggle, setSync
electronic components distributor