Skip to content

Commit 6a8a27e

Browse files
feilongflcarlescufi
authored andcommitted
samples: adc: add support for gd32a503v_eval board.
add support for gd32a503v_eval board. Signed-off-by: YuLong Yao <[email protected]>
1 parent 0f28a8d commit 6a8a27e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright (c) 2023 YuLong Yao <[email protected]>
5+
*/
6+
7+
#include <zephyr/dt-bindings/adc/adc.h>
8+
9+
/ {
10+
zephyr,user {
11+
/* adjust channel number according to pinmux in board.dts */
12+
io-channels = <&adc0 1>;
13+
};
14+
};
15+
16+
&adc0 {
17+
#address-cells = <1>;
18+
#size-cells = <0>;
19+
20+
channel@1 {
21+
reg = <1>;
22+
zephyr,gain = "ADC_GAIN_1";
23+
zephyr,reference = "ADC_REF_INTERNAL";
24+
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
25+
zephyr,resolution = <12>;
26+
};
27+
};

0 commit comments

Comments
 (0)