Rev.1.01 2007.02.16
RJJ10J1643-0101
64
__CreateEventCounter
Synopsis <Set event counter mode>
Boolean __CreateEventCounter(unsigned long data1, unsigned int data2,
unsigned int data3, unsigned int data4, void* func)
data1 Setup data 1 (content differs with MCU type)
data2 Setup data 2 (content differs with MCU type)
data3 Setup data 3 (content differs with MCU type)
data4 Setup data 4 (content differs with MCU type)
func Callback function pointer
(Specify 0 if no callback functions are set.)
Description Sets a specified timer to event counter mode.
[data1]
For data1, the following definition values can be set. To set multiple definition values at
the same time, use the symbol “|” to separate each specified value.
(M16C)
RAPI_TIMER_A0 Uses timer A channel 0.
RAPI_TIMER_A1 Uses timer A channel 1.
RAPI_TIMER_A2 Uses timer A channel 2
RAPI_TIMER_A3 Uses timer A channel 3.
RAPI_TIMER_A4 Uses timer A channel 4.
RAPI_TIMER_B0 Uses timer B channel 0.
RAPI_TIMER_B1 Uses timer B channel 1.
RAPI_TIMER_B2 Uses timer B channel 2.
RAPI_EV_EXTERNAL Selects the external signal input to TAiIN pin (when using timer Ai)
or TBiIN pin (when using timer Bi) for the count source.
RAPI_EV_TIMER_AJ Selects overflow or underflow of timer Aj (j = i 1, however j = 4 if i =
0) for the count source.
RAPI_EV_TIMER_AK Selects overflow or underflow of timer Ak (k = i 1, however k = 0 if i
= 4) for the count source.
RAPI_EV_TIMER_B2 Selects overflow or underflow of timer B2 for the count source.
RAPI_EV_TIMER_BJ Selects overflow or underflow of timer Bj (j = i – 1, however j = 2 if i
= 0) for the count source.
RAPI_TIMER_ON Sets the timer to start operating in __CreateEventCounter.
RAPI_TIMER_OFF Sets the timer to stop operating in __CreateEventC ounter.
RAPI_PULSE_ON Selects that pulses are output from TAiIN pin.
RAPI_PULSE_OFF Selects that no pulses are output from TAiIN pin.
RAPI_AUTO_RELOAD Selects reload type for the count type.
RAPI_FREE_RUN Selects free-run type for the count type.
RAPI_UP_COUNT Selects up-count for the count operation.
RAPI_DOWN_COUNT Selects down-count for the count operation.