Add mock pins docs and tidy up some other bits of the pins docs
This commit is contained in:
Dave Jones
2017-07-14 15:11:59 +01:00
parent 4009bf39df
commit a0d784082d
10 changed files with 171 additions and 52 deletions

View File

@@ -133,6 +133,12 @@ class PiGPIOFactory(PiFactory):
class PiGPIOPin(PiPin):
"""
Pin implementation for the `pigpio`_ library. See :class:`PiGPIOFactory`
for more information.
.. _pigpio: http://abyz.co.uk/rpi/pigpio/
"""
_CONNECTIONS = {} # maps (host, port) to (connection, pi_info)
GPIO_FUNCTIONS = {
'input': pigpio.INPUT,
@@ -290,6 +296,12 @@ class PiGPIOPin(PiPin):
class PiGPIOHardwareSPI(SPI, Device):
"""
Hardware SPI implementation for the `pigpio`_ library. Uses the ``spi_*``
functions from the pigpio API.
.. _pigpio: http://abyz.co.uk/rpi/pigpio/
"""
def __init__(self, factory, port, device):
self._port = port
self._device = device
@@ -386,6 +398,12 @@ class PiGPIOHardwareSPI(SPI, Device):
class PiGPIOSoftwareSPI(SPI, Device):
"""
Software SPI implementation for the `pigpio`_ library. Uses the ``bb_spi_*``
functions from the pigpio API.
.. _pigpio: http://abyz.co.uk/rpi/pigpio/
"""
def __init__(self, factory, clock_pin, mosi_pin, miso_pin, select_pin):
self._closed = True
self._select_pin = select_pin