Geteventcounter - Renesas M16C/62P Group Reference Manual

Group renesas embedded application programming interface
Hide thumbs Also See for M16C/62P Group:
Table of Contents

Advertisement

__GetEventCounter

Synopsis
<Get event counter mode counter value>
Boolean __GetEventCounter(unsigned long data1, unsigned int *data2)
Gets the counter value of the timer that is set to specified event counter mode.
Description
[data1]
For data, the following definition values can be set.
Return value
If the timer specification is incorrect, RAPI_FALSE is returned; otherwise, RAPI_TRUE
is returned.
Functionality
Timer (event counter mode)
Reference
__CreateEventCounter, __EnableEventCounter,
Remark
If an undefined value is specified in the first argument, operation of the API cannot
be guaranteed.
Program example
#include "rapi_timer_m16c_62p.h"
void func( void )
{
}
Rev.1.00
2007.11.1
REC10B0002-0100
Setup data 1
data1
data2
Pointer to the buffer in which counter value is stored
RAPI_TIMER_A0
Selects timer A channel 0.
Selects timer A channel 1.
RAPI_TIMER_A1
RAPI_TIMER_A2
Selects timer A channel 2.
RAPI_TIMER_A3
Selects timer A channel 3.
Selects timer A channel 4.
RAPI_TIMER_A4
Selects timer B channel 0.
RAPI_TIMER_B0
RAPI_TIMER_B1
Selects timer B channel 1.
Selects timer B channel 2.
RAPI_TIMER_B2
Selects timer B channel 3.
RAPI_TIMER_B3
RAPI_TIMER_B4
Selects timer B channel 4.
Selects timer B channel 5.
RAPI_TIMER_B5
unsigned int data[2];
/* Get the counter of timer B3 as event counter mode */
__GetEventCounter(RAPI_TIMER_B3, data );
__DestroyEventCounter
49

Advertisement

Table of Contents
loading

Table of Contents