-
We follow the Jetson GPIO document : https://docs.nvidia.com/jetson/l4t/#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/adaptation_and_bringup_xavier_nx.html#wwpID0E0NL0HA , so that we can caculate out the GPIO number. Linux GPIO number = (base + (8 * port) + pin)
-
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 ??