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

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