上下文:我正在尝试使 Waveshare ePaper 的 python 演示代码(如 https://www.waveshare.com/wiki/E-Paper_Driver_HAT )与 Rock64 一起工作。
我已经使用了不同的 python 库(使用 RPi.GPIO-PineA64)并调整了引出线。
Current os (uname -a) is Linux rock64 4.4.126-rockchip-ayufan-239 aarch64 GNU/Linux
Current Error is:
File "/root/test-code/python/epdif.py", line 43, in
SPI = spidev.SpiDev(0, 0)
FileNotFoundError: [Errno 2] No such file or directory
我认为这可能只是一个类似的命令 “enable_dtoverlay i2c0 i2c@ff150000 okay”但我还没有弄清楚魔法词是什么或我需要更改什么。
我查看了设备树的文档,但我无法理解我需要做什么。
类似的悬而未决的问题是:
- https://forum.armbian.com/topic/5951-activate-spidev-on-the-rock64/
- https://forum.pine64.org/showthread.php?tid=5409 [...]
没有理解到我可以采取行动的程度:
答案无效(不再)或超出我的能力范围的类似问题是:
- https://forum.pine64.org/showthread.php?tid=5682 (没用)
- https://forum.pine64.org/showthread.php?tid=4869 (modprobe 对我没用)
- https://forum.pine64.org/showthread.php?tid=5473 (不知道是否相关)
- https://forum.pine64.org/showthread.php?tid=1297&page=5 (其他发行版,对吧?)
提前感谢您的帮助。
最佳答案
如果您不打算使用 Ayufan 的操作系统镜像,我建议您尝试一下 Armbian Xenial (基于 Ubuntu 16.04)然后你可以应用来自 point 4 的解决方案在您的帖子中,正如用户“martinayotte”在该线程中建议的方法收到了积极的反馈,它还提供了一种测试新启用的 SPI 设备是否正常工作的方法。
就我个人而言,我一直在我的 4GB Rock64 上运行 Armbian Xenial,到目前为止没有任何提示,除了 this ,但我认为这是一个更普遍的问题,而不是 Armbian 问题。
此外,我偶然发现了 this post它提供了一个 Pine64 板的解决方案,而不是 Rock64,但也许你可以尝试适应它。
关于python - 如何在 rock64 系统上启用/dev/spidev0,0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51321788/