60
60
# pylint: disable=too-few-public-methods
61
61
class Mode :
62
62
"""Modes avaible to be set
63
+
63
64
+--------------------+---------------------------------------------------------------------+
64
65
| Mode | Description |
65
66
+====================+=====================================================================+
@@ -74,6 +75,7 @@ class Mode:
74
75
| ``Mode.SHUTDOWN`` | Shutdown the sensor, reducing the quiescent current and turning off|
75
76
| | current into the device inputs. Set another mode to re-enable |
76
77
+--------------------+---------------------------------------------------------------------+
78
+
77
79
"""
78
80
79
81
SHUTDOWN = const (0x0 )
@@ -83,6 +85,7 @@ class Mode:
83
85
84
86
class ConversionTime :
85
87
"""Options for ``current_conversion_time`` or ``voltage_conversion_time``
88
+
86
89
+----------------------------------+------------------+
87
90
| ``ConversionTime`` | Time |
88
91
+==================================+==================+
@@ -102,6 +105,7 @@ class ConversionTime:
102
105
+----------------------------------+------------------+
103
106
| ``ConversionTime.TIME_8_244_ms`` | 8.244 ms |
104
107
+----------------------------------+------------------+
108
+
105
109
"""
106
110
107
111
TIME_140_us = const (0x0 )
@@ -131,6 +135,7 @@ def get_seconds(time_enum):
131
135
132
136
class AveragingCount :
133
137
"""Options for ``averaging_count``
138
+
134
139
+-------------------------------+------------------------------------+
135
140
| ``AveragingCount`` | Number of measurements to average |
136
141
+===============================+====================================+
@@ -150,6 +155,7 @@ class AveragingCount:
150
155
+-------------------------------+------------------------------------+
151
156
| ``AveragingCount.COUNT_1024`` | 1024 |
152
157
+-------------------------------+------------------------------------+
158
+
153
159
"""
154
160
155
161
COUNT_1 = const (0x0 )
@@ -173,8 +179,10 @@ def get_averaging_count(avg_count):
173
179
174
180
class INA260 :
175
181
"""Driver for the INA260 power and current sensor.
182
+
176
183
:param ~busio.I2C i2c_bus: The I2C bus the INA260 is connected to.
177
184
:param address: The I2C device address for the sensor. Default is ``0x40``.
185
+
178
186
"""
179
187
180
188
def __init__ (self , i2c_bus , address = 0x40 ):
0 commit comments