Skip to content

Commit 984b246

Browse files
Marek Matejfabiobaltieri
authored andcommitted
tests: dac: esp32: API test for CI
Add base DAC test used during CI. Signed-off-by: Marek Matej <[email protected]>
1 parent 85b8795 commit 984b246

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright 2022 Espressif (Shanghai)
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&dac {
8+
status = "okay";
9+
};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright 2022 Espressif (Shanghai)
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&dac {
8+
status = "okay";
9+
};

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,13 @@
6060
#define DAC_RESOLUTION 12
6161
#define DAC_CHANNEL_ID 0
6262

63+
#elif defined(CONFIG_BOARD_ESP32) || \
64+
defined(CONFIG_BOARD_ESP32S2_SAOLA)
65+
66+
#define DAC_DEVICE_NODE DT_NODELABEL(dac)
67+
#define DAC_RESOLUTION 12
68+
#define DAC_CHANNEL_ID 0
69+
6370
#else
6471
#error "Unsupported board."
6572
#endif

tests/drivers/dac/dac_api/testcase.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ tests:
99
nucleo_f767zi nucleo_g071rb nucleo_g474re nucleo_h743zi nucleo_l073rz
1010
nucleo_l152re disco_l475_iot1 nucleo_l552ze_q stm32l562e_dk
1111
b_u585i_iot02a nucleo_wl55jc
12+
esp32 esp32s2_saola
1213
depends_on: dac

0 commit comments

Comments
 (0)