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 ff727f8f90
tests/periph_gpio_ll: Minor improvement
Use a custom expect() that just spins in an endless loop instead of
panicking. The test isn't run automatically anyway, as it requires
connecting two GPIOs with jumper wires; but when run manually it is
helpful to not kill RIOT to also get the stdio output of the exact
point where the test fails (e.g. USB CDC ACM doesn't like panic()).
2023-03-20 14:14:07 +01:00
..
tests-with-config tests: Add tests for periph/gpio_ll 2022-04-22 08:39:04 +02:00
.gitignore tests: Add tests for periph/gpio_ll 2022-04-22 08:39:04 +02:00
main.c tests/periph_gpio_ll: Minor improvement 2023-03-20 14:14:07 +01:00
Makefile tests/periph_gpio_ll: use MCU instead of CPU_FAM for ESP32x SoC 2022-07-22 06:25:06 +02:00
README.md tests: Add tests for periph/gpio_ll 2022-04-22 08:39:04 +02: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.