forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: drivers: adc: adc_api: Move compat gd,gd32-adc to DT
Move channel description to devicetree for gd,gd32-adc compatible to make the test more readable. Signed-off-by: Benjamin Björnsson <[email protected]>
- Loading branch information
1 parent
70b6a17
commit b09423f
Showing
2 changed files
with
27 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright (c) 2023 Benjamin Björnsson <[email protected]> | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/adc/adc.h> | ||
|
||
/ { | ||
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 = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <12>; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters