Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The device driver for the STM32H7 GPIO controller is enabled in the kernel config. The gpio-leds and gpio-keys drivers will be enabled and configured in the DTS file, in order to support the USER LED 1/2 and USER BUTTON 1/2 of the STM32H7 SOM.

Verify that the USER LED and USER BUTTON interfaces are functional via the standard gpio-leds and gpio-keys interfaces:

  1. Use the following command to turn on the USER LED 1:

    Code Block
    # echo 1 > /sys/class/leds/user-led-1/brightness
  2. Use the following command to turn off the USER LED 1:

    Code Block
    # echo 0 > /sys/class/leds/user-led-1/brightness
  3. From the Linux shell, start the evtest utility. Then press the USER BUTTON 1 and make sure the evtest has reported the events correctly:

    Code Block
    / # evtest /dev/input/event0
    Event: time 14.575120, type EV_KEY, code KEY_A, value 1
    Event: time 14.575120, type EV_SYN, code SYN_REPORT, value 0
    Event: time 14.728753, type EV_KEY, code KEY_A, value 0
    Event: time 14.728753, type EV_SYN, code SYN_REPORT, value 0

...