I’m new to embeded system, and I wonder how I can use the API for GPIOs, such as
gpio_set_value(num,0); gpio_set_value(num,1);
when I type:
gpio_set_value(478,1)
It returns:
bash: syntax error near unexpected token '478,1'
what should I fill in at “num”
We have
- JETPACK 4.5 [L4T 32.5.1]
nvidia@nvidia-desktop:~$ sudo cat /sys/kernel/debug/gpio
gpiochip2: GPIOs 240-247, parent: platform/max77620-gpio, max77620-gpio, can sleep:
gpio-246 ( |gpio_default ) out hi
gpio-247 ( |gpio_default ) out hi
gpiochip1: GPIOs 248-287, parent: platform/c2f0000.gpio, tegra-gpio-aon:
gpio-253 ( |pex-refclk-sel-low ) out lo
gpio-265 ( |vdd-otg1-5v ) out hi
gpio-266 ( |vdd-usb2-5v ) out hi
gpio-267 ( |vdd-hdmi-5v0 ) out hi
gpio-284 ( |power-key ) in hi
gpiochip0: GPIOs 288-511, parent: platform/2200000.gpio, tegra-gpio:
gpio-336 ( |force-recovery ) in hi
gpio-338 ( |vdd-sdmmc1-sw ) out lo
gpio-339 ( |wifi-enable ) out hi
gpio-378 ( |pcie_wake ) in hi
gpio-385 ( |hdmi2.0_hpd ) in lo
gpio-392 ( |avdd-cam-2v8 ) out lo
gpio-419 ( |external-connection:) in hi
gpio-424 ( |vdd-sdmmc3-sw ) out lo
gpio-425 ( |eqos_phy_reset ) out hi
gpio-428 ( |j12-pin4 ) out lo
gpio-429 ( |j12-pin3 ) out lo
gpio-478 ( |j12-pin8 ) out lo
gpio-479 ( |j12-pin7 ) out lo
gpio-480 ( |j10-pin5 ) out lo
gpio-481 ( |j10-pin6 ) out lo
gpio-482 ( |j10-pin7 ) out lo
gpio-483 ( |j10-pin8 ) out lo
gpio-489 ( |external-connection:) in hi
I want to chage the gpio478 level form low to high for simple test, how can I get it