Skip to content

Commit 00b152a

Browse files
committed
add pins docstrings and base class init parameters
1 parent 65ce2a6 commit 00b152a

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

adafruit_ads1x15/ads1015.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@
2828

2929
# Pins
3030
P0 = 0
31+
"""Analog Pin 0"""
3132
P1 = 1
33+
"""Analog Pin 1"""
3234
P2 = 2
35+
"""Analog Pin 2"""
3336
P3 = 3
37+
"""Analog Pin 3"""
3438

3539

3640
class ADS1015(ADS1x15):

adafruit_ads1x15/ads1115.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,13 @@
2929

3030
# Pins
3131
P0 = 0
32+
"""Analog Pin 0"""
3233
P1 = 1
34+
"""Analog Pin 1"""
3335
P2 = 2
36+
"""Analog Pin 2"""
3437
P3 = 3
38+
"""Analog Pin 3"""
3539

3640

3741
class ADS1115(ADS1x15):

adafruit_ads1x15/ads1x15.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,21 @@ class Mode:
4848
# values here are masks for setting MODE bit in Config Register
4949
# pylint: disable=too-few-public-methods
5050
CONTINUOUS = 0x0000
51+
"""Continuous Mode"""
5152
SINGLE = 0x0100
53+
"""Single-Shot Mode"""
5254

5355

5456
class ADS1x15:
55-
"""Base functionality for ADS1x15 analog to digital converters."""
57+
"""Base functionality for ADS1x15 analog to digital converters.
58+
59+
:param ~busio.I2C i2c: The I2C bus the device is connected to.
60+
:param float gain: The ADC gain.
61+
:param int data_rate: The data rate for ADC conversion in samples per second.
62+
Default value depends on the device.
63+
:param Mode mode: The conversion mode, defaults to `Mode.SINGLE`.
64+
:param int address: The I2C address of the device.
65+
"""
5666

5767
def __init__(
5868
self,

0 commit comments

Comments
 (0)