This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: GPIO Read

Part Number: AM5728

I am looking for examples of how to read GPIO pins from User Space using Linux SDK 5.0.015

HDMI Hot Plug has been routed to a GPIO pin and I want to setup a timer loop to read every few seconds and then signal the Qt application.  How do you read state of GPIO pins from a C program running in user space?

  • Hi David,

    echo 'gpio_num' > /syc/class/gpio/export

    Then you can use:

    cat /sys/class/gpio/gpio'gpio_num'/direction
    cat /sys/class/gpio/gpio'gpio_num'/value

    Just replace the gpio_num with the gpio number that you want to observe.

    Best Regards,
    Keerthy