Skip to content

Commit c18b062

Browse files
khoa-nguyen-18fabiobaltieri
authored andcommitted
tests: drivers: dac: Add support to test DAC on RA devices
Add support ek_ra8m1, ek_ra8d1, mck_ra8t1, ek_ra6m5, ek_ra6m4, ek_ra6m3, ek_ra6m2, ek_ra6m1, ek_ra6e2, fpb_ra6e2, fpb_ra6e1, ek_ra4m3, ek_ra4m2, ek_ra4e2, ek_ra2a1 to test: - zephyr/tests/drivers/dac/dac_api - zephyr/tests/drivers/dac/dac_loopback (except ek_ra2a1) Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
1 parent d42f10e commit c18b062

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

tests/drivers/dac/dac_api/src/test_dac.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@
9999
#define DAC_RESOLUTION 10
100100
#define DAC_CHANNEL_ID 0
101101

102+
#elif DT_HAS_COMPAT_STATUS_OKAY(renesas_ra_dac)
103+
104+
#define DAC_DEVICE_NODE DT_NODELABEL(dac0)
105+
#define DAC_RESOLUTION 12
106+
#define DAC_CHANNEL_ID 0
107+
102108
#else
103109
#error "Unsupported board."
104110
#endif

tests/drivers/dac/dac_loopback/src/test_dac.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,19 @@
165165
#define ADC_CHANNEL_ID 1
166166
#define ADC_1ST_CHANNEL_INPUT NRF_SAADC_INPUT_AIN1
167167

168+
#elif DT_HAS_COMPAT_STATUS_OKAY(renesas_ra_dac)
169+
170+
#define DAC_DEVICE_NODE DT_NODELABEL(dac0)
171+
#define DAC_RESOLUTION 12
172+
#define DAC_CHANNEL_ID 0
173+
174+
#define ADC_DEVICE_NODE DT_NODELABEL(adc0)
175+
#define ADC_RESOLUTION 12
176+
#define ADC_GAIN ADC_GAIN_1
177+
#define ADC_REFERENCE ADC_REF_INTERNAL
178+
#define ADC_ACQUISITION_TIME ADC_ACQ_TIME_DEFAULT
179+
#define ADC_CHANNEL_ID 0
180+
168181
#else
169182
#error "Unsupported board."
170183
#endif

0 commit comments

Comments
 (0)