Skip to content

Commit c0fd0a4

Browse files
committed
updated info docstring; misc docstrings
1 parent 8a4d763 commit c0fd0a4

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

adafruit_tsl2591.py

+24-10
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@
2727
examples/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 `TSL2591 High Dynamic Range Digital Light Sensor
37+
<https://www.adafruit.com/product/1980>`_ (Product ID: 1980)
38+
39+
**Software and Dependencies:**
40+
41+
* Adafruit CircuitPython firmware for the ESP8622 and M0-based boards:
42+
https://github.com/adafruit/circuitpython/releases
43+
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
3044
"""
3145
from micropython import const
3246

@@ -149,10 +163,10 @@ def disable(self):
149163
def gain(self):
150164
"""Get and set the gain of the sensor. Can be a value of:
151165
152-
- `GAIN_LOW` (1x)
153-
- `GAIN_MED` (25x)
154-
- `GAIN_HIGH` (428x)
155-
- `GAIN_MAX` (9876x)
166+
- ``GAIN_LOW`` (1x)
167+
- ``GAIN_MED`` (25x)
168+
- ``GAIN_HIGH`` (428x)
169+
- ``GAIN_MAX`` (9876x)
156170
"""
157171
control = self._read_u8(_TSL2591_REGISTER_CONTROL)
158172
return control & 0b00110000
@@ -172,12 +186,12 @@ def gain(self, val):
172186
def integration_time(self):
173187
"""Get and set the integration time of the sensor. Can be a value of:
174188
175-
- `INTEGRATIONTIME_100MS` (100 millis)
176-
- `INTEGRATIONTIME_200MS` (200 millis)
177-
- `INTEGRATIONTIME_300MS` (300 millis)
178-
- `INTEGRATIONTIME_400MS` (400 millis)
179-
- `INTEGRATIONTIME_500MS` (500 millis)
180-
- `INTEGRATIONTIME_600MS` (600 millis)
189+
- ``INTEGRATIONTIME_100MS`` (100 millis)
190+
- ``INTEGRATIONTIME_200MS`` (200 millis)
191+
- ``INTEGRATIONTIME_300MS`` (300 millis)
192+
- ``INTEGRATIONTIME_400MS`` (400 millis)
193+
- ``INTEGRATIONTIME_500MS`` (500 millis)
194+
- ``INTEGRATIONTIME_600MS`` (600 millis)
181195
"""
182196
control = self._read_u8(_TSL2591_REGISTER_CONTROL)
183197
return control & 0b00000111

0 commit comments

Comments
 (0)