Enablepulseperiodmeasurementmode – Renesas M16C/62P Group User Manual
Page 59

Rev.1.00 2007.11.1
REC10B0002-0100
57
__EnablePulsePeriodMeasurementMode
Synopsis
Boolean __EnablePulsePeriodMeasurementMode(unsigned long data)
data Setup
data
Description
Controls operation of the timer that is set to specified pulse period measurement mode
by starting or stopping it.
[data]
For data, the following definition values can be set. To set multiple definition values at
the same time, use the symbol “|” to separate each specified value.
RAPI_TIMER_B0
Selects timer B channel 0.
RAPI_TIMER_B1
Selects timer B channel 1.
RAPI_TIMER_B2
Selects timer B channel 2.
RAPI_TIMER_B3
Selects timer B channel 3.
RAPI_TIMER_B4
Selects timer B channel 4.
RAPI_TIMER_B5
Selects timer B channel 5.
RAPI_TIMER_ON
Sets the timer that is set to pulse period measurement mode to start
operating.
RAPI_TIMER_OFF
Sets the timer that is set to pulse period measurement mode to stop
operating.
Return value
If the timer specification is incorrect, RAPI_FALSE is returned; otherwise, RAPI_TRUE
is returned.
Functionality
Timer (pulse period measurement mode)
Reference
__CreatePulsePeriodMeasurementMode
__DestroyPulsePeriodMeasurementMode
__GetPulsePeriodMeasurementMode
Remark
•
If an undefined value is specified in the argument, operation of the API cannot be
guaranteed.
Program example
#include
"rapi_timer_m16c_62p.h"
void func( void )
{
/* Enable timer B1 as pulse period measurement mode */
__EnablePulsePeriodMeasurementMode( RAPI_TIMER_B1|RAPI_TIMER_ON );
}