Jetson GPIO control API check

  1. We follow the Jetson GPIO document : , so that we can caculate out the GPIO number. Linux GPIO number = (base + (8 * port) + pin)

  2. We use following command to control the GPIOs.
    echo 424 > /sys/class/gpio/export // export GPIO 424
    echo out > /sys/class/gpio/gpio424/direction // Set GPIO 424 direction to output
    echo 1 > /sys/class/gpio/gpio424/value // Set GPIO 424 to high
    echo 0 > /sys/class/gpio/gpio424/value // Set GPIO 424 to low

But we want to make our C programming code to control the GPIOs as upper command. So that we want to check is there some APIs our C code can call to control the GPIOs ??

hello fanjiaheng,

please refer to Topic 144550, for several ways to access GPIOs. such as, kernel APIs, python scripts, C++ samples.