You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
337 B

#!/bin/bash
#
# 引脚编号:GPIO2-A3
# Linux中对应的编号: 32*2 + (A-A)*8 + 3 = GPIO67
#
# 配置GPIO1_D4
if [ ! -d /sys/class/gpio/gpio60 ]; then
echo 60 >/sys/class/gpio/export
fi
echo out >/sys/class/gpio/gpio60/direction
# 复位下芯片
echo 0 >/sys/class/gpio/gpio60/value
sleep 1
echo 1 >/sys/class/gpio/gpio60/value