Rev.1.01 2007.02.16
RJJ10J1643-0101
78
• Specifiable definition values when timer V is used (RAPI_TIMER_V specified)
(Clock)
Specify one from { RAPI_TV_F4, RAPI_TV_F8, RAPI_TV_F16,
RAPI_TV_F32, RAPI_TV_F64, RAPI_TV_F128 }. If clock
specification is omitted, specify “Disable clock input.”
(Interrupt)
If compare match A interrupt requests are enabled, specify
RAPI_COMPARE_MATCH_A. If compare match B interrupt requests
are enabled, specify RAPI_COMPARE_MATCH_B. If no interrupts
are specified, “No interrupt request” is set.
(Operating states set) Specify one from { RAPI_TIMER_ON, RAPI_TIMER_OFF }. The
default value is RAPI_TIMER_OFF.
(Output)
Specify one from { RAPI_OUT_H_L, RAPI_OUT_L_H }. Always be
sure to specify this output.
(TRGV pin input)
Specify one from { RAPI_TRGV_RISING, RAPI_ TRGV_FALLING,
RAPI_ TRGV_BOTH, RAPI_TRGV_PROHIBITED }.
The default value is RAPI_TRGV_PROHIBITED.
[data2]
(M16C) (R8C)
Specify the interrupt priority level (0
–
7) to be set in the interrupt control register.
(H8/300H)
Specify the interrupt priority level (0–1) to be set in the interrupt control register.
For the CPUs that do not have an interrupt control register, specify 0.
[data3]
(M16C)
Specify a pointer to the 16-bit variable in which the set value for the timer register is
stored.
For 16-bit PWM, specify the value of ‘n’ in “high-level width n/f
j
, period 65535/f
j
” in
16 bits.
For 8-bit PWM, specify the values of ‘n’ and ‘m’ in “high-level width n (m + 1)/f,
period 255 (m + 1)/f
j
” in the 8 high-order bits and the 8 low-order bits, respectively.
(R8C)
Specify a pointer to the array in which the set value is stored.
[0]: Specify the set value for the primary register in 8 bits.
[1]: Specify the set value for the secondary register in 8 bits.
[2]: Specify the set value for the prescaler in 8 bits.
(H8/300H)
Specify a pointer to the array in which the set value is stored.
[0]: Specify the comparison value A in 8 bits.
[1]: Specify the comparison value B in 8 bits.
Return value
If the timer specification is incorrect, RAPI_FALSE is returned; otherwise, RAPI_TRUE
is returned.
Functionality
Timer (pulse width modulation mode (PWM mode))