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 nxp,kinetis-adc16 to DT
Move channel description to devicetree for nxp,kinetis-adc16 compatible to make the test more readable. Signed-off-by: Benjamin Björnsson <[email protected]>
- Loading branch information
1 parent
34dad8c
commit c3c9ce5
Showing
8 changed files
with
190 additions
and
73 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,28 @@ | ||
/* | ||
* 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 = <&adc0 14>; | ||
}; | ||
}; | ||
|
||
&adc0 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "okay"; | ||
|
||
channel@e { | ||
reg = <14>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,input-positive = <0>; | ||
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,27 @@ | ||
/* | ||
* 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 = <&adc0 14>; | ||
}; | ||
}; | ||
|
||
&adc0 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "okay"; | ||
|
||
channel@e { | ||
reg = <14>; | ||
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
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 { | ||
io-channels = <&adc0 15>; | ||
}; | ||
}; | ||
|
||
&adc0 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "okay"; | ||
|
||
channel@f { | ||
reg = <15>; | ||
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
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 { | ||
io-channels = <&adc0 12>; | ||
}; | ||
}; | ||
|
||
&adc0 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "okay"; | ||
|
||
channel@c { | ||
reg = <12>; | ||
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
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 { | ||
io-channels = <&adc0 3>; | ||
}; | ||
}; | ||
|
||
&adc0 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "okay"; | ||
|
||
channel@3 { | ||
reg = <3>; | ||
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
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 { | ||
io-channels = <&adc0 16>; | ||
}; | ||
}; | ||
|
||
&adc0 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "okay"; | ||
|
||
channel@10 { | ||
reg = <16>; | ||
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
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 { | ||
io-channels = <&adc0 1>; | ||
}; | ||
}; | ||
|
||
&adc0 { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "okay"; | ||
|
||
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