BL4S100 User’s Manual
71
setOffset
int setOffset(int channel, float offset);
FUNCTION DESCRIPTION
Sets the offset of a PPM output on a digital output channel. This function call will not
affect the position of the trailing edge of the PPM output and so will change the duty
cycle percentage of the PPM output. If the offset is set past the current position of the
trailing edge of the PPM output (set by the duty cycle), the PPM output will start at the
offset and will wrap around to the position of what was the trailing edge.
PARAMETERS
channel
digital output channel that is getting its offset set,
0–7 (OUT0–OUT79)
offset
PPM offset (should be from 0 to 100%)
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, setSyncIn, setSyncOut,
pulseEnable, pulseDisable
electronic components distributor