metachris / RPIO

RPIO is a GPIO toolbox for the Raspberry Pi.
https://pypi.python.org/pypi/RPIO
GNU Lesser General Public License v3.0
331 stars 147 forks source link

Raspberry CM3 module unsupported. #112

Open amontefusco opened 5 years ago

amontefusco commented 5 years ago

I installed RPIO (branch v2) on an ACME System CM3-panel board running the last Raspbian Lite available. As per the name, this card is powered by a CM3 module (lite). Running the rpio --sysinfo, I get this error:

pi@cm3panel:/tmp/RPIO $ sudo rpio --sysinfo
Traceback (most recent call last):
  File "/usr/local/bin/rpio", line 4, in <module>
    __import__('pkg_resources').run_script('RPIO==2.0.0b1', 'rpio')
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 739, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1501, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/RPIO-2.0.0b1-py2.7-linux-armv7l.egg/EGG-INFO/scripts/rpio", line 353, in <module>

  File "/usr/local/lib/python2.7/dist-packages/RPIO-2.0.0b1-py2.7-linux-armv7l.egg/EGG-INFO/scripts/rpio", line 346, in main

  File "build/bdist.linux-armv7l/egg/RPIO/__init__.py", line 186, in sysinfo
KeyError: 'a020a0'

Looking to the code it seems that such revision code is not considered at all into the code. So, I forced in cpuinfo.c to return 3 but no joy, the examples seem to work but I cannot measure any PIN voltage change.

Probably the ID to PIN table should be reworked as well. Any suggestion on where info about this mapping can be found?

oriolgalceran commented 4 years ago

Hey,

Did you manage to fix this?