User`s manual
RX62N Group, RX621 Group 4. Library Reference
3) R_DAC_10_Write
Synopsis
Write data to a DAC channel.
Prototype
bool R_DAC_10_Write(
uint8_t data1,
// Channel selection
uint16_t data2,
// Output value
uint16_t data3
// Output value
);
Description
Write data to the selected DAC channel(s).
[data1]
Select the DAC channel output to be modified.
PDL_DAC_10_CHANNEL_0
Select channel 0
PDL_DAC_10_CHANNEL_1
Select channel 1
[data2]
The value to be written to the channel 0 output register. Ignored if the channel is not selected.
[data3]
The value to be written to the channel 1 output register. Ignored if the channel is not selected.
Return value
True if all parameters are valid; otherwise false.
Category
DAC
Reference
R_DAC_10_Create
Remarks
•
Refer to the data alignment that was selected when R_DAC_10_Create was called.
•
Do not select channel 0 for 100-pin package.
Program example
/* RPDL definitions */
#include "r_pdl_dac_10.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
void func(void)
{
/* Write new data to DAC channel 0 */
R_DAC_10_Write(
PDL_DAC_10_CHANNEL_0,
100,
0
);
}
R20UT0084EE0112 Rev.1.12 Page 4-230
July. 16, 2014