Createpulsewidthmodulationmode - Renesas M16C/62P Group Reference Manual

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

Advertisement

__CreatePulseWidthModulationMode

Synopsis
<Set pulse width modulation mode>
Boolean __CreatePulseWidthModulationMode(unsigned long data1, unsigned int
data2, unsigned int* data3, void* data4)
Description
Sets a specified timer to pulse width modulation mode.
[data1]
For data1, the following definition values can be set. To set multiple definition values at
the same time, use the symbol "|" to separate each specified value.
Rev.1.00
2007.11.1
REC10B0002-0100
data1
Setup data 1
data2
Setup data 2
data3
Setup data 3
func
Callback function pointer
(Specify 0 if no callback functions are set.)
RAPI_TIMER_A0
Uses timer A channel 0.
RAPI_TIMER_A1
Uses timer A channel 1.
RAPI_TIMER_A2
Uses timer A channel 2.
RAPI_TIMER_A3
Uses timer A channel 3.
RAPI_TIMER_A4
Uses timer A channel 4.
RAPI_F1
Selects f
RAPI_F2
Selects f
RAPI_F8
Selects f
RAPI_F32
Selects f
RAPI_FC32
Selects f
RAPI_TIMER_ON
Sets the timer to start operating in __CreatePulseWidthModulationMode.
RAPI_TIMER_OFF
Sets the timer to stop operating in __CreatePulseWidthModulationMode.
RAPI_TG_TAIIN
Selects external trigger input from TA
RAPI_EV_
Selects overflow or underflow of timer Aj (j = i – 1, however j = 4 if i = 0)
TIMER_AJ
as the trigger for the timer to start counting.
RAPI_EV_TIMER_
Selects overflow or underflow of timer Ak (k = i + 1, however k = 0 if i =
AK
4) as the trigger for the timer to start counting.
RAPI_EV_TIMER_
Selects overflow or underflow of timer B2 as the trigger for the timer to
B2
start counting.
RAPI_TG_TAIS
Only writing 1 to the TA
start counting.
RAPI_PULSE_ON
Selects that pulses are output from TA
Ai is used.
RAPI_PULSE_OFF Selects that no pulses are output from TA
timer Ai is used.
RAPI_PWM_16
Selects operation as a 16-bit pulse width modulator.
RAPI_PWM_8
Selects operation as an 8-bit pulse width modulator.
RAPI_RISING
Selects the rising edge of TA
for the count source.
1
for the count source.
2
for the count source.
8
for the count source.
32
for the count source.
C32
S bit of the TABSR register causes the timer to
i
pin input signal as active edge.
iIN
50
pin for the count start condition.
iIN
pin. Selectable only when timer
iIN
pin. Selectable only when
iIN

Advertisement

Table of Contents
loading

Table of Contents