Skip to content

Commit f765ec7

Browse files
committed
updated info docstring; docstring formatting
1 parent ff551bd commit f765ec7

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

adafruit_mcp4725.py

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,22 @@
2424
========================================================
2525
2626
CircuitPython module for the MCP4725 digital to analog converter. See
27-
examples/simpletest.py for a demo of the usage.
27+
examples/mcp4725_simpletest.py for a demo of the usage.
2828
2929
* Author(s): Tony DiCola
30+
31+
Implementation Notes
32+
--------------------
33+
34+
**Hardware:**
35+
36+
* Adafruit `MCP4725 Breakout Board - 12-Bit DAC w/I2C Interface
37+
<https://www.adafruit.com/product/935>`_ (Product ID: 935)
38+
39+
**Software and Dependencies:**
40+
41+
* Adafruit CircuitPython firmware for the ESP8622 and M0-based boards:
42+
https://github.com/adafruit/circuitpython/releases
3043
"""
3144
from micropython import const
3245

@@ -40,12 +53,13 @@
4053

4154

4255
class MCP4725:
43-
"""MCP4725 12-bit digital to analog converter. This class has a similar
44-
interface as the CircuitPython AnalogOut class and can be used in place
45-
of that module.
56+
"""
57+
MCP4725 12-bit digital to analog converter. This class has a similar
58+
interface as the CircuitPython AnalogOut class and can be used in place
59+
of that module.
4660
47-
:param ~busio.I2C i2c: The I2C bus.
48-
:param int address: The address of the device if set differently from the default.
61+
:param ~busio.I2C i2c: The I2C bus.
62+
:param int address: The address of the device if set differently from the default.
4963
"""
5064

5165

@@ -97,12 +111,13 @@ def _read(self):
97111

98112
@property
99113
def value(self):
100-
"""The DAC value as a 16-bit unsigned value compatible with the
114+
"""
115+
The DAC value as a 16-bit unsigned value compatible with the
101116
:py:class:`~analogio.AnalogOut` class.
102117
103118
Note that the MCP4725 is still just a 12-bit device so quantization will occur. If you'd
104-
like to instead deal with the raw 12-bit value use the raw_value property, or the
105-
normalized_value property to deal with a 0...1 float value.
119+
like to instead deal with the raw 12-bit value use the ``raw_value`` property, or the
120+
``normalized_value`` property to deal with a 0...1 float value.
106121
"""
107122
raw_value = self._read()
108123
# Scale up to 16-bit range.

0 commit comments

Comments
 (0)