Skip to content

Commit

Permalink
tests: drivers: comparator: gpio_loopback: extend to xg24 and xg29 bo…
Browse files Browse the repository at this point in the history
…ards

Signed-off-by: Christian Galante <[email protected]>
  • Loading branch information
silabs-chgalant committed Jan 22, 2025
1 parent 41e589c commit be20548
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/drivers/comparator/gpio_loopback/boards/xg24_dk2601b.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2024 Silicon Labs
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/dt-bindings/gpio/gpio.h>
#include <zephyr/dt-bindings/comparator/silabs/silabs-acmp.h>

/ {
aliases {
test-comp = &acmp0;
};

zephyr,user {
test-gpios = <&gpioc 3 GPIO_ACTIVE_HIGH>;
};

};

&acmp0 {
status = "okay";
hysteresis-mode = "disabled";
accuracy-mode = "high";
input-range = "full";
input-positive = <ACMP_INPUT_PC3>;
input-negative = <ACMP_INPUT_VREFDIV1V25>;
vref-divider = <63>;
};

31 changes: 31 additions & 0 deletions tests/drivers/comparator/gpio_loopback/boards/xg29_rb4412a.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (c) 2024 Silicon Labs
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/dt-bindings/gpio/gpio.h>
#include <zephyr/dt-bindings/comparator/silabs/silabs-acmp.h>

/ {
aliases {
test-comp = &acmp0;
};

zephyr,user {
test-gpios = <&gpioc 3 GPIO_ACTIVE_HIGH>;
};

};

&acmp0 {
status = "okay";
hysteresis-mode = "disabled";
accuracy-mode = "high";
input-range = "full";
input-positive = <ACMP_INPUT_PC3>;
input-negative = <ACMP_INPUT_VREFDIV1V25>;
vref-divider = <63>;
};


4 changes: 4 additions & 0 deletions tests/drivers/comparator/gpio_loopback/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ common:
- drivers
- comparator
tests:
drivers.comparator.gpio_loopback.silabs_acmp:
platform_allow:
- xg24_dk2601b
- xg29_rb4412a
drivers.comparator.gpio_loopback.mcux_acmp:
platform_allow:
- frdm_ke15z
Expand Down

0 comments on commit be20548

Please sign in to comment.