Fix all the stuff you broke last night...

In particular the `pi_revision` thing in PiGPIOPin, all the stuff @lurch
picked up in `pins/data.py` (thank goodness *someone's* watching!), and
make all those links pointing to "Notes" point somewhere useful like
"Pin Numbering"...
This commit is contained in:
Dave Jones
2016-08-30 15:16:15 +01:00
parent bb8ea5249d
commit 6f67a973cf
6 changed files with 45 additions and 32 deletions

View File

@@ -12,9 +12,9 @@ devices = [InputDevice(device) for device in list_devices()]
must_have = {i for i in range(1, 32)}
must_not_have = {0}
devices = [
device
for device in devices
for keys in (set(device.capabilities().get(ecodes.EV_KEY, [])),)
dev
for dev in devices
for keys in (set(dev.capabilities().get(ecodes.EV_KEY, [])),)
if must_have.issubset(keys)
and must_not_have.isdisjoint(keys)
]

View File

@@ -9,6 +9,8 @@ library. Please note that all recipes are written assuming Python 3. Recipes
*may* work under Python 2, but no guarantees!
.. _pin_numbering:
Pin Numbering
=============
@@ -18,8 +20,9 @@ configurable.
.. _RPi.GPIO: https://pypi.python.org/pypi/RPi.GPIO
Any pin marked ``GPIO`` in the diagram below can be used for generic
components:
Any pin marked "GPIO" in the diagram below can be used as a pin number. For
example, if an LED was attached to "GPIO17" you would specify the pin number as
17 rather than 11:
.. image:: images/pin_layout.*