Skip to content

Commit 13af5ca

Browse files
bjarki-andreasennashif
authored andcommitted
tests: drivers: build_all: add comparator test suite
Add comparator build_all test suite designed to test multiple devicetree overlays and boards for each comparator device driver. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent 4adc924 commit 13af5ca

File tree

7 files changed

+119
-0
lines changed

7 files changed

+119
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.20.0)
5+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
6+
project(build_all_comparator)
7+
8+
target_sources(app PRIVATE src/main.c)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&comp {
8+
main-mode = "DIFF";
9+
psel = "AIN0";
10+
extrefsel = "AIN1";
11+
sp-mode = "HIGH";
12+
isource = "DISABLED";
13+
status = "okay";
14+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&comp {
8+
main-mode = "SE";
9+
psel = "AIN0";
10+
refsel = "INT_1V2";
11+
sp-mode = "HIGH";
12+
th-up = <36>;
13+
th-down = <28>;
14+
isource = "DISABLED";
15+
status = "okay";
16+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&comp {
8+
main-mode = "SE";
9+
psel = "AIN0";
10+
extrefsel = "AIN1";
11+
refsel = "AREF";
12+
sp-mode = "HIGH";
13+
th-up = <36>;
14+
th-down = <28>;
15+
isource = "DISABLED";
16+
status = "okay";
17+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_TEST=y
5+
CONFIG_TEST_USERSPACE=y
6+
CONFIG_COMPARATOR=y
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
int main(void)
8+
{
9+
return 0;
10+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
common:
2+
build_only: true
3+
tags:
4+
- drivers
5+
- comparator
6+
tests:
7+
drivers.build_all.comparator.nrf_comp.diff:
8+
extra_args:
9+
- DTC_OVERLAY_FILE="nrf_comp/diff.overlay"
10+
platform_allow:
11+
- nrf52dk/nrf52810
12+
- nrf52dk/nrf52832
13+
- nrf52833dk/nrf52820
14+
- nrf52833dk/nrf52833
15+
- nrf52840dk/nrf52811
16+
- nrf52840dk/nrf52840
17+
- nrf5340dk/nrf5340/cpuapp
18+
- nrf54h20dk/nrf54h20/cpuapp
19+
- nrf54l15dk/nrf54l15/cpuapp
20+
- nrf9280pdk/nrf9280/cpuapp
21+
drivers.build_all.comparator.nrf_comp.se_aref:
22+
extra_args:
23+
- DTC_OVERLAY_FILE="nrf_comp/se_aref.overlay"
24+
platform_allow:
25+
- nrf52dk/nrf52810
26+
- nrf52dk/nrf52832
27+
- nrf52833dk/nrf52820
28+
- nrf52833dk/nrf52833
29+
- nrf52840dk/nrf52811
30+
- nrf52840dk/nrf52840
31+
- nrf5340dk/nrf5340/cpuapp
32+
- nrf54h20dk/nrf54h20/cpuapp
33+
- nrf54l15dk/nrf54l15/cpuapp
34+
- nrf9280pdk/nrf9280/cpuapp
35+
drivers.build_all.comparator.nrf_comp.se:
36+
extra_args:
37+
- DTC_OVERLAY_FILE="nrf_comp/se.overlay"
38+
platform_allow:
39+
- nrf52dk/nrf52810
40+
- nrf52dk/nrf52832
41+
- nrf52833dk/nrf52820
42+
- nrf52833dk/nrf52833
43+
- nrf52840dk/nrf52811
44+
- nrf52840dk/nrf52840
45+
- nrf5340dk/nrf5340/cpuapp
46+
- nrf54h20dk/nrf54h20/cpuapp
47+
- nrf54l15dk/nrf54l15/cpuapp
48+
- nrf9280pdk/nrf9280/cpuapp

0 commit comments

Comments
 (0)