Photonicat GPIO扩展说明: Difference between revisions

From Photonicat Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
Photonicat 的PCBA上提供了一些可扩展的GPIO或 其他功能口,可以用于扩展其他爱好者433Mhz模块或其他应用。
Photonicat 的PCBA上提供了一些可扩展的'''GPIO'''或 '''UART''', '''I2C''', '''USB''', '''PWM''', '''IR''',  其他功能口,可以用于扩展其他爱好者433Mhz模块或其他应用。


[[image:gpio_pins.png|800px]]
[[image:gpio_pins.png|800px]]
Line 5: Line 5:


[[image:Gpio_pins_pic.jpg|500px]]
[[image:Gpio_pins_pic.jpg|500px]]
==gpio control (linux user space)==
<pre>
:/ # 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
</pre>

Latest revision as of 12:55, 25 October 2023

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