linux查看gpio状态

示例:in 代表输入,out代表输出端口

cat ./sys/kernel/debug/gpio
GPIOs 0-255, platform/40280000.gpio-controller, sprd-ap-gpio:
gpio-50 ( |? ) out lo
gpio-52 ( |ltr558_irq_pin ) in hi
gpio-53 ( |magnetic_reset ) out hi


posted @ 2021-08-20 17:48  zhaogaojian  阅读(1743)  评论(0编辑  收藏  举报