Renesas M16C/62P Group Reference Manual page 43

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

Advertisement

[data2]
[data3]
[data4]
If the timer specification is incorrect, RAPI_FALSE is returned; otherwise, RAPI_TRUE
Return value
is returned.
Functionality
Timer (timer mode)
Reference
__EnableTimer,
If an undefined value is specified in the first argument, operation of the API cannot
Remark
be guaranteed.
Program example
#include "rapi_timer_m16c_62p.h"
void TimerIntFunc( void ){}
void func( void )
{
}
Rev.1.00
2007.11.1
REC10B0002-0100
(Count source)
Specify one from { RAPI_F1, RAPI_F2, RAPI_F8, RAPI_F32,
RAPI_FC32 }. The default value is RAPI_F2.
(Operating states set)
Specify one from { RAPI_TIMER_ON, RAPI_TIMER_OFF }. The
default value is RAPI_TIMER_OFF.
(Pulse output state)
Specify one from { RAPI_PULSE_ON, RAPI_PULSE_OFF }. The
default value is RAPI_PULSE_OFF.
(Gate facility)
Specify one from { RAPI_GATE_L, RAPI_GATE_H }. If omitted,
"No gate facility" is set.
• Specifiable definition values when timer B is used (RAPI_TIMER_B0 to
RAPI_TIMER_B5 specified)
(Count source)
Specify one from { RAPI_F1, RAPI_F2, RAPI_F8, RAPI_F32,
RAPI_FC32 }. The default value is RAPI_F2.
(Operating states set)
Specify one from { RAPI_TIMER_ON, RAPI_TIMER_OFF }. The
default value is RAPI_TIMER_OFF.
Specify the interrupt priority level (0–7) to be set in the interrupt control register.
Specify the value to be set in the timer register in 16 bits.
Specify 0.
__DestroyTimer
/* Set up timer A0 as timer mode */
__CreateTimer(
RAPI_TIMER_A0|RAPI_TIMER_ON|RAPI_F8,
TimerIntFunc );
41
5,
0x80,
0,

Advertisement

Table of Contents
loading

Table of Contents