From 63681a736ae765ae6c039429f9a8c0403d9cc4fb Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 5 Jan 2017 18:43:22 -0800 Subject: Link to the Bus Device docs. --- conf.py | 4 +++- docs/drivers.rst | 1 + shared-bindings/nativeio/I2C.c | 8 ++++++++ shared-bindings/nativeio/SPI.c | 8 ++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) 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 + BusDevice Library RGB Displays Analog-to-digital converters: ADS1015 and ADS1115 DS3231 Real-time Clock (Precision RTC) 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 ` 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 ` 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. -- cgit v1.2.3