Photonicat GPIO扩展说明

From Photonicat Wiki
Jump to navigation Jump to search

Photonicat 的PCBA上提供了一些可扩展的GPIOUART, I2C, USB, PWM, IR, 其他功能口,可以用于扩展其他爱好者433Mhz模块或其他应用。

Gpio pins.png


Gpio pins pic.jpg


gpio control (linux user space)

:/ # ls /sys/class/gpio/
export     gpiochip128  gpiochip32   gpiochip64  unexport
gpiochip0  gpiochip255  gpiochip500  gpiochip96
:/ # echo 157 > /sys/class/gpio/export
:/ # ls /sys/class/gpio/
export   gpiochip0    gpiochip255  gpiochip500  gpiochip96
gpio157  gpiochip128  gpiochip32   gpiochip64   unexport
:/ # ls /sys/class/gpio/gpio157
active_low  device  direction  edge  power  subsystem  uevent  value
:/ # cat /sys/class/gpio/gpio157/direction
in
:/ # cat /sys/class/gpio/gpio157/value
0