Skip to content

Commit 386669d

Browse files
authored
Merge pull request #31 from adafruit/anecdata-patch-1
Remove interrupt support (no interrupt on chip or breakout)
2 parents 8b0a46a + 28c890e commit 386669d

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

adafruit_veml7700.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333

3434
from micropython import const
3535
import adafruit_bus_device.i2c_device as i2cdevice
36-
from adafruit_register.i2c_struct import UnaryStruct, ROUnaryStruct
36+
from adafruit_register.i2c_struct import ROUnaryStruct
3737
from adafruit_register.i2c_bits import RWBits
38-
from adafruit_register.i2c_bit import RWBit, ROBit
38+
from adafruit_register.i2c_bit import RWBit
3939

4040
try:
4141
import typing # pylint: disable=unused-import
@@ -128,11 +128,9 @@ class VEML7700:
128128
time.sleep(0.1)
129129
"""
130130

131-
# ALS_CONF_0 - ALS gain, integration time, interrupt and shutdown.
131+
# ALS_CONF_0 - ALS gain, integration time, shutdown.
132132
light_shutdown = RWBit(0x00, 0, register_width=2)
133133
"""Ambient light sensor shutdown. When ``True``, ambient light sensor is disabled."""
134-
light_interrupt = RWBit(0x00, 1, register_width=2)
135-
"""Enable interrupt. ``True`` to enable, ``False`` to disable."""
136134
light_gain = RWBits(2, 0x00, 11, register_width=2)
137135
"""Ambient light gain setting. Gain settings are 2, 1, 1/4 and 1/8. Settings options are:
138136
ALS_GAIN_2, ALS_GAIN_1, ALS_GAIN_1_4, ALS_GAIN_1_8.
@@ -179,18 +177,6 @@ class VEML7700:
179177
180178
"""
181179

182-
# ALS_WH - ALS high threshold window setting
183-
light_high_threshold = UnaryStruct(0x01, "<H")
184-
"""Ambient light sensor interrupt high threshold setting."""
185-
# ALS_WL - ALS low threshold window setting
186-
light_low_threshold = UnaryStruct(0x02, "<H")
187-
"""Ambient light sensor interrupt low threshold setting."""
188-
# ALS_INT - ALS INT trigger event
189-
light_interrupt_high = ROBit(0x06, 14, register_width=2)
190-
"""Ambient light high threshold interrupt flag. Triggered when high threshold exceeded."""
191-
light_interrupt_low = ROBit(0x06, 15, register_width=2)
192-
"""Ambient light low threshold interrupt flag. Triggered when low threshold exceeded."""
193-
194180
def __init__(self, i2c_bus: I2C, address: int = 0x10) -> None:
195181
self.i2c_device = i2cdevice.I2CDevice(i2c_bus, address)
196182
for _ in range(3):

0 commit comments

Comments
 (0)