Rev.1.01 2007.02.16
RJJ10J1643-0101
119
__GetInputCapture
Synopsis
<Get input capture mode counter value>
Boolean __GetInputCapture(unsigned long data1, unsigned int *data2)
data1
Setup data 1 (content differs with MCU type)
data2
Setup data 2 (content differs with MCU type)
Description
Gets the counter value of the timer that is set to specified input capture mode.
[data1]
For data, the following definition values can be set.
(M16C)
RAPI_TIMER_S
Selects timer S.
(R8C)
RAPI_TIMER_C
Selects timer C.
RAPI_TIMER_RD0
Selects timer RD0 channe 0.
RAPI_TIMER_RD1
Selects timer RD0 channe 1.
(H8/300H)
RAPI_TIMER_W
Selects timer W.
RAPI_TIMER_Z0
Selects timer Z channel 0.
RAPI_TIMER_Z1
Selects timer Z channel 1.
RAPI_TIMER_RC
Selects timer RD0.
RAPI_TIMER_RD0
Selects timer RD0 channe 0.
RAPI_TIMER_RD1
Selects timer RD0 channe 1.
RAPI_TIMER_RD2
Selects timer RD0 channe 2.
RAPI_TIMER_RD3
Selects timer RD0 channe 3.
[data2]
(M16C)
Specify a pointer to the array in which the acquired counter value is stored.
[0]: Stores the value of base timer register 0.
[1]: Stores the value of time measurement register 0.
[2]: Stores the value of time measurement register 1.
[3]: Stores the value of time measurement register 2.
[4]: Stores the value of time measurement register 3.
[5]: Stores the value of time measurement register 4.
[6]: Stores the value of time measurement register 5.
[7]: Stores the value of time measurement register 6.
[8]: Stores the value of time measurement register 7.
(R8C)
Specify a pointer to the array in which the acquired counter value is stored.
• When timer C is used (RAPI_TIMER_C specified)
[0]: Stores the value of timer C counter.
[1]: Stores the value of capture & compare 0 register.