User`s manual

BL4S100 Users Manual 57
getCounter
int getCounter(int channel, word *count);
FUNCTION DESCRIPTION
Reads the current count of the counter register within the counter block hosting the
given channel.
PARAMETERS
channel digital input channel that uses the desired counter block,
0–11 (pins IN0–IN11)
count pointer to word variable to place count register reading
RETURN VALUE
0 — success.
-EINVAL — invalid parameter value.
SEE ALSO
brdInit, setCounter, setDecoder, setCapture, resetCounter
getBegin
int getBegin(int channel, word *begin);
FUNCTION DESCRIPTION
Reads the current value of the begin register within the counter block hosting the given
channel.
PARAMETERS
channel digital input channel that uses the desired counter block,
0–11 (pins IN0–IN11)
begin pointer to word variable to place begin register reading
RETURN VALUE
0 — success.
-EINVAL — invalid parameter value.
-EPERM — pin type does not permit this function.
SEE ALSO
brdInit, setCapture, resetCounter, getEnd