summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott.shawcroft@gmail.com>2017-01-05 18:43:22 -0800
committerScott Shawcroft <scott.shawcroft@gmail.com>2017-01-05 18:43:22 -0800
commit63681a736ae765ae6c039429f9a8c0403d9cc4fb (patch)
tree3ba48d12fa9bc839a50b6f2696c9b116d2fc63c5
parent00a507c8750729506926fe18037a285f6676c556 (diff)
Link to the Bus Device docs.
-rw-r--r--conf.py4
-rw-r--r--docs/drivers.rst1
-rw-r--r--shared-bindings/nativeio/I2C.c8
-rw-r--r--shared-bindings/nativeio/SPI.c8
4 files changed, 20 insertions, 1 deletions
diff --git a/conf.py b/conf.py
index 07c1aa027..8c41c9365 100644
--- a/conf.py
+++ b/conf.py
@@ -319,4 +319,6 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'http://docs.python.org/': None}
+intersphinx_mapping = {'http://docs.python.org/': None,
+ 'https://circuitpython.readthedocs.io/projects/bus_device/en/latest/': None,
+ 'https://circuitpython.readthedocs.io/projects/register/en/latest/': None}
diff --git a/docs/drivers.rst b/docs/drivers.rst
index f2ddb640d..ea73f81eb 100644
--- a/docs/drivers.rst
+++ b/docs/drivers.rst
@@ -7,6 +7,7 @@ with CircuitPython and may or may not work with `MicroPython <https://micropytho
.. toctree::
Register Library <https://circuitpython.readthedocs.io/projects/register/en/latest/>
+ BusDevice Library <https://circuitpython.readthedocs.io/projects/bus_device/en/latest/>
RGB Displays <http://micropython-rgb.readthedocs.io/>
Analog-to-digital converters: ADS1015 and ADS1115 <http://micropython-ads1015.readthedocs.io/>
DS3231 Real-time Clock (Precision RTC) <https://circuitpython.readthedocs.io/projects/ds3231/en/latest/>
diff --git a/shared-bindings/nativeio/I2C.c b/shared-bindings/nativeio/I2C.c
index 2aca80cf6..3e608dc53 100644
--- a/shared-bindings/nativeio/I2C.c
+++ b/shared-bindings/nativeio/I2C.c
@@ -42,6 +42,14 @@
//| physical level it consists of 2 wires: SCL and SDA, the clock and data
//| lines respectively.
//|
+//| .. seealso:: Using this class directly requires careful lock management.
+//| Instead, use :class:`~adafruit_bus_device.i2c_device.I2CDevice` to
+//| manage locks.
+//|
+//| .. seealso:: Using this class to directly read registers requires manual
+//| bit unpacking. Instead, use an existing driver or make one with
+//| :ref:`Register <register-module-reference>` data descriptors.
+//|
//| :param ~microcontroller.Pin scl: The clock pin
//| :param ~microcontroller.Pin sda: The data pin
//| :param int frequency: The clock frequency
diff --git a/shared-bindings/nativeio/SPI.c b/shared-bindings/nativeio/SPI.c
index df17b5c63..004c55e4e 100644
--- a/shared-bindings/nativeio/SPI.c
+++ b/shared-bindings/nativeio/SPI.c
@@ -52,6 +52,14 @@
//|
//| Construct an SPI object on the given pins.
//|
+//| .. seealso:: Using this class directly requires careful lock management.
+//| Instead, use :class:`~adafruit_bus_device.spi_device.SPIDevice` to
+//| manage locks.
+//|
+//| .. seealso:: Using this class to directly read registers requires manual
+//| bit unpacking. Instead, use an existing driver or make one with
+//| :ref:`Register <register-module-reference>` data descriptors.
+//|
//| :param ~microcontroller.Pin clock: the pin to use for the clock.
//| :param ~microcontroller.Pin MOSI: the Master Out Slave In pin.
//| :param ~microcontroller.Pin MISO: the Master In Slave Out pin.