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 atmel,sam-afec to DT
Move channel description to devicetree for atmel,sam-afec compatible to make the test more readable. Signed-off-by: Benjamin Björnsson <[email protected]>
- Loading branch information
1 parent
89ed720
commit 7938f86
Showing
5 changed files
with
104 additions
and
10 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,26 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright (c) 2023 Benjamin Björnsson <[email protected]> | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/adc/adc.h> | ||
|
||
/ { | ||
zephyr,user { | ||
io-channels = <&afec0 0>; | ||
}; | ||
}; | ||
|
||
&afec0 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
channel@0 { | ||
reg = <0>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_EXTERNAL0"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,resolution = <12>; | ||
}; | ||
}; |
26 changes: 26 additions & 0 deletions
26
tests/drivers/adc/adc_api/boards/sam_e70b_xplained.overlay
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,26 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright (c) 2023 Benjamin Björnsson <[email protected]> | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/adc/adc.h> | ||
|
||
/ { | ||
zephyr,user { | ||
io-channels = <&afec0 0>; | ||
}; | ||
}; | ||
|
||
&afec0 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
channel@0 { | ||
reg = <0>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_EXTERNAL0"; | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright (c) 2023 Benjamin Björnsson <[email protected]> | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/adc/adc.h> | ||
|
||
/ { | ||
zephyr,user { | ||
io-channels = <&afec0 0>; | ||
}; | ||
}; | ||
|
||
&afec0 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
channel@0 { | ||
reg = <0>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_EXTERNAL0"; | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Copyright (c) 2023 Benjamin Björnsson <[email protected]> | ||
*/ | ||
|
||
#include <zephyr/dt-bindings/adc/adc.h> | ||
|
||
/ { | ||
zephyr,user { | ||
io-channels = <&afec0 0>; | ||
}; | ||
}; | ||
|
||
&afec0 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
channel@0 { | ||
reg = <0>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_EXTERNAL0"; | ||
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