SC200L GPIO Control on user space

Hi team,

I want to control leds on user space with SC200L chip board SMART-EVB-G5. It has 8 leds, I try with the second led on the board SMART-EVB-G5, it seems like be connected with pin number 119 (GPIO_91) in SC200L. I use these command to control it:

echo 119 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio119/direction
echo 1 > /sys/class/gpio/gpio119/value

But the export cannot creat gpio119 in gpio folder, so I cannot control this led.
Please help me to control it,

Thanks

HI, LanLan:
For SC200L, the GPIO offset is 160.
The releationship between LED(1-8) and GPIO is as follows:
1: GPIO92 2: GPIO91 3:GPIO93 4: GPIO90
5: GPIO8 6:GPIO29 7:GPIO23 8: GPIO121
If you want to operate LED2, you can do as follows:
adb shell
su
cd /sys/class/gpio
echo 251 > export //251=160+91
cd gpio251
echo out > direction
echo 1 > value
Then you can see LED2 is on!!!

Thanks.

Thanks, I run commands but the led doesn’t active. Do I lack any config steps? modify device tree for example?

No need to modify device tree.
You can try LED2~LED5.

I can control led1, led5 and led8. 5 other leds do not work, what happen with them?
image

These are just for test. I also can’t test LED6&7.

Okey, thank for your help.