BL4S100 User’s Manual
59
setLimit
int setLimit(int channel, word limit);
FUNCTION DESCRIPTION
Sets the value of the limit register within the counter block hosting the given channel.
This new value will take effect on the next counter overflow or by resetting the counter
via the
resetCounter()
function call.
PARAMETERS
channel
digital input channel that uses the desired counter block,
0–11 (pins IN0–IN11)
limit
new value for the limit register
RETURN VALUE
0 — success.
-EINVAL
— invalid parameter value.
-EPERM
— pin type does not permit this function.
SEE ALSO
brdInit, setCapture, resetCounter