zsw 发表于 2020-3-2 10:31:15

shell

#!/bin/bash
# gpio list gpio (bank-1)*32 + nr
for test in 118 119 120 137 136 12
do
echo Exporting pin $test.
echo $test> /sys/class/gpio/export
echo Setting pin $1.
echo out > /sys/class/gpio/gpio$test/direction
echo $1 > /sys/class/gpio/gpio$test/value
echo $test> /sys/class/gpio/unexport
done
echo complete



里面这两句
echo Exporting pin $test.
echo Setting pin $1.   是什么意思



zhichao 发表于 2020-3-2 11:45:28

从网上查阅的,主要是在字符串中方便识别
页: [1]
查看完整版本: shell