
8 Apr
2020
8 Apr
'20
10:27 a.m.
Hi,
I'm new to u-boot. I'm trying to store the return value of gpio command to a variable.
I have the following, (switch released): Tegra186 (P2771-0000-500) # gpio input FF1 gpio: pin FF1 (gpio 241) value is 1 Tegra186 (P2771-0000-500) # setexpr X 'gpio input FF1' Tegra186 (P2771-0000-500) # echo $X 0
But I'm expecting X to be 1, the return value of gpio.
If I press the switch I see the value change to 0, so I know the gpio state changes Tegra186 (P2771-0000-500) # gpio input FF1 gpio: pin FF1 (gpio 241) value is 0
Thanks, -Damien