Python - How can I read input from a device using ioctl or spidev?
问题 I have a hardware device and the vendor that supplied it gave a bit of C code to listen for button presses which uses ioctl . The device has an SSD1289 controller. Push buttons require no additional pins, their status canbe read over SPI. That's what I want, to read which push button was pressed. I am trying to replicate this script in Python for my own application, but the _IOR and ioctl requirements are throwing me off. #include <stdio.h> #include <sys/types.h> #include <fcntl.h> #include