Rev.1.01 2007.02.16
RJJ10J1643-0101
105
__CreateInputCapture
Synopsis
<Set input capture mode>
Boolean __CreateInputCapture(unsigned long data1, unsigned int* data2,
unsigned int* data3, unsigned int* data4, void** data5)
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)
data5
Setup data 5 (content differs with MCU type)
Description
Sets a specified timer to input capture 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_S
Uses timer S.
RAPI_F1 Selects
f
1
for the count source.
RAPI_F2 Selects
f
2
for the count source.
RAPI_TIMER_ON
Sets the timer to start operating in __CreateInputCapture.
RAPI_TIMER_OFF
Sets the timer to stop operating in __CreateInputCapture.
RAPI_OVERFLOW_BIT14
Selects overflow of bit 14 for the base timer interrupt.
RAPI_OVERFLOW_BIT15
Selects overflow of bit 15 for the base timer interrupt.
• Specifiable definition values when timer S is used (RAPI_TIMER_S specified)
(Count source) Specify one from { RAPI_F1, RAPI_F2 }. The default value is RAPI_F2.
(Operating
states set)
Specify one from { RAPI_TIMER_ON, RAPI_TIMER_OFF }. The default
value is RAPI_TIMER_OFF.
(Base timer)
Specify one from { RAPI_OVERFLOW_BIT14, RAPI_OVERFLOW_BIT15 }.
The default value is RAPI_OVERFLOW_BIT15.
(R8C)
RAPI_TIMER_C
Uses timer C.
RAPI_TIMER_RD0
Uses timer RD channel 0.
RAPI_TIMER_RD1
Uses timer RD channel 1.
RAPI_TRD_F1 Selects
f
1
for the timer RD count source.
RAPI_TRD_F2 Selects
f
2
for the timer RD count source.
RAPI_TRD_F8 Selects
f
8
for the timer RD count source.
RAPI_TRD_F32 Selects
f
32
for the timer RD count source.
RAPI_TRD_F40M Selects
fOCO40M
for the timer RD count source.
RAPI_FRING_FAST Selects
f
RING-fast
for the count source.
RAPI_TIMER_ON
Sets the timer to start operating in __CreateInputCapture.
RAPI_TIMER_OFF
Sets the timer to stop operating in __CreateInputCapture.
RAPI_RISING
Selects the rising edge of measurement pulse as active edge.