Rev.1.01 2007.02.16
RJJ10J1643-0101
73
__GetEventCounter
Synopsis
<Get event counter mode counter value>
Boolean __GetEventCounter(unsigned long data1, unsigned int *data2)
data1
Setup data 1 (content differs with MCU type)
data2
Pointer to the buffer in which counter value is stored
Description
Gets the counter value of the timer that is set to specified event counter mode.
[data1]
For data, the following definition values can be set.
(M16C)
RAPI_TIMER_A0
Selects timer A channel 0.
RAPI_TIMER_A1
Selects timer A channel 1.
RAPI_TIMER_A2
Selects timer A channel 2.
RAPI_TIMER_A3
Selects timer A channel 3.
RAPI_TIMER_A4
Selects timer A channel 4.
RAPI_TIMER_B0
Selects timer B channel 0.
RAPI_TIMER_B1
Selects timer B channel 1.
RAPI_TIMER_B2
Selects timer B channel 2.
(R8C)
RAPI_TIMER_X
Selects timer X.
RAPI_TIMER_Y Selects
timer
Y.
RAPI_TIMER_RA
Selects timer RA.
(H8/300H)
RAPI_TIMER_B1
Selects timer B1.
RAPI_TIMER_V
Selects timer V.
[data2]
Specify a pointer to the array in which the acquired counter value is stored.
(M16C)
• When using timer A (RAPI_TIMER_A0 to RAPI_TIMER_A4 specified)
[0]: The value of timer Ai register (i = 0–4) is stored.
• When using timer B (RAPI_TIMER_B0 to RAPI_TIMER_B2 specified)
[0]: The value of timer Bi register (i = 0–2) is stored.
(R8C)
• When using timer X (RAPI_TIMER_X specified)
[0]: The value of prescaler X register is stored.
[1]: The value of timer X register is stored.
• When using timer Y (RAPI_TIMER_Y specified)
[0]: The value of prescaler Y is stored.
[1]: The value of timer Y primary register is stored.
• When using timer RA (RAPI_TIMER_RA specified)
[0]: The value of timer RA prescaler register is stored.