Renesas RJJ10J1643-0101 Network Card User Manual


 
Rev.1.01 2007.02.16
RJJ10J1643-0101
75
__CreatePulseWidthModulationMode
Synopsis
<Set pulse width modulation mode>
Boolean __CreatePulseWidthModulationMode(unsigned long data1, unsigned int
data2, unsigned int* data3, void* data4)
data1 Setup data 1 (content differs with MCU type)
data2 Setup data 2 (content differs with MCU type)
data3 Setup data 3 (content differs with MCU type)
func Callback function pointer
(Specify 0 if no callback functions are set.)
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.
(M16C)
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
1
for the count source.
RAPI_F2 Selects f
2
for the count source.
RAPI_F8 Selects f
8
for the count source.
RAPI_F32 Selects f
32
for the count source.
RAPI_FC32 Selects f
C32
for the count source.
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
iIN
pin for the count start condition.
RAPI_EV_
TIMER_AJ
Selects overflow or underflow of timer Aj (j = i – 1, however j = 4 if i = 0)
as the trigger for the timer to start counting.
RAPI_EV_TIMER_
AK
Selects overflow or underflow of timer Ak (k = i + 1, however k = 0 if i =
4) as the trigger for the timer to start counting.
RAPI_EV_TIMER_
B2
Selects overflow or underflow of timer B2 as the trigger for the timer to
start counting.
RAPI_TG_TAIS Only writing 1 to the TA
i
S bit of the TABSR register causes the timer to
start counting.
RAPI_PULSE_ON Selects that pulses are output from TA
iIN
pin. Selectable only when timer
Ai is used.
RAPI_PULSE_OFF Selects that no pulses are output from TA
iIN
pin. Selectable only when
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.