Rev.1.01 2007.02.16
RJJ10J1643-0101
87
(Interrupt)
If overflow interrupt requests are enabled, specify RAPI_OVERFLOW. If
no interrupts are specified, “No interrupt request” is set.
(Input pin)
Specify one from { RAPI_FTIOA, RAPI_FTIOB }. The default value is
RAPI_FTIOA.
(Clock for digital
filter)
Specify one from { RAPI_TRC_FILTER_F1, RAPI_TRC_FILTER_F8,
RAPI_TRC_FILTER_F32, RAPI_TRC_FILTER_F }. The default value is
RAPI_TRC_FILTER_F32.
[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) (H8/300H)
Specify 0.
(R8C)
When using timer X, specify the set value for the timer register.
[data4]
(M16C) (H8/300H)
Specify 0.
(R8C)
Specify the set value for the prescaler register.
Return value
If the timer specification is incorrect, RAPI_FALSE is returned; otherwise, RAPI_TRUE is
returned.
Functionality
Timer (pulse period measurement mode)
Reference
__EnablePulsePeriodMeasurementMode
,
__DestroyPulsePeriodMeasurementMode
,
__GetPulsePeriodMeasurementMode
Remark
•
If an undefined value is specified in the first argument, operation of the API cannot be
guaranteed.
•
The specifiable timers differ with each CPU used.
•
When used for the H8/300H, this API specify when freeing it from module stanby
state.
Program example
#include "rapi_timer_r8c_13.h"
void TimerIntFunc( void ){}
void func( void )
{
/* Set up timer X as pulse period measurement mode */
__CreatePulsePeriodMeasurementMode(
RAPI_TIMER_X|RAPI_TIMER_ON|RAPI_FALLING_FALLING|RAPI_F8,
5, 0x80, 0x80, TimerIntFunc);
}