1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests/periph/gpio_ll
Marian Buschsieweke af61cf40e3
tests/periph/gpio_ll: add delays to test_switch_dir()
In all other tests we added a delay after writing to the output buffer
of GPIO A before expected the input buffer of GPIO B (connected to A)
to reflect the change, but not in test_switch_dir().

This adds the delay here as well to make the test more robust in regard
to GPIO peripherals that react not as fast as the CPU can query them.
2024-08-08 16:22:36 +02:00
..
tests-with-config tests: move periph_ applications to periphs subdirectory 2023-05-06 15:29:51 +02:00
.gitignore tests: move periph_ applications to periphs subdirectory 2023-05-06 15:29:51 +02:00
main.c tests/periph/gpio_ll: add delays to test_switch_dir() 2024-08-08 16:22:36 +02:00
Makefile drivers/periph_gpio_ll: change API to access GPIO ports 2024-08-02 09:55:24 +02:00
Makefile.ci drivers/periph_gpio_ll: change API to access GPIO ports 2024-08-02 09:55:24 +02:00
README.md tests/periph/gpio_ll: test for features matching 2024-01-23 15:03:34 +01:00

Test for periph/gpio_ll

This application will use two output and two input GPIOs, which have to be connected via a jumper wire. The test will change the value of the two pins output pins and use the input pins to read the value back in. If the value read doesn't match the expected result, the test aborts and fails.

If IRQ support is provided, the test will additionally walk through every IRQ configuration for the first GPIO pin given and iterate over any trigger condition possible. It will check that edge trigger and (if supported) level trigger IRQs trigger exactly on the configured triggers.

Configuration

Configure in the Makefile or set via environment variables the number of the output GPIO port to use via the PORT_OUT variable. The PIN_OUT_0 and PIN_OUT_1 variables select the pins to use within that GPIO port. The input GPIO port is set via PORT_IN. Both PORT_IN == PORT_OUT and PORT_IN != PORT_OUT is valid. The input pin number within PORT_IN are set via PIN_IN_0 and PIN_IN_1. PIN_IN_0 has to be wired to PIN_OUT_0, and PIN_IN_1 to PIN_OUT_1.

Expected Failures

Implementations are allowed to not electrically disconnect GPIO pins in state GPIO_DISCONNECT. The test will however test for pins to be electrically disconnected. For every MCU supported by GPIO LL so far at least some pins can be electrically disconnected. You might need to change the GPIO pins tested if the test for disconnected GPIOs being also electrically disconnected.

When features such as periph_gpio_ll_pull_up or periph_gpio_ll_open_drain are provided, this test expect those to be available on the tested pins. If those features are not available on all pins, suitable pins need to be selected for the test to pass.