RK3399Pro 操作控制GPIO

RK3399Pro烧录的Debian10 内核比较新,如下:

toybrick@debian10:~$ cat /proc/version
Linux version 4.4.189 (kfx@inno) (gcc version 6.3.1 20170404 (Linaro GCC 6.3-2017.05) ) #93 SMP Tue Nov 26 16:40:07 CST 2019
toybrick@debian10:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
toybrick@debian10:~$ file /bin/bash
/bin/bash: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=b11533bde88bb45ef2891fbf3ad86c1869ed3a41, stripped
toybrick@debian10:~$

该内核很强大了,可以通过sysfs方式来操作GPIO了。

接口目录在"/sys/class/gpio"文件夹下;

 

官方的文档有GPIO Sysfs Interface for Userspace,

你可能感兴趣的:(RK3399Pro)