k1x-factorytest/utils/gpio.sh
2024-04-30 17:48:07 +08:00

8 lines
177 B
Bash
Executable file

#!/bin/bash -e
for gpio in "$@"
do
echo $gpio > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio$gpio/direction
echo 1 > /sys/class/gpio/gpio$gpio/value
done