Skip to content

Commit

Permalink
doc new attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
2bndy5 committed Mar 19, 2024
1 parent 548f1d0 commit 79e9808
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,14 @@ same version of CPython, CPU architecture, and C standard lib.
- ``ARCH`` is the architecture type of the CPU. This corresponds to the compiler used.
On Raspberry Pi OS (32 bit), this will be ``armv7l``.

.. _using-specific-driver:

Using a specific RF24 driver
----------------------------

By default, this package is built using the RF24 driver SPIDEV. If you want to build the
package using a different RF24 driver (like ``RPi``, ``MRAA``, ``wiringPi``, etc), then
it is necessary to use an environment variable containing additional arguments for CMake:
By default, this package is built using the RF24 driver ``SPIDEV``. If you want to build the
package using a different RF24 driver (like ``RPi``, ``MRAA``, ``wiringPi``, or ``pigpio``),
then it is necessary to use an environment variable containing additional arguments for CMake:

.. code-block:: bash
Expand Down
13 changes: 13 additions & 0 deletions docs/rf24_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ RF24 API

.. automodule:: pyrf24.rf24

.. autoattribute:: pyrf24.rf24.RF24_DRIVER

This `str` describes the backend driver used to build the pyrf24 package.
If installed from pypi, then this value should be ``"SPIDEV"``.

All other drivers imply that the pyrf24 package was built from source
:ref:`using-specific-driver`.

.. hint::

Use this attribute to determine programmatically which pin numbers to use.
Drivers like ``wiringPi`` and ``MRAA`` use their own pin numbering scheme.

Enum classes
------------

Expand Down

0 comments on commit 79e9808

Please sign in to comment.