Skip to content

Commit 240fe51

Browse files
authored
Merge pull request #77 from tcfranks/main
Proposed docstring corrections
2 parents 61ca587 + d96ff21 commit 240fe51

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

adafruit_lis3dh.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ class LIS3DH:
9696
"""Driver base for the LIS3DH accelerometer.
9797
9898
:param digitalio.DigitalInOut int1: `digitalio.DigitalInOut` connected to
99-
the LIS3DH INT1 interrupt pin
99+
the LIS3DH INT interrupt pin
100100
:param digitalio.DigitalInOut int2: `digitalio.DigitalInOut` connected to
101-
the LIS3DH INT2 interrupt pin
101+
the LIS3DH I2 interrupt pin (only on STEMMA QT model)
102102
"""
103103

104104
def __init__(
@@ -440,9 +440,8 @@ def _write_register_byte(self, register: int, value: int) -> None:
440440
class LIS3DH_SPI(LIS3DH):
441441
"""Driver for the LIS3DH accelerometer connected over SPI.
442442
443-
:param ~busio.I2C i2c: The I2C bus the LIS3DH is connected to.
444-
:param address: The I2C device address. Defaults to :const:`0x18`
445-
443+
:param ~busio.SPI spi: The SPI bus the LIS3DH is connected to.
444+
:param digitalio.DigitalInOut cs: The pin connected to the LIS3DH CS pin
446445
447446
**Quickstart: Importing and using the device**
448447
@@ -458,8 +457,9 @@ class LIS3DH_SPI(LIS3DH):
458457
459458
.. code-block:: python
460459
461-
i2c = board.SPI()
462-
lis3dh = adafruit_lis3dh.LIS3DH_SPI(spi)
460+
spi = board.SPI()
461+
cs = digitalio.DigitalInOut(board.D5) # Set to correct CS pin!
462+
lis3dh = adafruit_lis3dh.LIS3DH_SPI(spi, cs)
463463
464464
Now you have access to the :attr:`acceleration` attribute
465465

0 commit comments

Comments
 (0)