Page tree
Skip to end of metadata
Go to start of metadata
GPIO信号i2C-6ULX-B位置i2S-6UB信号Linux GPIO编号
GPIO2J4.13SNVS_TAMPER1129
GPIO3J4.15SNVS_TAMPER2130
GPIO4J4.17SNVS_TAMPER3131

配置GPIO2为输出模式,并设置为高电平:

echo 131 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio131/direction
echo 1 > /sys/class/gpio/gpio131/value


配置GPIO2为输入模式,并读取电平状态:

echo 131 > /sys/class/gpio/export
echo in > /sys/class/gpio/gpio131/direction
cat /sys/class/gpio/gpio131/value
  • No labels
Write a comment…