what is the /sys/class/gpio/export and `/sys/class/gpio/unexport mechanism and what is the underlying sysfs functionality?

前端 未结 3 1493
情深已故
情深已故 2021-01-26 11:44

Using the legacy sysfs GPIO under Android and Linux the first step in the process is toe export the particular GPIO pins you want to use. And when you are done with

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-26 12:19

    Note: GPIO access via this legacy sysfs interface has been deprecated since version 4.8 of the Linux kernel (https://www.kernel.org/doc/Documentation/gpio/sysfs.txt). It will removed from kernel in 2020. The new way of doing GPIO is via the “descriptor-based” character device ABI (Application Binary Interface). You should do a research for Libgpiod (Library General Purpose Input/Output device) and start at https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/

提交回复
热议问题