diff --git a/tests/drivers/adc/adc_api/boards/gd32a503v_eval.overlay b/tests/drivers/adc/adc_api/boards/gd32a503v_eval.overlay new file mode 100644 index 00000000000000..33be52c9309680 --- /dev/null +++ b/tests/drivers/adc/adc_api/boards/gd32a503v_eval.overlay @@ -0,0 +1,27 @@ +/* + * SPDX-License-Identifier: Apache-2.0 + * + * Copyright (c) 2023 Benjamin Björnsson + */ + +#include + +/ { + zephyr,user { + /* adjust channel number according to pinmux in board.dts */ + io-channels = <&adc0 1>; + }; +}; + +&adc0 { + #address-cells = <1>; + #size-cells = <0>; + + channel@1 { + reg = <1>; + zephyr,gain = "ADC_GAIN_1"; + zephyr,reference = "ADC_REF_INTERNAL"; + zephyr,acquisition-time = ; + zephyr,resolution = <12>; + }; +}; diff --git a/tests/drivers/adc/adc_api/src/test_adc.c b/tests/drivers/adc/adc_api/src/test_adc.c index 05bfb34d3a61c3..b49b6339358ab9 100644 --- a/tests/drivers/adc/adc_api/src/test_adc.c +++ b/tests/drivers/adc/adc_api/src/test_adc.c @@ -19,15 +19,6 @@ #define ADC_1ST_CHANNEL_ID 0 #define ADC_2ND_CHANNEL_ID 1 -#elif defined(CONFIG_BOARD_GD32A503V_EVAL) - -#define ADC_DEVICE_NODE DT_INST(0, gd_gd32_adc) -#define ADC_RESOLUTION 12 -#define ADC_GAIN ADC_GAIN_1 -#define ADC_REFERENCE ADC_REF_INTERNAL -#define ADC_ACQUISITION_TIME ADC_ACQ_TIME_DEFAULT -#define ADC_1ST_CHANNEL_ID 1 - #elif defined(CONFIG_BOARD_SAM_E70_XPLAINED) || \ defined(CONFIG_BOARD_SAM_V71_XULT)